]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
bdc22b70efad566430a9591e8a9a82708a3c7cdf
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2
3 * collect2.c (main): Parse the output file early so we can make nicer
4 temp names. Respond to “-save-temps” in the GCC OPTIONS.
5 (maybe_unlink): Don’t print “[Leaving…”] for files we never created
6 and don’t exist.
7
8 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
9
10 * collect2.c (main): Combine flags from both the command line and
11 COLLECT_GCC_OPTIONS to determine the set in force
12
13 2018-12-21 Jan Hubicka <hubicka@ucw.cz>
14
15 * ipa-utils.c (ipa_merge_profiles): Recompute summaries.
16
17 2018-12-21 Jakub Jelinek <jakub@redhat.com>
18
19 PR middle-end/85594
20 PR middle-end/88553
21 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
22 if needed.
23 (expand_omp_for_generic): Don't clobber t temporary for ordered loops.
24
25 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
26
27 PR ipa/88561
28 * ipa-polymorphic-call.c
29 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
30 arguments of thunks correctly.
31 (ipa_polymorphic_call_context::get_dynamic_context): Be ready for
32 NULL instance pinter.
33 * lto-cgraph.c (lto_output_node): Always stream thunk info.
34
35 2018-12-21 Andreas Krebbel <krebbel@linux.ibm.com>
36
37 * config/s390/vector.md ("floatv2div2df2", "floatunsv2div2df2")
38 ("fix_truncv2dfv2di2", "fixuns_truncv2dfv2di2"): New pattern
39 definitions.
40
41 2018-12-21 Eric Botcazou <ebotcazou@adacore.com>
42
43 PR rtl-optimization/87727
44 * combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
45 again moves from leaf hard registers.
46
47 * final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.
48
49 2018-12-21 Jakub Jelinek <jakub@redhat.com>
50
51 PR target/88522
52 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
53 *avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
54 *avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
55 -masm=intel.
56 (gatherq_mode): Remove mode iterator.
57 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
58 of <xtg_mode>.
59 (*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
60 (*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
61 *avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
62
63 PR rtl-optimization/88563
64 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
65 and mode arguments to convert_modes. Likewise swap mode and word_mode
66 arguments. Handle both arguments with VOIDmode before convert_modes
67 of one of them. Formatting fixes.
68
69 2018-12-21 Uros Bizjak <ubizjak@gmail.com>
70
71 PR target/88556
72 * internal-fn.def (COSH): New.
73 (SINH): Ditto.
74 (TANH): Ditto.
75 * optabs.def (cosh_optab): New.
76 (sinh_optab): Ditto.
77 (tanh_optab): Ditto.
78 * config/i386/i386-protos.h (ix86_emit_i387_sinh): New prototype.
79 (ix86_emit_i387_cosh): Ditto.
80 (ix86_emit_i387_tanh): Ditto.
81 * config/i386/i386.c (ix86_emit_i387_sinh): New function.
82 (ix86_emit_i387_cosh): Ditto.
83 (ix86_emit_i387_tanh): Ditto.
84 * config/i386/i386.md (sinhxf2): New expander.
85 (sinh<mode>2): Ditto.
86 (coshxf2): Ditto.
87 (cosh<mode>2): Ditto.
88 (tanhxf2): Ditto.
89 (tanh<mode>2): Ditto.
90
91 2018-12-21 Jakub Jelinek <jakub@redhat.com>
92
93 PR target/88547
94 * config/i386/i386.c (ix86_expand_int_sse_cmp): Optimize
95 x > y ? 0 : -1 into min (x, y) == x ? -1 : 0.
96
97 2018-12-21 Jan Beulich <jbeulich@suse.com>
98
99 * config/i386/sse.md (vaesdec_<mode>, vaesdeclast_<mode>): Allow
100 memory input.
101
102 2018-12-21 Alexandre Oliva <oliva@adacore.com>
103
104 * config.gcc (tmake_file): Add name to tmake_file for
105 each @name in --with-multilib-list on arm-*-* targets.
106 * doc/install.texi (with-multilib-list): Document it.
107
108 2018-12-21 Jakub Jelinek <jakub@redhat.com>
109
110 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use
111 DR_TARGET_ALIGNMENT on dr_info rather than dr. Spelling fixes.
112
113 2018-12-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
114
115 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do
116 versioning for data accesses with misaligned step.
117
118 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
119
120 PR c/51628
121 * doc/invoke.texi: Document -Wno-address-of-packed-member.
122
123 2018-12-20 Vladimir Makarov <vmakarov@redhat.com>
124
125 PR target/88457
126 * ira-color.c (fast_allocation): Choose the best cost hard reg.
127
128 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
129
130 * config/aarch64/iterators.md (SVE_INT_UNARY, fp_int_op): Add abs.
131 (SVE_FP_UNARY): Sort.
132
133 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
134
135 * config/aarch64/aarch64-sve.md (*cond_<optab><mode>_4): Use
136 sve_fmla_op rather than sve_fmad_op for the movprfx alternative.
137
138 2018-12-20 Martin Jambor <mjambor@suse.cz>
139
140 PR ipa/88214
141 * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that
142 ptr is a pointer.
143
144 2018-12-20 Richard Biener <rguenther@suse.de>
145
146 PR tree-optimization/84362
147 * tree-ssa-loop-im.c: Include alias.h, builtins.h and tree-dfa.h.
148 (struct im_mem_ref): add ref_canonical flag.
149 (struct mem_ref_hasher): Use ao_ref as compare_type.
150 (mem_ref_hasher::equal): Adjust and add variant comparing ao_ref
151 parts.
152 (mem_ref_alloc): Take ao_ref parameter, initialize ref_canonical
153 member.
154 (gather_mem_refs_stmt): Set up ao_ref early and do the lookup
155 using it. If we have non-equal refs canonicalize the one
156 in the hashtable used for insertion.
157 (tree_ssa_lim_initialize): Adjust.
158
159 2018-12-20 Jakub Jelinek <jakub@redhat.com>
160
161 PR target/88547
162 * config/i386/i386.c (ix86_expand_sse_movcc): For maskcmp, try to
163 emit vpmovm2? instruction perhaps after knot?. Reorganize code
164 so that it doesn't have to test !maskcmp in almost every conditional.
165
166 2018-12-20 Alan Modra <amodra@gmail.com>
167
168 * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define.
169
170 2018-12-19 Andreas Tobler <andreast@gcc.gnu.org>
171
172 * config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on
173 aarch64*-*-freebsd*
174
175 2018-12-19 Uros Bizjak <ubizjak@gmail.com>
176
177 * config/i386/i386.md (SWI1248_AVX512BWDQ_64): Rename from
178 SWI1248_AVX512BWDQ2_64. Unconditionally enable HImode.
179 (*cmp<mode>_ccz_1): Emit kortest instead of ktest insn.
180 Use SWI1248_AVX512BWDQ_64 mode iterator and enable only for
181 TARGET_AVX512F.
182
183 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
184
185 * config/arm/elf.h: Update comment about condition that need to
186 match with libgcc/config/arm/lib1funcs.S to also include
187 libgcc/config/arm/t-arm.
188 * doc/sourcebuild.texi (output-exists, output-exists-not): Rename
189 subsubsection these directives are in to "Check for output files".
190 Move scan-symbol to that section and add to it new scan-symbol-not
191 directive.
192
193 2018-12-19 Tom de Vries <tdevries@suse.de>
194
195 * config/nvptx/nvptx.c (PTX_CTA_SIZE): Define.
196
197 2018-12-19 Tom de Vries <tdevries@suse.de>
198
199 * omp-offload.c (oacc_fn_attrib_level): Remove static.
200 * omp-offload.h (oacc_fn_attrib_level): Declare.
201
202 2018-12-19 Tom de Vries <tdevries@suse.de>
203
204 * omp-offload.c (oacc_get_default_dim): New function.
205 * omp-offload.h (oacc_get_default_dim): Declare.
206
207 2018-12-19 David Malcolm <dmalcolm@redhat.com>
208
209 PR c++/87504
210 * gcc-rich-location.c
211 (maybe_range_label_for_tree_type_mismatch::get_text): Move here from
212 c/c-typeck.c.
213 (binary_op_rich_location::binary_op_rich_location): New ctor.
214 (binary_op_rich_location::use_operator_loc_p): New function.
215 * gcc-rich-location.h
216 (class maybe_range_label_for_tree_type_mismatch)): Move here from
217 c/c-typeck.c.
218 (struct op_location_t): New forward decl.
219 (class binary_op_rich_location): New class.
220 * tree.h (struct op_location_t): New struct.
221
222 2018-12-19 David Malcolm <dmalcolm@redhat.com>
223
224 PR c++/43064
225 PR c++/43486
226 * convert.c: Include "selftest.h".
227 (preserve_any_location_wrapper): New function.
228 (convert_to_pointer_maybe_fold): Update to handle location
229 wrappers.
230 (convert_to_real_maybe_fold): Likewise.
231 (convert_to_integer_1): Strip expr when using TREE_OVERFLOW.
232 Handle location wrappers when checking for INTEGER_CST.
233 (convert_to_integer_maybe_fold): Update to handle location
234 wrappers.
235 (convert_to_complex_maybe_fold): Likewise.
236 (selftest::test_convert_to_integer_maybe_fold): New functions.
237 (selftest::convert_c_tests): New function.
238 * convert.h (preserve_any_location_wrapper): New decl.
239 * fold-const.c (size_binop_loc): Strip location wrappers when
240 using TREE_OVERFLOW.
241 (operand_equal_p): Strip any location wrappers.
242 (integer_valued_real_p): Strip any location wrapper.
243 * selftest-run-tests.c (selftest::run_tests): Call
244 selftest::convert_c_tests.
245 * selftest.h (selftest::convert_c_tests): New decl.
246 * tree.c (build_complex): Assert that REAL and IMAG are constants.
247 (integer_zerop): Look through location wrappers.
248 (integer_onep): Likewise.
249 (integer_each_onep): Likewise.
250 (integer_all_onesp): Likewise.
251 (integer_minus_onep): Likewise.
252 (integer_pow2p): Likewise.
253 (integer_nonzerop): Likewise.
254 (integer_truep): Likewise.
255 (fixed_zerop): Likewise.
256 (real_zerop): Likewise.
257 (real_onep): Likewise.
258 (real_minus_onep): Likewise.
259 (tree_int_cst_equal): Likewise.
260 (simple_cst_equal): Treat location wrappers with non-equal source
261 locations as being unequal.
262 (uniform_integer_cst_p): Look through location wrappers.
263 (maybe_wrap_with_location): Don't create wrappers if any
264 auto_suppress_location_wrappers are active.
265 (suppress_location_wrappers): New variable.
266 (selftest::test_predicates): New test.
267 (selftest::tree_c_tests): Call it.
268 * tree.h (CONSTANT_CLASS_OR_WRAPPER_P): New macro.
269 (suppress_location_wrappers): New decl.
270 (class auto_suppress_location_wrappers): New class.
271
272 2018-12-19 Paul A. Clarke <pc@us.ibm.com>
273
274 * config/rs6000/tmmintrin.h (_mm_hadds_epi16): Vector lanes swapped.
275 (_mm_hsub_epi32): Likewise.
276 (_mm_shuffle_epi8): Fix reversed interpretation of parameters.
277 (_mm_shuffle_pi8): Likewise.
278 (_mm_addubs_pi16): Likewise.
279
280 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
281
282 * config/arm/arm.h (TARGET_HARD_FLOAT): Restrict to TARGET_32BIT
283 targets.
284 * config/arm/arm.c (output_return_instruction): Only check
285 TARGET_HARD_FLOAT to decide whether FP instructions are available.
286
287 2018-12-19 Tom de Vries <tom@codesourcery.com>
288
289 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
290 dump files): Add offload-rtl.
291
292 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
293
294 PR target/88213
295 * config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
296 Require TARGET_POWERPC64.
297
298 2018-12-19 Richard Biener <rguenther@suse.de>
299
300 PR tree-optimization/88533
301 Revert
302 2018-04-30 Richard Biener <rguenther@suse.de>
303
304 PR tree-optimization/28364
305 PR tree-optimization/85275
306 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
307 copying first exit test.
308
309 * tree-ssa-loop-ch.c: Include tree-phinodes.h and
310 ssa-iterators.h.
311 (should_duplicate_loop_header_p): Track whether stmt compute
312 loop invariants or values based on IVs. Apart from the
313 original loop header only duplicate blocks with exit tests
314 that are based on IVs or invariants.
315
316 2018-12-19 Tom de Vries <tdevries@suse.de>
317
318 * config/nvptx/nvptx.c (nvptx_gen_shared_bcast, shared_prop_gen)
319 (nvptx_goacc_expand_accel_var): Use MAX and ROUND_UP.
320 (nvptx_assemble_value, nvptx_output_skip): Use MIN.
321 (nvptx_shared_propagate, nvptx_single, nvptx_expand_shared_addr): Use
322 MAX.
323
324 2018-12-19 Tom de Vries <tdevries@suse.de>
325
326 * config/nvptx/nvptx.c (nvptx_gen_wcast): Rename as
327 nvptx_gen_warp_bcast.
328 (nvptx_gen_wcast): Rename to nvptx_gen_shared_bcast, add bool
329 vector argument, and update call to nvptx_gen_shared_bcast.
330 (propagator_fn): Add bool argument.
331 (nvptx_propagate): New bool argument, pass bool argument to fn.
332 (vprop_gen): Rename to warp_prop_gen, update call to
333 nvptx_gen_warp_bcast.
334 (nvptx_vpropagate): Rename to nvptx_warp_propagate, update call to
335 nvptx_propagate.
336 (wprop_gen): Rename to shared_prop_gen, update call to
337 nvptx_gen_shared_bcast.
338 (nvptx_wpropagate): Rename to nvptx_shared_propagate, update call
339 to nvptx_propagate.
340 (nvptx_wsync): Rename to nvptx_cta_sync.
341 (nvptx_single): Update calls to nvptx_gen_warp_bcast,
342 nvptx_gen_shared_bcast and nvptx_cta_sync.
343 (nvptx_process_pars): Likewise.
344 (write_worker_buffer): Rename as write_shared_buffer.
345 (nvptx_file_end): Update calls to write_shared_buffer.
346 (nvptx_expand_worker_addr): Rename as nvptx_expand_shared_addr.
347 (nvptx_expand_builtin): Update call to nvptx_expand_shared_addr.
348 (nvptx_get_worker_red_addr): Rename as nvptx_get_shared_red_addr.
349 (nvptx_goacc_reduction_setup): Update call to
350 nvptx_get_shared_red_addr.
351 (nvptx_goacc_reduction_fini): Likewise.
352 (nvptx_goacc_reduction_teardown): Likewise.
353
354 2018-12-19 Tom de Vries <tdevries@suse.de>
355
356 * config/nvptx/nvptx.c (worker_bcast_size): Rename as
357 oacc_bcast_size.
358 (worker_bcast_align): Rename as oacc_bcast_align.
359 (worker_bcast_sym): Rename as oacc_bcast_sym.
360 (nvptx_option_override): Update usage of oacc_bcast_*.
361 (struct wcast_data_t): Rename as broadcast_data_t.
362 (nvptx_gen_wcast): Update type of data argument and usage of
363 oacc_bcast_align.
364 (wprop_gen): Update type of data_ and usage of oacc_bcast_align.
365 (nvptx_wpropagate): Update type of data and usage of
366 oacc_bcast_{sym,size}.
367 (nvptx_single): Update type of data and usage of oacc_bcast_size.
368 (nvptx_file_end): Update usage of oacc_bcast_{sym,align,size}.
369
370 2018-12-19 Tom de Vries <tdevries@suse.de>
371
372 * config/nvptx/nvptx.md (nvptx_barsync): Add and handle operand.
373 * config/nvptx/nvptx.c (nvptx_wsync): Update call to gen_nvptx_barsync.
374
375 2018-12-19 Tom de Vries <tdevries@suse.de>
376
377 * config/nvptx/nvptx.c (nvptx_single): Always pass false to
378 nvptx_wsync.
379 (nvptx_process_pars): Likewise.
380
381 2018-12-19 Tom de Vries <tdevries@suse.de>
382
383 * config/nvptx/nvptx.c (nvptx_previous_fndecl): Declare.
384 (nvptx_set_current_function): New function.
385 (TARGET_SET_CURRENT_FUNCTION): Define.
386
387 2018-12-19 Shaokun Zhang <zhangshaokun@hisilicon.com>
388
389 * config/aarch64/aarch64-cores.def (tsv110): Fix architecture. This
390 part is really Armv8.2 with some permitted Armv8.4 extensions.
391
392 2018-12-19 Jakub Jelinek <jakub@redhat.com>
393
394 PR target/88541
395 * config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
396 for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
397
398 2018-12-19 Alexandre Oliva <aoliva@redhat.com>
399
400 PR testsuite/86153
401 PR middle-end/83239
402 * vr-values.c
403 (vr_values::vrp_evaluate_conditional_warnv_with_ops): Extend
404 simplification of overflow tests to cover cases in which we
405 can determine the result of the comparison.
406
407 2018-12-19 Bin Cheng <bin.cheng@linux.alibaba.com>
408
409 * auto-profile.c (afdo_indirect_call): Skip generating histogram
410 value if we can't find cgraph_node for then indirected callee. Save
411 profile_id of the cgraph_node in histogram value's first counter.
412 * value-prof.c (gimple_value_profile_transformations): Don't skip
413 for flag_auto_profile.
414
415 2018-12-18 Vladimir Makarov <vmakarov@redhat.com>
416
417 PR rtl-optimization/87759
418 * lra-assigns.c (lra_split_hard_reg_for): Recalculate
419 non_reload_pseudos.
420
421 2018-12-18 Jakub Jelinek <jakub@redhat.com>
422
423 PR target/88464
424 * config/i386/i386-builtin-types.def
425 (VOID_FTYPE_PDOUBLE_QI_V8SI_V4DF_INT,
426 VOID_FTYPE_PFLOAT_QI_V4DI_V8SF_INT,
427 VOID_FTYPE_PLONGLONG_QI_V8SI_V4DI_INT,
428 VOID_FTYPE_PINT_QI_V4DI_V8SI_INT,
429 VOID_FTYPE_PDOUBLE_QI_V4SI_V2DF_INT,
430 VOID_FTYPE_PFLOAT_QI_V2DI_V4SF_INT,
431 VOID_FTYPE_PLONGLONG_QI_V4SI_V2DI_INT,
432 VOID_FTYPE_PINT_QI_V2DI_V4SI_INT): New builtin types.
433 * config/i386/i386.c (enum ix86_builtins): Add
434 IX86_BUILTIN_SCATTERALTSIV4DF, IX86_BUILTIN_SCATTERALTDIV8SF,
435 IX86_BUILTIN_SCATTERALTSIV4DI, IX86_BUILTIN_SCATTERALTDIV8SI,
436 IX86_BUILTIN_SCATTERALTSIV2DF, IX86_BUILTIN_SCATTERALTDIV4SF,
437 IX86_BUILTIN_SCATTERALTSIV2DI and IX86_BUILTIN_SCATTERALTDIV4SI.
438 (ix86_init_mmx_sse_builtins): Fix up names of IX86_BUILTIN_GATHERALT*,
439 IX86_BUILTIN_GATHER3ALT* and IX86_BUILTIN_SCATTERALT* builtins to
440 match the IX86_BUILTIN codes. Build IX86_BUILTIN_SCATTERALTSIV4DF,
441 IX86_BUILTIN_SCATTERALTDIV8SF, IX86_BUILTIN_SCATTERALTSIV4DI,
442 IX86_BUILTIN_SCATTERALTDIV8SI, IX86_BUILTIN_SCATTERALTSIV2DF,
443 IX86_BUILTIN_SCATTERALTDIV4SF, IX86_BUILTIN_SCATTERALTSIV2DI and
444 IX86_BUILTIN_SCATTERALTDIV4SI decls.
445 (ix86_vectorize_builtin_scatter): Expand those new builtins.
446
447 2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
448
449 * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
450 Describe when a typedef name can be used as the type specifier for
451 a vector type, and when it cannot.
452
453 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
454
455 * config/msp430/msp430.h: Define TARGET_VTABLE_ENTRY_ALIGN.
456
457 2018-12-18 Jakub Jelinek <jakub@redhat.com>
458
459 PR target/88513
460 PR target/88514
461 * optabs.def (vec_pack_sbool_trunc_optab, vec_unpacks_sbool_hi_optab,
462 vec_unpacks_sbool_lo_optab): New optabs.
463 * optabs.c (expand_widen_pattern_expr): Use vec_unpacks_sbool_*_optab
464 and pass additional argument if both input and target have the same
465 scalar mode of VECTOR_BOOLEAN_TYPE_P vectors.
466 * expr.c (expand_expr_real_2) <case VEC_PACK_TRUNC_EXPR>: Handle
467 VECTOR_BOOLEAN_TYPE_P pack where result has the same scalar mode
468 as the operands using vec_pack_sbool_trunc_optab.
469 * tree-vect-stmts.c (supportable_widening_operation): Use
470 vec_unpacks_sbool_{lo,hi}_optab for VECTOR_BOOLEAN_TYPE_P conversions
471 where both wider_vectype and vectype have the same scalar mode.
472 (supportable_narrowing_operation): Similarly use
473 vec_pack_sbool_trunc_optab if narrow_vectype and vectype have the same
474 scalar mode.
475 * config/i386/i386.c (ix86_get_builtin)
476 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Check for VECTOR_MODE_P
477 rather than non-VOIDmode.
478 * config/i386/sse.md (vec_pack_trunc_qi, vec_pack_trunc_<mode>):
479 Remove useless ()s around "register_operand", formatting fixes.
480 (vec_pack_sbool_trunc_qi, vec_unpacks_sbool_lo_qi,
481 vec_unpacks_sbool_hi_qi): New expanders.
482 * doc/md.texi (vec_pack_sbool_trunc_M, vec_unpacks_sbool_hi_M,
483 vec_unpacks_sbool_lo_M): Document.
484
485 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
486
487 * combine.c (update_rsp_from_reg_equal): Only look for the nonzero bits
488 of src in nonzero_bits_mode if the mode of src is MODE_INT and
489 HWI_COMPUTABLE.
490 (reg_nonzero_bits_for_combine): Add clarification to comment.
491
492 2018-12-18 Wei Xiao <wei3.xiao@intel.com>
493
494 * config/i386/driver-i386.c (host_detect_local_cpu): Detect cascadelake.
495 * config/i386/i386.c (fold_builtin_cpu): Handle cascadelake.
496 * doc/extend.texi: Add cascadelake.
497 2018-12-17 Peter Bergner <bergner@linux.ibm.com>
498
499 PR target/87870
500 * config/rs6000/vsx.md (nW): New mode iterator.
501 (vsx_mov<mode>_64bit): Use it. Remove redundant GPR 0/-1 alternative.
502 Update length attribute for (<??r>, <nW>) alternative.
503 (vsx_mov<mode>_32bit): Likewise.
504
505 2018-12-17 Tom de Vries <tdevries@suse.de>
506
507 * config/nvptx/nvptx.c (PTX_VECTOR_LENGTH, PTX_WORKER_LENGTH,
508 PTX_DEFAULT_RUNTIME_DIM): Move to the top of the file.
509
510 2018-12-17 Tom de Vries <tdevries@suse.de>
511
512 * config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
513 (nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.
514
515 2018-12-17 Tom de Vries <tdevries@suse.de>
516
517 * config/nvptx/nvptx.c (nvptx_single): Fix whitespace.
518 (nvptx_neuter_pars): Likewise.
519
520 2018-12-17 Tom de Vries <tdevries@suse.de>
521
522 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Work around Fortran
523 bug PR72741 by overriding dims parameter for routines.
524
525 2018-12-17 Tom de Vries <tdevries@suse.de>
526
527 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Rewrite using
528 predicate vars.
529
530 2018-12-17 Steve Ellcey <sellcey@cavium.com>
531
532 * config/aarch64/aarch64-protos.h (aarch64_use_simple_return_insn_p):
533 New prototype.
534 (aarch64_epilogue_uses): Ditto.
535 * config/aarch64/aarch64.c (aarch64_attribute_table): New array.
536 (aarch64_simd_decl_p): New function.
537 (aarch64_reg_save_mode): New function.
538 (aarch64_function_ok_for_sibcall): Check for simd calls.
539 (aarch64_layout_frame): Check for simd function.
540 (aarch64_gen_storewb_pair): Handle E_TFmode.
541 (aarch64_push_regs): Use aarch64_reg_save_mode to get mode.
542 (aarch64_gen_loadwb_pair): Handle E_TFmode.
543 (aarch64_pop_regs): Use aarch64_reg_save_mode to get mode.
544 (aarch64_gen_store_pair): Handle E_TFmode.
545 (aarch64_gen_load_pair): Ditto.
546 (aarch64_save_callee_saves): Handle different mode sizes.
547 (aarch64_restore_callee_saves): Ditto.
548 (aarch64_components_for_bb): Check for simd function.
549 (aarch64_epilogue_uses): New function.
550 (aarch64_process_components): Check for simd function.
551 (aarch64_expand_prologue): Ditto.
552 (aarch64_expand_epilogue): Ditto.
553 (aarch64_expand_call): Ditto.
554 (aarch64_use_simple_return_insn_p): New function.
555 (TARGET_ATTRIBUTE_TABLE): New define.
556 * config/aarch64/aarch64.h (EPILOGUE_USES): Redefine.
557 (FP_SIMD_SAVED_REGNUM_P): New macro.
558 * config/aarch64/aarch64.md (simple_return): New define_expand.
559 (load_pair_dw_tftf): New instruction.
560 (store_pair_dw_tftf): Ditto.
561 (loadwb_pair<TX:mode>_<P:mode>): Ditto.
562 (storewb_pair<TX:mode>_<P:mode>): Ditto.
563
564 2018-12-17 Uros Bizjak <ubizjak@gmail.com>
565
566 PR target/88502
567 * internal-fn.def (ACOSH): New.
568 (ASINH): Ditto.
569 (ATANH): Ditto.
570 * optabs.def (acosh_optab): New.
571 (asinh_optab): Ditto.
572 (atanh_optab): Ditto.
573 * config/i386/i386-protos.h (ix86_emit_i387_asinh): New prototype.
574 (ix86_emit_i387_acosh): Ditto.
575 (ix86_emit_i387_atanh): Ditto.
576 * config/i386/i386.c (ix86_emit_i387_asinh): New function.
577 (ix86_emit_i387_acosh): Ditto.
578 (ix86_emit_i387_atanh): Ditto.
579 * config/i386/i386.md (asinhxf2): New expander.
580 (asinh<mode>2): Ditto.
581 (acoshxf2): Ditto.
582 (acosh<mode>2): Ditto.
583 (atanhxf2): Ditto.
584 (atanh<mode>2): Ditto.
585
586 2018-12-17 David Edelsohn <dje.gcc@gmail.com>
587
588 * config.gcc (powerpc-ibm-aix6.*): Delete extra_headers.
589 (powerpc-ibm-aix7.1.*): Same.
590 (powerpc-ibm-aix[789].*): Same.
591
592 2018-12-17 H.J. Lu <hongjiu.lu@intel.com>
593
594 PR debug/79342
595 * dwarf2out.c (find_AT_string_in_table): Add insert argument
596 defaulting to INSERT and replace INSERT.
597 (find_AT_string): Likewise.
598 (output_macinfo_op): Pass NO_INSERT to find_AT_string.
599
600 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
601
602 * coverage.c (struct conts_entry): Add n_counts.
603 (remap_counts_file): Record number of ocunts.
604 (get_coverage_counts): Verify that counts match.
605 * coverage.h (get_coverage_counts): Update prototype.
606 * profile.c (get_exec_counts. compute_value_histograms): Add
607 n_counts parametrs.
608
609 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
610
611 PR rtl-optimization/88253
612 * combine.c (combine_simplify_rtx): Test for side-effects before
613 substituting by zero.
614
615 2018-12-17 Richard Sandiford <richard.sandiford@arm.com>
616
617 * doc/invoke.texi (-fversion-loops-for-strides): Document
618 (loop-versioning-group-size, loop-versioning-max-inner-insns)
619 (loop-versioning-max-outer-insns): Document new --params.
620 * Makefile.in (OBJS): Add gimple-loop-versioning.o.
621 * common.opt (fversion-loops-for-strides): New option.
622 * opts.c (default_options_table): Enable fversion-loops-for-strides
623 at -O3.
624 * params.def (PARAM_LOOP_VERSIONING_GROUP_SIZE)
625 (PARAM_LOOP_VERSIONING_MAX_INNER_INSNS)
626 (PARAM_LOOP_VERSIONING_MAX_OUTER_INSNS): New parameters.
627 * passes.def: Add pass_loop_versioning.
628 * timevar.def (TV_LOOP_VERSIONING): New time variable.
629 * tree-ssa-propagate.h
630 (substitute_and_fold_engine::substitute_and_fold): Add an optional
631 block parameter.
632 * tree-ssa-propagate.c
633 (substitute_and_fold_engine::substitute_and_fold): Likewise.
634 When passed, only walk blocks dominated by that block.
635 * tree-vrp.h (range_includes_p): Declare.
636 (range_includes_zero_p): Turn into an inline wrapper around
637 range_includes_p.
638 * tree-vrp.c (range_includes_p): New function, generalizing...
639 (range_includes_zero_p): ...this.
640 * tree-pass.h (make_pass_loop_versioning): Declare.
641 * gimple-loop-versioning.cc: New file.
642
643 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
644
645 * ipa-fnsummary.c (remap_edge_change_prob): Do not ICE when changes
646 are not streamed in.
647
648 2018-12-15 H.J. Lu <hongjiu.lu@intel.com>
649
650 PR target/88483
651 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Revert
652 reversion 267133.
653
654 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
655
656 * ipa-fnsummary.c (analyze_function_body): Do not loeak conds and
657 size_time_table.
658 (ipa_fn_summary_generate): Add prevails parameter; do not allocate
659 data when symbol is not prevailing.
660 (inline_read_section): Likewise.
661
662 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
663
664 * cgraph.h (cgraph_node): Add predicate prevailing_p.
665 (cgraph_edge): Add predicate possible_call_in_translation_unit_p.
666 * ipa-prop.c (ipa_write_jump_function): Optimize streaming of ADDR_EXPR.
667 (ipa_read_jump_function): Add prevails parameter; optimize streaming.
668 (ipa_read_edge_info): Break out from ...
669 (ipa_read_node_info): ... here; optimize streaming.
670 * cgraph.c (cgraph_edge::possibly_call_in_translation_unit_p): New
671 predicate.
672
673 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
674
675 * ipa-utils.c (ipa_merge_profiles): Do no merging when source function
676 has zero count.
677
678 2018-12-15 Jakub Jelinek <jakub@redhat.com>
679
680 PR tree-optimization/88464
681 PR target/88498
682 * tree-vect-stmts.c (vect_build_gather_load_calls): For NARROWING
683 and mask with integral masktype, don't try to permute mask vectors,
684 instead emit VEC_UNPACK_{LO,HI}_EXPR. Fix up NOP_EXPR operand.
685 (vectorizable_store): Handle masked scatters with decl and integral
686 mask type.
687 (permute_vec_elements): Allow scalar_dest to be NULL.
688 * config/i386/i386.c (ix86_get_builtin)
689 <case IX86_BUILTIN_GATHER3ALTDIV16SF>: Use lowpart_subreg for masks.
690 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Don't assume mask and src have
691 to be the same.
692
693 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
694
695 * ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
696 parameters.
697 (cgraph_build_static_cdtor): Update.
698 (build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
699 callsed.
700
701 2018-12-15 Alan Modra <amodra@gmail.com>
702
703 * config/rs6000/rs6000.c (generate_set_vrsave, rs6000_emit_savres_rtx),
704 (rs6000_emit_prologue, rs6000_call_aix, rs6000_call_sysv),
705 (rs6000_call_darwin_1): Use gen_hard_reg_clobber.
706
707 2018-12-15 Jakub Jelinek <jakub@redhat.com>
708
709 PR target/88489
710 * config/i386/sse.md (UNSPEC_SFIXUPIMM): New unspec enumerator.
711 (avx512f_sfixupimm<mode><mask_name><round_saeonly_name>): Use it
712 instead of UNSPEC_FIXUPIMM.
713
714 PR rtl-optimization/88478
715 * cselib.c (cselib_record_sets): Move sets[i].src_elt tests
716 after REG_P (dest) test.
717
718 2018-12-14 Martin Sebor <msebor@redhat.com>
719
720 PR tree-optimization/88372
721 * calls.c (maybe_warn_alloc_args_overflow): Handle function pointers.
722 * tree-object-size.c (alloc_object_size): Same. Simplify.
723 * doc/extend.texi (Object Size Checking): Update.
724 (Other Builtins): Add __builtin_object_size.
725 (Common Type Attributes): Add alloc_size.
726 (Common Variable Attributes): Ditto.
727
728 2018-12-14 Martin Sebor <msebor@redhat.com>
729
730 PR rtl-optimization/87096
731 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Avoid
732 folding calls whose bound may exceed INT_MAX. Diagnose bound ranges
733 that exceed the limit.
734
735 2018-12-14 Martin Sebor <msebor@redhat.com>
736
737 PR web/79738
738 * doc/extend.texi (attribute const, pure): Clarify.
739
740 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
741
742 * config/i386/i386.c (rest_of_insert_endbranch): Insert ENDBR
743 at the function entry only when -mmanual-endbr isn't used or
744 there is cf_check function attribute.
745 (ix86_attribute_table): Add cf_check.
746 * config/i386/i386.opt: Add -mmanual-endbr.
747 * doc/extend.texi: Document cf_check attribute.
748 * doc/invoke.texi: Document -mmanual-endbr.
749
750 2018-12-14 Thomas Schwinge <thomas@codesourcery.com>
751 Cesar Philippidis <cesar@codesourcery.com>
752
753 * omp-offload.c (inform_oacc_loop): New function.
754 (execute_oacc_device_lower): Use it to display loop parallelism.
755
756 2018-12-14 Jakub Jelinek <jakub@redhat.com>
757
758 PR c++/82294
759 PR c++/87436
760 * expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
761 * expr.c (categorize_ctor_elements_1): Likewise. Compute it like
762 p_nz_elts, except don't multiply it by mult. Adjust recursive call.
763 Fix up COMPLEX_CST handling.
764 (categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
765 it and pass it through to categorize_ctor_elements_1.
766 (mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
767 * gimplify.c (gimplify_init_constructor): Likewise. Don't force
768 ctor into readonly data section if num_unique_nonzero_elements is
769 smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
770 bytes.
771
772 2018-12-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
773
774 * config/arm/arm.md (arm_movdi): Split if -mslow-flash-data and
775 source is a constant that would be loaded by literal pool.
776 (movsf expander): Generate a no_literal_pool_sf_immediate insn if
777 -mslow-flash-data is present, targeting hardfloat ABI and source is a
778 float constant that cannot be loaded via vmov.
779 (movdf expander): Likewise but generate a no_literal_pool_df_immediate
780 insn.
781 (arm_movsf_soft_insn): Split if -mslow-flash-data and source is a
782 float constant that would be loaded by literal pool.
783 (softfloat constant movsf splitter): Splitter for the above case.
784 (movdf_soft_insn): Split if -mslow-flash-data and source is a float
785 constant that would be loaded by literal pool.
786 (softfloat constant movdf splitter): Splitter for the above case.
787 * config/arm/constraints.md (Pz): Document existing constraint.
788 (Ha): Define constraint.
789 (Tu): Likewise.
790 * config/arm/predicates.md (hard_sf_operand): New predicate.
791 (hard_df_operand): Likewise.
792 * config/arm/thumb2.md (thumb2_movsi_insn): Split if
793 -mslow-flash-data and constant would be loaded by literal pool.
794 * constant/arm/vfp.md (thumb2_movsi_vfp): Likewise and disable constant
795 load in VFP register.
796 (movdi_vfp): Likewise.
797 (thumb2_movsf_vfp): Use hard_sf_operand as predicate for source to
798 prevent match for a constant load if -mslow-flash-data and constant
799 cannot be loaded via vmov. Adapt constraint accordingly by
800 using Ha instead of E for generic floating-point constant load.
801 (thumb2_movdf_vfp): Likewise using hard_df_operand predicate instead.
802 (no_literal_pool_df_immediate): Add a clobber to use as the
803 intermediate general purpose register and also enable it after reload
804 but disable it constant is a valid FP constant. Add constraints and
805 generate a DI intermediate load rather than 2 SI loads.
806 (no_literal_pool_sf_immediate): Add a clobber to use as the
807 intermediate general purpose register and also enable it after
808 reload.
809
810 2018-12-14 Uros Bizjak <ubizjak@gmail.com>
811
812 PR target/88474
813 * internal-fn.def (HYPOT): New.
814 * optabs.def (hypot_optab): New.
815 * config/i386/i386.md (hypot<mode>3): New expander.
816
817 2018-12-14 Jeff Law <law@redhat.com>
818
819 * target.def (post_cfi_startproc): Fix text.
820
821 2018-12-14 Sam Tebbs <sam.tebbs@arm.com>
822
823 * doc/tm.texi (TARGET_ASM_POST_CFI_STARTPROC): Define.
824 * doc/tm.texi.in (TARGET_ASM_POST_CFI_STARTPROC): Define.
825 * dwarf2out.c (dwarf2out_do_cfi_startproc): Trigger the hook.
826 * hooks.c (hook_void_FILEptr_tree): Define.
827 * hooks.h (hook_void_FILEptr_tree): Define.
828 * target.def (post_cfi_startproc): Define.
829
830 2018-12-14 Tom de Vries <tdevries@suse.de>
831
832 * lto-cgraph.c (verify_node_partition): New function.
833 (input_overwrite_node, input_varpool_node): Use verify_node_partition.
834
835 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
836
837 PR target/88483
838 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
839 use get_frame_size ().
840
841 2018-12-14 Andrew Stubbs <ams@codesourcery.com>
842
843 * gcc/lra-int.h (lra_register_new_scratch_op): Add third parameter.
844 * gcc/lra-remat.c (update_scratch_ops): Pass icode to
845 lra_register_new_scratch_op.
846 * gcc/lra.c (struct sloc): Add icode field.
847 (lra_register_new_scratch_op): Add icode parameter.
848 Use icode to skip insns that have changed beyond recognition.
849
850 2018-12-14 Eric Botcazou <ebotcazou@adacore.com>
851
852 * dwarf2out.c (analyze_discr_in_predicate): Simplify.
853 (analyze_variants_discr): Deal with naked boolean discriminants.
854
855 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
856
857 * config/arc/arc.c (arc_restore_callee_milli) Don't clobber off
858 variable.
859
860 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
861
862 * config/arc/arc.h (reg_class): Add SIBCALL_REGS.
863
864 2018-12-14 Richard Biener <rguenther@suse.de>
865
866 * gimple-ssa-split-paths.c (is_feasible_trace): Remove
867 duplicated code block.
868
869 2018-12-14 Alan Modra <amodra@gmail.com>
870
871 PR rtl-optimization/88311
872 * config/rs6000/rs6000.c (rs6000_call_sysv): Do not mask cookie.
873 (rs6000_sibcall_sysv): Likewise.
874
875 2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
876
877 PR rtl-optimization/88001
878 * function.c (match_asm_constraints_1): Don't invalidly share RTL.
879
880 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
881
882 * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
883 if autofdo counts are all zeros.
884
885 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
886
887 * auto-profile.c (afdo_indirect_call): Skip generating histogram
888 value for internal call.
889
890 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
891
892 * auto-profile.c (AFDO_EINFO): New macro.
893 (class edge_info): New class.
894 (is_edge_annotated, set_edge_annotated): Delete.
895 (afdo_propagate_edge, afdo_propagate_circuit, afdo_propagate): Remove
896 parameter. Adjust edge count computation and annotation using class
897 edge_info.
898 (afdo_calculate_branch_prob, afdo_annotate_cfg): Likewise.
899
900 2018-12-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
901
902 * ipa-cp.c (print_all_lattices): Skip cp clones.
903
904 * ipa-cp.c: Fix various comment typos.
905
906 2018-12-13 Jakub Jelinek <jakub@redhat.com>
907
908 PR tree-optimization/88444
909 * tree-inline.c (fold_marked_statements): Iterate up to
910 last_basic_block_for_fn rather than n_basic_blocks_for_fn.
911
912 PR rtl-optimization/88470
913 * cfgcleanup.c (outgoing_edges_match): If the function is
914 shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
915 edge to EXIT, return false.
916
917 2018-12-13 Martin Sebor <msebor@redhat.com>
918
919 * doc/extend.texi: Consistently use @code for const and volatile
920 qualifiers, the true and false constants, and asm statements.
921
922 2018-12-13 Vladimir Makarov <vmakarov@redhat.com>
923
924 PR rtl-optimization/88414
925 * lra-int.h (lra_asm_error_p): New.
926 * lra-assigns.c (lra_assign): Check lra_asm_error_p for checking
927 call crossed pseudo assignment correctness.
928 (lra_split_hard_reg_for): Set up lra_asm_error_p.
929 * lra-constraints.c (curr_insn_transform): Ditto.
930 * lra.c (lra_asm_error_p): New.
931 (lra): Reset lra_asm_error_p.
932
933 2018-12-13 Jakub Jelinek <jakub@redhat.com>
934
935 PR rtl-optimization/88416
936 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
937 even if !AUTO_INC_DEC.
938
939 2018-12-13 David Edelsohn <dje.gcc@gmail.com>
940
941 * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is
942 non-NULL.
943 (rs6000_arg_partial_bytes): Same.
944
945 2018-12-13 Jason Merrill <jason@redhat.com>
946
947 * gdbinit.in (pp): New macro.
948 (pbb): Remove.
949
950 2018-12-13 Jakub Jelinek <jakub@redhat.com>
951
952 PR tree-optimization/88464
953 * tree-vect-stmts.c (vect_build_gather_load_calls): Handle INTEGER_TYPE
954 masktype if mask is non-NULL.
955 (vectorizable_load): Don't reject masked gather loads if masktype
956 in the decl is INTEGER_TYPE.
957
958 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
959
960 * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
961 s390_vec_double_s64 instead of s390_vcdgb.
962 (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
963 s390_vcdlgb.
964
965 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
966
967 * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
968 ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
969 ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
970
971 2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
972
973 * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
974 behavior.
975
976 2018-12-13 Wei Xiao <wei3.xiao@intel.com>
977
978 * common/config/i386/i386-common.c (processor_names): Add cascadelake.
979 (processor_alias_table): Add cascadelake.
980 * config.gcc: Add -march=cascadelake.
981 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
982 cascadelake.
983 * config/i386/i386.c (Add m_CASCADELAKE): New.
984 (processor_cost_table): Add cascadelake.
985 (get_builtin_code_for_version): Handle cascadelake.
986 * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New.
987 (PTA_CASCADELAKE): Ditto.
988 * doc/invoke.texi: Add -march=cascadelake.
989
990 2018-12-13 Jakub Jelinek <jakub@redhat.com>
991
992 PR target/88465
993 * config/i386/i386.md (*movdi_internal, *movsi_internal,
994 *movhi_internal, *movqi_internal): Add alternative(s) to load
995 0 or -1 into k registers using kxor or kxnoq instructions.
996
997 PR target/88461
998 * config/i386/sse.md (VI1248_AVX512VLBW, AVX512ZEXTMASK): New
999 mode iterators.
1000 (<avx512>_testm<mode>3<mask_scalar_merge_name>,
1001 <avx512>_testnm<mode>3<mask_scalar_merge_name>): Merge patterns
1002 with VI12_AVX512VL and VI48_AVX512VL iterators into ones with
1003 VI1248_AVX512VLBW iterator.
1004 (*<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext,
1005 *<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext_mask,
1006 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext,
1007 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext_mask): New
1008 define_insns.
1009
1010 PR target/88461
1011 * config/i386/i386.md (*zero_extendsidi2, zero_extend<mode>di2,
1012 *zero_extend<mode>si2, *zero_extendqihi2): Add =*k, *km alternatives.
1013
1014 2018-12-12 Tom de Vries <tdevries@suse.de>
1015 Jakub Jelinek <jakub@redhat.com>
1016
1017 * omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1018 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1019 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1020 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1021 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1022 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME): Fix up
1023 function types - remove one argument.
1024
1025 2018-12-12 Martin Sebor <msebor@redhat.com>
1026
1027 * doc/extend.texi (attribute copy): Fix typos.
1028
1029 2018-12-12 Martin Sebor <msebor@redhat.com>
1030
1031 * doc/extend.texi (Function Attributes): Clarify C++ aspects.
1032 (Variable Attributes): Same.
1033 (Type Attributes): Same.
1034
1035 2018-12-12 Olivier Hainque <hainque@adacore.com>
1036
1037 * config/aarch64/aarch64.c (aarch64_override_options): Once arch,
1038 cpu and tune were validated, insert SUBTARGET_OVERRIDE_OPTIONS if
1039 defined.
1040
1041 2018-12-12 Olivier Hainque <hainque@adacore.com>
1042
1043 * config/aarch64/aarch64.c (PROBE_STACK_FIRST_REG) : Redefine as
1044 R9_REGNUM instead of 9.
1045 (PROBE_STACK_SECOND_REG): Redefine as R10_REGNUM instead of 10.
1046
1047 2018-12-12 Eric Botcazou <ebotcazou@adacore.com>
1048
1049 PR target/86806
1050 * config/sparc/sparc.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1051 (speculation_barrier): New instruction for V9.
1052
1053 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
1054 Iain Sandoe <iain@sandoe.co.uk>
1055
1056 PR target/88343
1057 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
1058 unless it has been used.
1059 (first_reg_to_save): Remove dead code.
1060
1061 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1062
1063 * config/rs6000/rs6000-protos.h (rs6000_call_darwin): New.
1064 (rs6000_sibcall_darwin): New. (macho_call_template): Remove.
1065 * config/rs6000/rs6000.c (get_prev_label): Forward declaration.
1066 (rs6000_call_template_1): Handle Darwin.
1067 (macho_call_template): Remove.
1068 (rs6000_call_sysv): Remove handling for Darwin.
1069 (rs6000_call_darwin_1, rs6000_call_darwin): New
1070 (rs6000_sibcall_darwin): New.
1071 * config/rs6000/rs6000.md (define_expand “call”): Handle Darwin
1072 with its own expander. (define_expand “call_value”): Likewise.
1073 (define_expand “sibcall”): Likewise.
1074 (define_expand “sibcall_value”): Likewise.
1075 (call_nonlocal_sysv): Remove Darwin special-casing.
1076 (call_value_nonlocal_sysv): Likewise.
1077
1078 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1079
1080 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64): Remove.
1081 (call_nonlocal_darwin64): Remove.
1082 (call_value_indirect_nonlocal_darwin64): Remove.
1083 (call_value_nonlocal_darwin64): Remove.
1084 * config/rs6000/rs6000.c (rs6000_call_template_1): Handle Darwin with
1085 the same asm output as AIX/ELFv2. (rs6000_call_sysv): Preserve the
1086 CALL_LONG flag when needed for Darwin.
1087 * config/rs6000/rs6000.md (define expand “call”): Expand Darwin as
1088 per sysv.
1089 (define_expand “call_value”): Likewise.
1090 (define_expand “sibcall”): Likewise.
1091 (define_expand “sibcall_value”): Likewise.
1092 (call_indirect_nonlocal_sysv): Mark the clobber mode P.
1093 (call_nonlocal_sysv): Likewise.
1094 (call_nonlocal_sysv_secure): Likewise.
1095 (call_value_indirect_nonlocal_sysv): Likewise.
1096 (call_value_nonlocal_sysv): Likewise.
1097 (call_value_nonlocal_sysv_secure): Likewise.
1098 (call_local64): Mark the clobber DI.
1099 (call_value_local64): Likewise.
1100
1101 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1102
1103 PR tree-optimization/88444
1104 * tree-vrp.c (register_edge_assert_for_2): Only register assertions
1105 for conversions if rhs1 is a SSA_NAME.
1106
1107 2018-12-11 Dimitar Dimitrov <dimitar@dinux.eu>
1108
1109 * cfgexpand.c (asm_clobber_reg_is_valid): Also produce
1110 error when stack pointer is clobbered.
1111 (expand_asm_stmt): Refactor clobber check in separate function.
1112
1113 2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
1114
1115 * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
1116 accounting for STACK_BOUNDARY 128.
1117 (STACK_DYNAMIC_OFFSET): Likewise.
1118
1119 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1120
1121 PR target/88425
1122 * config/i386/i386.md (*x86_mov<SWI48:mode>cc_0_m1_neg_leu<SWI:mode>):
1123 New define_insn_and_split.
1124
1125 2018-12-11 Richard Biener <rguenther@suse.de>
1126
1127 PR middle-end/88448
1128 PR middle-end/88415
1129 * gimple.c (gimple_assign_set_rhs_with_ops): Revert previous
1130 change.
1131 * tree-complex.c (update_complex_assignment): Properly transfer
1132 or clean EH info around gimple_assign_set_rhs_with_ops.
1133
1134 2018-12-11 Richard Earnshaw <rearnsha@arm.com>
1135
1136 PR target/87369
1137 * config/aarch64/iterators.md (sizem1): Add sizes for SFmode and DFmode.
1138 (Vbtype): Add SFmode mapping.
1139 * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
1140 (copysign<GPF:mode>3): New expand pattern.
1141 (copysign<GPF:mode>3_insn): New insn pattern.
1142
1143 2018-12-11 Richard Biener <rguenther@suse.de>
1144
1145 * ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.
1146
1147 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1148
1149 PR lto/86004
1150 * doc/sourcebuild.texi (lto_incremental): Document new effective
1151 target.
1152
1153 2018-12-11 Segher Boessenkool <segher@kernel.crashing.org>
1154
1155 PR target/88145
1156 * config/rs6000/rs6000.c (rs6000_expand_zeroop_builtin): Use
1157 rs6000_isa_flags instead of rs6000_isa_flags_explicit to decide
1158 whether soft float is enabled.
1159 (rs6000_expand_mtfsb_builtin): Ditto.
1160 (rs6000_expand_set_fpscr_rn_builtin): Ditto.
1161 (rs6000_expand_set_fpscr_drn_builtin): Ditto.
1162
1163 2018-12-10 Jeff Law <law@redhat.com>
1164
1165 PR tree-optimization/80520
1166 * gimple-ssa-split-paths.c (is_feasible_trace): Recognize half
1167 diamonds that are likely if convertable.
1168
1169 2018-12-10 Martin Sebor <msebor@redhat.com>
1170
1171 PR tree-optimization/86196
1172 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
1173 base size only of arrays.
1174
1175 2018-12-10 Segher Boessenkool <segher@kernel.crashing.org>
1176
1177 * config.gcc (Obsolete configurations): Delete powerpc*-*-*spe*.
1178 (Unsupported targets): Add powerpc*-*-*spe*.
1179 (powerpc*-*-*spe*): Delete.
1180 (powerpc-*-eabispe*): Delete.
1181 (powerpc-*-rtems*spe*): Delete.
1182 (powerpc*-*-linux*spe*): Delete.
1183 (powerpc*-*-linux*): Do not handle the linux*spe* targets.
1184 (powerpc-wrs-vxworks*spe): Delete.
1185 (with_cpu setting code): Delete powerpc*-*-*spe* handling.
1186 * config.host (target powerpc*-*-*spe*): Delete.
1187 * doc/invoke.texi (PowerPC SPE Options): Delete.
1188 (PowerPC SPE Options): Delete.
1189 * config/powerpcspe: Delete.
1190
1191 2018-12-10 Uros Bizjak <ubizjak@gmail.com>
1192
1193 PR target/88418
1194 * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
1195 check operand 1 with vector_operand predicate.
1196 (ix86_expand_sse_movcc): For vector modes, check op_true with
1197 vector_operand, not nonimmediate_operand.
1198
1199 2018-12-10 Richard Biener <rguenther@suse.de>
1200
1201 * tree-affine.c (tree_to_aff_combination): Remove unreachable
1202 MEM_REF case.
1203 (aff_combination_expand): Cache on SSA names, not possibly
1204 on conversion trees. Avoid expanding cases we do not handle.
1205
1206 2018-12-10 Richard Biener <rguenther@suse.de>
1207
1208 PR tree-optimization/88427
1209 * vr-values.c (vr_values::extract_range_from_phi_node):
1210 Handle symbolic ranges conservatively when trying to drop
1211 to Inf +- 1.
1212
1213 2018-12-10 Martin Jambor <mjambor@suse.cz>
1214
1215 PR ipa/88214
1216 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
1217 we check pointers against pointers.
1218
1219 2018-12-10 Richard Biener <rguenther@suse.de>
1220
1221 PR middle-end/88415
1222 * gimple.c (gimple_assign_set_rhs_with_ops): Transfer EH
1223 info to a newly allocated stmt.
1224
1225 2018-12-10 Jerome Lambourg <lambourg@adacore.com>
1226
1227 * config/vxworksae.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): Define.
1228
1229 2018-12-10 Fredrik Nyström <fredrik@lysator.liu.se>
1230
1231 PR bootstrap/65725
1232 * config/sol2.h: Only use libgcc-unwind.map if
1233 ENABLE_SHARED_LIBGCC.
1234
1235 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1236
1237 * auto-profile.c (afdo_calculate_branch_prob): Convert profile_count
1238 to afdo precision quality.
1239 (afdo_callsite_hot_enough_for_early_inline): Likewise.
1240 (afdo_annotate_cfg): Set profile_count for exit basic block.
1241
1242 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1243
1244 * auto-profile.c (string_table::get_index_by_decl)
1245 (function_instance::get_function_instance_by_decl): Avoid infinite
1246 recursion by using DECL_FROM_INLINE.
1247
1248 2018-12-09 John David Anglin <danglin@gcc.gnu.org>
1249
1250 * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define
1251 d_target_objs.
1252 * config/pa/pa-protos.h (pa_d_target_versions): New prototype.
1253 * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
1254 * config/pa/pa-d.c: New file.
1255 * config/pa/t-pa: New file.
1256
1257 2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
1258
1259 * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
1260 zero profile count.
1261
1262 2018-12-08 Jakub Jelinek <jakub@redhat.com>
1263
1264 PR fortran/88304
1265 * tree-nested.c (convert_local_reference_stmt): Handle clobbers where
1266 lhs is not a decl normally, don't call use_pointer_in_frame on that
1267 lhs.
1268
1269 2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
1270
1271 PR rtl-optimization/88390
1272 * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
1273 (cfi_row_equal_p): Compare it.
1274 (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
1275 If FAKE is false, set window_save of the current row.
1276 (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
1277 function with FAKE parameter set to true.
1278 <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
1279 (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
1280
1281 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
1282
1283 PR target/87496
1284 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
1285 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
1286 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
1287 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
1288 require -mlong-double-128.
1289
1290 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1291
1292 * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
1293 sve_width entry.
1294 (aarch64_parse_sve_width_string): Define.
1295
1296 2018-12-07 Jeff Law <law@redhat.com>
1297
1298 PR middle-end/87813
1299 * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
1300 m_update_global_ranges member. Add corresponding argument to ctor.
1301 * gimple-ssa-evrp-analyze.c
1302 (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
1303 initialize m_update_global_ranges.
1304 (evrp_range_analyzer::set_ssa_range_info): Assert that we are
1305 updating global ranges.
1306 (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
1307 update global ranges if explicitly requested.
1308 (evrp_range_analyzer::record_ranges_from_phis): Similarly.
1309 (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
1310 * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
1311 evrp_range_analyzer ctor.
1312 * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
1313 * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
1314
1315 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1316
1317 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
1318 Add SVE_NOT_IMPLEMENTED value.
1319 * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
1320 field.
1321 * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
1322 cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
1323 cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
1324 thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
1325 saphira_tunings, thunderx2t99_tunings, emag_tunings):
1326 Specify sve_width.
1327 (aarch64_estimated_poly_value): Define.
1328 (TARGET_ESTIMATED_POLY_VALUE): Define.
1329
1330 2018-12-07 Paul A. Clarke <pc@us.ibm.com>
1331
1332 PR target/88408
1333 * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
1334
1335 2018-12-07 Vladimir Makarov <vmakarov@redhat.com>
1336
1337 PR rtl-optimization/88349
1338 * ira-costs.c (record_operand_costs): Check bigger reg class on
1339 NO_REGS.
1340
1341 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1342
1343 * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
1344 Split the patterns after reload if we don't need the predicate
1345 operand.
1346 (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
1347
1348 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1349
1350 * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
1351 iterator.
1352 (sve_fp_op): Handle minus and mult.
1353 * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
1354 (*mul<mode>3): Split the patterns after reload if we don't
1355 need the predicate operand.
1356 (*post_ra_<sve_fp_op><mode>3): New pattern.
1357
1358 2018-12-07 Bin Cheng <bin.cheng@linux.alibaba.com>
1359
1360 * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
1361 return condition when *this is precise zero.
1362
1363 2018-12-07 Jakub Jelinek <jakub@redhat.com>
1364
1365 PR target/85593
1366 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
1367 for functions with naked attribute.
1368
1369 PR c/88367
1370 * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
1371 with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
1372 is non-NULL and offset is known to have most significant bit clear.
1373 * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
1374 of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
1375 most significant bit clear. If offset does have most significant bit
1376 set and -fno-delete-null-pointer-checks, don't return true even if
1377 the base pointer is non-NULL.
1378
1379 2018-12-06 Alexandre Oliva <aoliva@redhat.com>
1380
1381 * cselib.c (cselib_record_sets): Skip strict low part sets
1382 with NULL src_elt.
1383
1384 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1385
1386 PR target/88316
1387 * config/rs6000/smmintrin.h: New file.
1388 * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
1389
1390 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1391
1392 PR target/88316
1393 * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
1394 (_mm_unpacklo_pi8): Likewise.
1395 (_mm_mulhi_pi16): Likewise.
1396 (_mm_packs_pi16): Fix for big-endian. Use preferred API.
1397 (_mm_packs_pi32): Likewise.
1398 (_mm_packs_pu16): Likewise.
1399 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
1400 (_mm_cvtss_si64): Likewise.
1401 (_mm_cvtpi32x2_ps): Likewise.
1402 (_mm_shuffle_ps): Likewise.
1403 (_mm_movemask_pi8): Likewise.
1404 (_mm_mulhi_pu16): Likewise.
1405 (_mm_sad_pu8): Likewise.
1406 (_mm_sad_pu8): Likewise.
1407 (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
1408 (_mm_cvtpu8_ps): Likewise.
1409 (_mm_movemask_ps): Better #else case for big-endian (no functional
1410 change).
1411 (_mm_shuffle_pi16): Likewise.
1412 * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
1413 Better #else case for big-endian (no functional change).
1414 (_mm_movemask_epi8): Likewise.
1415 (_mm_shufflehi_epi16): Likewise.
1416 (_mm_shufflelo_epi16): Likewise.
1417 (_mm_shuffle_epi32): Likewise.
1418 (_mm_mul_epu32): Fix for big-endian.
1419 (_mm_bsrli_si128): Likewise.
1420 (_mm_cvtps_pd): Better #else case for big endian.
1421 (_mm_mulhi_epi16): Likewise.
1422 (_mm_mul_epu32): Likewise.
1423 (_mm_slli_si128): Likewise.
1424 (_mm_sll_epi16): Likewise.
1425 (_mm_sll_epi32): Likewise.
1426 (_mm_sra_epi16): Likewise.
1427 (_mm_sra_epi32): Likewise.
1428 (_mm_srl_epi16): Likewise.
1429 (_mm_srl_epi32): Likewise.
1430 (_mm_mulhi_epu16): Likewise.
1431 (_mm_sad_epu8): Likewise.
1432 * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
1433 (_mm_sub_ps): Likewise.
1434 * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
1435 * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
1436 macros consistently (no functional changes).
1437 (_mm_alignr_pi8): Likewise.
1438
1439 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1440
1441 PR c++/87380
1442 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
1443 default.
1444 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
1445
1446 2018-12-06 Vladimir Makarov <vmakarov@redhat.com>
1447
1448 PR target/88282
1449 * ira.c (ira_init_register_move_cost): Use info from
1450 hard_regno_mode_ok instead of contains_reg_of_mode.
1451 * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
1452 hard register class for some fixed hard registers.
1453
1454 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1455
1456 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
1457 (Size of an asm): Fix typo. Document asm inline.
1458 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
1459 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
1460 (gimple_asm_set_volatile): Fix typo.
1461 (gimple_asm_inline_p): New.
1462 (gimple_asm_set_inline): New.
1463 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
1464 tree to gimple.
1465 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
1466 gimple_asm_inline_p flag, too.
1467 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
1468 in an ASM_EXPR.
1469 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
1470 a minimum size for an asm.
1471 * tree.h (ASM_INLINE_P): New.
1472
1473 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1474
1475 PR inline-asm/55681
1476 * doc/extend.texi (Basic Asm): Update grammar.
1477 (Extended Asm): Update grammar.
1478
1479 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1480
1481 PR target/78444
1482 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
1483 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
1484 stack alignment in non-leaf functions.
1485
1486 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1487
1488 PR target/87598
1489 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
1490 call output_operand_lossage on VOIDmode CONST_INTs. After
1491 output_operand_lossage do return false.
1492
1493 2018-12-06 Richard Biener <rguenther@suse.de>
1494
1495 * df-problems.c (df_rd_local_compute): Use bitmap_release.
1496 (df_live_free): Likewise.
1497 (df_md_local_compute): Likewise.
1498 (df_md_free): Release df_md_scratch bitmap.
1499 * loop-invariant.c (calculate_loop_reg_pressure): Use
1500 bitmap_release.
1501 * sched-deps.c (true_dependency_cache, output_dependency_cache,
1502 anti_dependency_cache, control_dependency_cache,
1503 spec_dependency_cache): Use bitmap instead of bitmap_head *.
1504 * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
1505 dont_calc_deps as bitmap allocated from obstack not GC.
1506 (schedule_ebbs_finish): Use bitmap_release.
1507 * sched-rgn.c (schedule_insns): Initialize non-GTY
1508 not_in_df as bitmap allocated from obstack not GC.
1509 Use bitmap_release.
1510 * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
1511 (sel_region_init): Allocate forced_ebb_heads.
1512 (sel_region_finish): Free forced_ebb_heads.
1513
1514 2018-12-06 Richard Biener <rguenther@suse.de>
1515
1516 * bitmap.c (bitmap_head::crashme): Define.
1517 * bitmap.h (bitmap_head): Add constexpr default constructor
1518 poisoning the obstack member.
1519 (bitmap_head::crashme): Declare.
1520 (bitmap_release): New function clearing a bitmap and poisoning
1521 the obstack member.
1522 * gengtype.c (main): Make it recognize CONSTEXPR.
1523 * lra-constraints.c (lra_inheritance): Use bitmap_release
1524 instead of bitmap_clear.
1525 * ira.c (ira): Work around class-memaccess warning.
1526 * regrename.c (create_new_chain): Likewise.
1527
1528 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1529
1530 PR tree-optimization/85726
1531 * generic-match-head.c (optimize_successive_divisions_p): New function.
1532 * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
1533 * match.pd: Don't combine successive divisions if they aren't exact
1534 and optimize_successive_divisions_p is false.
1535
1536 PR fortran/88304
1537 * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
1538 for non-local automatic decls.
1539
1540 2018-12-05 David Edelsohn <dje.gcc@gmail.com>
1541
1542 * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
1543 default.
1544
1545 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1546
1547 * dwarf2out.c (field_byte_offset): Remove
1548 #ifdef PCC_BITFIELD_TYPE_MATTERS check.
1549
1550 2018-12-05 Richard Biener <rguenther@suse.de>
1551 Martin Sebor <msebor@redhat.com>
1552
1553 PR c/87028
1554 * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
1555 SSA_NAME_VAR.
1556 * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
1557 * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
1558
1559 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
1560
1561 * configure.ac (gcc_cv_otool): Set.
1562 * configure: Regenerate.
1563
1564 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1565
1566 * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
1567 (GROUP_BITFIELDS_BY_ALIGN): Ditto.
1568
1569 2018-12-05 Richard Sandiford <richard.sandiford@arm.com>
1570
1571 PR tree-optimization/88064
1572 * tree-vect-patterns.c (vect_convert_input): Convert the result of
1573 an existing cast if it has the right width but the wrong sign.
1574 Do not test the signedness of the required result when
1575 considering whether to split an existing cast; instead split to
1576 a type with the same signedness as the source of the cast, then
1577 convert it to the opposite signedness where necessary.
1578 (vect_recog_over_widening_pattern): Handle sign changes between
1579 the final PLUS_EXPR and the RSHIFT_EXPR.
1580 (vect_recog_average_pattern): Use an unsigned operation when
1581 truncating an addition, subtraction or multiplication. Cast the
1582 result back to the "real" signedness before promoting.
1583
1584 2018-12-05 Richard Biener <rguenther@suse.de>
1585
1586 PR tree-optimization/86637
1587 * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
1588 vect_location at the end.
1589
1590 2018-12-05 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR tree-optimization/87360
1593 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
1594 data dependencies, don't return false, just continue. Formatting
1595 fixes.
1596 (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
1597 fuse_loops): Formatting fixes.
1598
1599 PR sanitizer/88333
1600 * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
1601 aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
1602
1603 2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
1604
1605 * config.gcc (csky-*-linux-gnu*): Force .init_array support.
1606
1607 2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
1608
1609 * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
1610 aggregate handling on actual AIX, not on somewhat similar systems.
1611 (rs6000_arg_partial_bytes): Ditto.
1612
1613 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1614
1615 PR rtl-optimization/88317
1616 * lra-constraints.c (split_reg): Don't set up check_only_regs if
1617 we are outside the inheritance pass.
1618
1619 2018-12-04 Jan Hubicka <hubicka@ucw.cz>
1620
1621 * ipa-prop.c (jump_function_useful_p): New.
1622 (ipa_read_node_info): Do not allocated useless jump functions.
1623
1624 2018-12-04 David Malcolm <dmalcolm@redhat.com>
1625
1626 PR c/82967
1627 * spellcheck.c (selftest::test_suggestions): Add another assertion.
1628
1629 2018-12-04 Martin Sebor <msebor@redhat.com>
1630
1631 * doc/extend.texi (__builtin_has_attribute): Fix typo.
1632
1633 2018-12-04 Jakub Jelinek <jakub@redhat.com>
1634
1635 PR target/88188
1636 * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
1637 failures.
1638 (print_operand): Use REG_P instead of GET_CODE == REG.
1639 <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
1640 <case 't'>: Likewise. Remove GET_MODE check.
1641 * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
1642 return -1.
1643
1644 2018-12-04 Martin Sebor <msebor@redhat.com>
1645
1646 * doc/extend.texi (attribute aligned): Expand.
1647
1648 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
1649
1650 PR target/61976
1651 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
1652 in FPRs on AIX.
1653 (rs6000_arg_partial_bytes): Same.
1654
1655 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1656
1657 PR target/88282
1658 * ira-costs.c (exec): Try bigger class to use smaller register
1659 move cost.
1660
1661 2018-12-04 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1662
1663 PR ipa/88297
1664 * ipa-cp.c (create_specialized_node): Track clone counters by
1665 node assembler names.
1666 (ipcp_driver): Change type of clone_num_suffixes key to const char*.
1667
1668 2018-12-04 Richard Biener <rguenther@suse.de>
1669
1670 * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
1671 for epilogue vectorization.
1672
1673 2018-12-04 Richard Biener <rguenther@suse.de>
1674
1675 PR tree-optimization/88301
1676 * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
1677 issues in last commit.
1678
1679 2018-12-04 Richard Biener <rguenther@suse.de>
1680
1681 PR tree-optimization/88315
1682 * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
1683 and fix initialization vector for SAD and DOT_PROD SLP reductions.
1684
1685 2018-12-03 Sandra Loosemore <sandra@codesourcery.com>
1686
1687 PR c/59039
1688 * doc/extend.texi (Nonlocal gotos): New section.
1689
1690 2018-12-03 Uros Bizjak <ubizjak@gmail.com>
1691
1692 * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
1693 alternative to (v,vm,c).
1694
1695 2018-12-03 Segher Boessenkool <segher@kernel.crashing.org>
1696
1697 * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
1698 (powerpc*-*-linux*): Don't handle it here.
1699
1700 2018-12-03 Jeff Law <law@redhat.com>
1701
1702 * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
1703 warnings quiet.
1704
1705 * config/h8300/h8300.md (low byte masking peepholes): Only accept
1706 nonimmediate_operand for the to-be-masked operand.
1707
1708 2018-12-03 Richard Biener <rguenther@suse.de>
1709
1710 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1711 allow expected function-pointer cast re-instantiation.
1712
1713 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1714
1715 * common/config/s390/s390-common.c (s390_option_init_struct):
1716 Use section anchors by default.
1717 * config/s390/s390.c (s390_check_symref_alignment): Handle
1718 anchors.
1719 (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
1720 * output.h (assemble_align): Pass `align' as unsigned int, so
1721 that the value 0x80000000, which corresponds to `aligned(1 <<
1722 28)', would pass the `align > BITS_PER_UNIT' check.
1723 * varasm.c (assemble_align): Likewise.
1724
1725 2018-12-03 Julian Brown <julian@codesourcery.com>
1726
1727 * tree-pretty-print.c (dump_omp_clause): Make default case
1728 gcc_unreachable.
1729
1730 2018-12-03 Richard Biener <rguenther@suse.de>
1731
1732 PR tree-optimization/88301
1733 * tree-vrp.c (register_edge_assert_for_2): Handle conversions
1734 that do not change the value by registering the same assert
1735 for the operand.
1736
1737 2018-12-03 Richard Biener <rguenther@suse.de>
1738
1739 * tree-vect-loop.c (vect_transform_loop): Properly compute
1740 upper bound for the epilogue when doing epilogue vectorization.
1741
1742 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1743
1744 PR target/80080
1745 * cfgcleanup.c (class pass_postreload_jump): New pass.
1746 (pass_postreload_jump::execute): Likewise.
1747 (make_pass_postreload_jump): Likewise.
1748 * passes.def: Add pass_postreload_jump before
1749 pass_postreload_cse.
1750 * tree-pass.h (make_pass_postreload_jump): New pass.
1751
1752 2018-12-02 Uros Bizjak <ubizjak@gmail.com>
1753
1754 * config/i386/i386.c (inline_memory_move_cost): Correctly
1755 compute number of TFmode GPR moves.
1756
1757 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1758
1759 PR target/88278
1760 * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
1761
1762 2018-12-02 Jeff Law <law@redhat.com>
1763
1764 * config/h8300/h8300.md (call, call_value): Drop mode from
1765 operand containing number of bytes pushed.
1766 (call_insn, call_value_insn): Use mode iterator for number
1767 of bytes pushed operand. Make pattern name vary appropriately.
1768
1769 2018-12-02 Jan Hubicka <jh@suse.cz>
1770
1771 * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
1772 trust precise profiles.
1773
1774 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1775
1776 * tree-nested.c (convert_nonlocal_omp_clauses,
1777 convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
1778 OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
1779 (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
1780 Convert clauses for GIMPLE_OMP_TASKGROUP.
1781
1782 * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
1783 cancellation point with taskgroup clause inside of taskloop. Consider
1784 a taskloop construct without nogroup clause as implicit taskgroup for
1785 diagnostics if cancel/cancellation point with taskgroup clause is
1786 closely nested inside of taskgroup region.
1787
1788 PR sanitizer/88291
1789 * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
1790 to the start of the function.
1791 (asan_emit_stack_protection): When emitting clearing sequence for
1792 epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
1793 add last_size_aligned which is last_size padded to multiples of
1794 ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
1795 boundaries.
1796
1797 2018-12-01 Jakub Jelinek <jakub@redhat.com>
1798
1799 PR sanitizer/88289
1800 * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
1801 an off-by-one for BYTES_BIG_ENDIAN.
1802
1803 PR target/54589
1804 * combine.c (find_split_point): For invalid memory address
1805 nonobj + obj + const, if reg + obj + const is valid addressing
1806 mode, split at nonobj. Use if rather than else if for the
1807 fallback. Comment fixes.
1808
1809 2018-11-30 Indu Bhagat <indu.bhagat@oracle.com>
1810
1811 * coverage.c (get_coverage_counts): Use from_function_decl for precise
1812 function location.
1813 * profile-count.c (profile_count::dump): Add handling for precise
1814 profile quality.
1815 * profile.c (compute_branch_probabilities): Rely on exec_counts instead
1816 of profile_info to set profile_status of function.
1817 (branch_prob): Do not set profile_status of function based on
1818 profile_info. Done above based on exec_counts.
1819
1820 2018-11-30 Jakub Jelinek <jakub@redhat.com>
1821
1822 PR tree-optimization/88274
1823 * tree-ssa-reassoc.c (optimize_range_tests_xor,
1824 optimize_range_tests_diff): If type has smaller precision than
1825 corresponding mode or if it has non-standard min/max, compute
1826 everything in a standard type for the precision.
1827
1828 PR testsuite/85368
1829 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
1830 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
1831 --param logical-op-non-short-circuit is present, override
1832 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
1833 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
1834
1835 2018-11-30 Jeff Law <law@redhat.com>
1836
1837 * optabs.c (expand_binop): Use "machine_mode" rather than
1838 "enum machine mode" in most recent change.
1839
1840 2018-11-30 Wilco Dijkstra <wdijkstr@arm.com>
1841
1842 PR middle-end/64242
1843 * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
1844 the frame pointer.
1845 (expand_builtin_nonlocal_goto): Likewise.
1846
1847 2018-11-30 David Malcolm <dmalcolm@redhat.com>
1848
1849 * diagnostic-core.h (emit_diagnostic): New decl.
1850 * diagnostic.c (emit_diagnostic): New overload, taking a
1851 rich_location *.
1852
1853 2018-11-30 David Malcolm <dmalcolm@redhat.com>
1854
1855 * pretty-print.c (class selftest::test_pretty_printer): New
1856 subclass of pretty_printer.
1857 (selftest::test_prefixes_and_wrapping): New test.
1858 (selftest::pretty_print_c_tests): Call it.
1859
1860 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1861
1862 Minimize clone counter memory usage in create_virtual_clone.
1863 * cgraph.h (clone_function_name): Add a variant that takes a
1864 tree decl.
1865 * cgraph.h (cgraph_node::create_virtual_clone): Add a new
1866 argument: num_suffix.
1867 * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
1868 num_suffix to clone_function_name.
1869 (clone_function_name): Add a variant that takes a tree decl.
1870 * ipa-cp.c (create_specialized_node): Keep track of clone
1871 counters in clone_num_suffixes hash map.
1872 (ipcp_driver): Free the counter hash map.
1873 * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
1874 clone per function.
1875
1876 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1877 Make function assembly more independent.
1878
1879 This is achieved by having clone_function_name assign unique clone
1880 numbers for each function independently.
1881
1882 * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
1883 hash map.
1884 (clone_function_name_numbered): Use clone_fn_ids.
1885
1886 2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
1887
1888 PR rtl-optimization/88179
1889 * lra-constraints.c (address_eliminator::address_eliminator):
1890 Don't eleminate regs in illegitimate address.
1891
1892 2018-11-30 David Malcolm <dmalcolm@redhat.com>
1893
1894 PR preprocessor/88257
1895 * input.c (get_substring_ranges_for_loc): Fix indentation.
1896 Bulletproof against getting a different files back from
1897 linemap_resolve_location and expand_location_to_spelling_point.
1898
1899 2018-11-30 Alexander Monakov <amonakov@ispras.ru>
1900
1901 PR gcov-profile/88279
1902 * tree-profile.c (init_ic_make_global_vars): Call
1903 decl_default_tls_model for variable and not it's type.
1904
1905 2018-11-30 Sam Tebbs <sam.tebbs@arm.com>
1906
1907 * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
1908
1909 2018-11-30 Martin Liska <mliska@suse.cz>
1910
1911 PR sanitizer/81715
1912 * asan.c (asan_shadow_cst): Remove, partially transform
1913 into flush_redzone_payload.
1914 (RZ_BUFFER_SIZE): New.
1915 (struct asan_redzone_buffer): New.
1916 (asan_redzone_buffer::emit_redzone_byte): Likewise.
1917 (asan_redzone_buffer::flush_redzone_payload): Likewise.
1918 (asan_redzone_buffer::flush_if_full): Likewise.
1919 (asan_emit_stack_protection): Use asan_redzone_buffer class
1920 that is responsible for proper aligned stores and flushing
1921 of shadow memory payload.
1922 * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
1923 (asan_var_and_redzone_size): Likewise.
1924 * cfgexpand.c (expand_stack_vars): Use smaller alignment
1925 (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
1926 for automatic variables more compact.
1927
1928 2018-11-30 Alan Modra <amodra@gmail.com>
1929
1930 * config/rs6000/predicates.md (easy_fp_constant): Avoid long
1931 dependent insn sequences.
1932 * config/rs6000/rs6000.c (num_insns_constant): Support long
1933 double constants.
1934 * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
1935 length attribute.
1936
1937 2018-11-30 Alan Modra <amodra@gmail.com>
1938
1939 * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
1940 num_insns_constant_wide. Make static. Revise comment.
1941 (num_insns_constant_multi): New function.
1942 (num_insns_constant): Formatting. Correct CONST_WIDE_INT
1943 calculation. Simplify and extract code common to both
1944 CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
1945 const_double modes.
1946 * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
1947
1948 2018-11-30 Richard Biener <rguenther@suse.de>
1949
1950 PR tree-optimization/88274
1951 * tree-vrp.c (ranges_from_anti_range): Fix handling of
1952 TYPE_MIN/MAX_VALUE.
1953
1954 2018-11-29 Andi Kleen <ak@linux.intel.com>
1955
1956 * config/i386/i386.c (current_fentry_section): Add.
1957 (x86_function_profiler): Handle fentry section.
1958 (ix86_attribute_table): Add fentry section.
1959 * config/i386/i386.opt: Add -mfentry-section.
1960 * doc/extend.texi: Document fentry_section attribute.
1961 * doc/invoke.texi: Document -mfentry-section.
1962
1963 2018-11-29 Andi Kleen <ak@linux.intel.com>
1964
1965 * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
1966 (current_fentry_name): Add.
1967 (x86_function_profiler): Handle fentry_name attribute.
1968 (ix86_handle_fentry_name): Add.
1969 (ix86_attribute_table): Add fentry_name.
1970 * config/i386/i386.opt: Add -mfentry-name
1971 * doc/extend.texi: Document fentry_name.
1972 * doc/invoke.texi: Document minstrument-return.
1973
1974 2018-11-29 Andi Kleen <ak@linux.intel.com>
1975
1976 * config/i386/i386-opts.h (enum instrument_return): Add.
1977 * config/i386/i386.c (output_return_instrumentation): Add.
1978 (ix86_output_function_return): Call output_return_instrumentation.
1979 (ix86_output_call_insn): Call output_return_instrumentation.
1980 * config/i386/i386.opt: Add -minstrument-return=.
1981 * doc/invoke.texi (-minstrument-return): Document.
1982
1983 2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
1984
1985 PR target/87807
1986 * config/sparc/sparc-modes.def: Minor tweak.
1987 * config/sparc/sparc.c: Minor reordering.
1988 (sparc_pass_by_reference): Move around.
1989 (traverse_record_type): Change offset from HOST_WIDE_INT to int.
1990 (classify_registers): Likewise for bitpos.
1991 (function_arg_slotno): Remove dead test and tweak comments.
1992 <MODE_RANDOM>: Remove useless assertion and test whether the
1993 parameter is named in order to pass it in FP registers. Return
1994 the regno for floating-point vector types.
1995 (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
1996 (compute_fp_layout): Likewise.
1997 (count_registers): Likewise.
1998 (assign_int_registers): Likewise.
1999 (assign_fp_registers): Likewise.
2000 (assign_registers): Likewise.
2001 (function_arg_record_value): Change size from HOST_WIDE_INT to int
2002 and use CEIL_NWORDS to compute the number of registers.
2003 (function_arg_union_value): Minor tweaks.
2004 (function_arg_vector_value): Add slotno and named parameters, use
2005 CEIL_NWORDS to compute the number of registers.
2006 (sparc_function_arg_1): Rework handling of vector types. Change
2007 size from HOST_WIDE_INT to int.
2008 (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
2009 with vector types for the 64-bt ABI.
2010 (sparc_function_arg_advance): Likewise.
2011 (sparc_return_in_memory): Add reference to -fpcc-struct-return.
2012 (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
2013 (sparc_function_value_1): Rework handling of vector types. Change
2014 size from HOST_WIDE_INT to int.
2015
2016 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR target/88152
2019 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
2020 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
2021 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
2022 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
2023 *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
2024 define_insn_and_split patterns.
2025
2026 PR target/54700
2027 * config/i386/sse.md
2028 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2029 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2030 *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
2031 define_insn_and_split.
2032
2033 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2034
2035 PR target/87496
2036 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2037 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2038
2039 2018-11-29 Uros Bizjak <ubizjak@gmail.com>
2040
2041 * config/i386/i386.c (inline_memory_move_cost):
2042 Check "in" for 2 in MMX_CLASS_P case.
2043 * config/i386/mmx.md (*mov<mode>_internal): Correct
2044 TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
2045 alternatives in preferred_for_speed attribute calculation.
2046
2047 2018-11-29 Martin Sebor <msebor@redhat.com>
2048
2049 PR c/88172
2050 PR testsuite/88208
2051 * doc/extend.texi (attribute constructor): Clarify.
2052
2053 2018-11-29 Martin Liska <mliska@suse.cz>
2054
2055 PR middle-end/88246
2056 * builtins.c (expand_movstr): Fix thinko introduced
2057 when switching to the new enum.
2058
2059 2018-11-29 qing zhao <qing.zhao@oracle.com>
2060
2061 * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
2062 * common.opt: Add -flive-patching flag.
2063 * doc/invoke.texi: Document -flive-patching.
2064 * flag-types.h (enum live_patching_level): New enum.
2065 * ipa-inline.c (can_inline_edge_p): Disable external functions from
2066 inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
2067 * opts.c (control_options_for_live_patching): New function.
2068 (finish_options): Make flag_live_patching incompatible with flag_lto.
2069 Control IPA optimizations based on different levels of
2070 flag_live_patching.
2071
2072 2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
2073
2074 * match.pd (sinh (atanh (x))): New simplification rules.
2075 (cosh (atanh (x))): Likewise.
2076
2077 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2078
2079 PR target/54700
2080 * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
2081 (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
2082 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2083 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2084 *<sse4_1_avx2>_pblendvb_lt): New define_insns.
2085
2086 PR target/88152
2087 * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
2088 * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
2089 * match.pd (define_predicates): Add uniform_integer_cst_p.
2090 (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
2091 so that it works also for vector comparisons with uniform constants
2092 with INTEGER_CST element.
2093
2094 PR target/88234
2095 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
2096 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
2097 in unsigned_type_for instead of vector integral type where overflow
2098 doesn't wrap.
2099
2100 2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2101
2102 There can be at most one .resolver clone per function
2103 * config/rs6000/rs6000.c (make_resolver_func): Generate
2104 resolver symbol with clone_function_name instead of
2105 clone_function_name_numbered.
2106
2107 2018-11-29 Richard Biener <rguenther@suse.de>
2108
2109 PR tree-optimization/88243
2110 * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
2111 type of all pattern-sequence stmts to vect_internal_def.
2112
2113 2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
2114
2115 PR target/88224
2116 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
2117 (cortex-r7, cortex-r8): Update default and add new configuration.
2118 * doc/invoke.texi (armv7-r): Add two new vfp options.
2119 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
2120 support this option.
2121
2122 2018-11-29 Alan Modra <amodra@gmail.com>
2123
2124 * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
2125 double split for targets other than Darwin.
2126
2127 2018-11-29 Alan Modra <amodra@gmail.com>
2128
2129 * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
2130
2131 2018-11-29 Alan Modra <amodra@gmail.com>
2132
2133 * config/rs6000/predicates.md (easy_fp_constant): Remove code
2134 dealing with integers in const_double. Assert on unexpected
2135 modes. Delete superfluous ABI_V4 test.
2136 * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
2137 Don't call easy_fp_constant for Pmode.
2138 (rs6000_hash_constant): Remove code dealing with integers in
2139 const_double.
2140 (rs6000_legitimate_constant_p): Likewise.
2141 (output_toc): Formatting, use CONST_DOUBLE_P.
2142
2143 2018-11-29 Alan Modra <amodra@gmail.com>
2144
2145 * config/rs6000/constraints.md (G, H): Comment on purpose of
2146 constraint. Correct mode comments and "G" mode test.
2147 * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
2148 alternative handling "F". Add length attr. Formatting.
2149 (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
2150 alternative, and move "F" to separate alternative. Correct
2151 insn lengths.
2152
2153 2018-11-29 Alan Modra <amodra@gmail.com>
2154
2155 * config/rs6000/predicates.md (easy_vector_constant): Don't call
2156 easy_fp_constant.
2157
2158 2018-11-29 Alan Modra <amodra@gmail.com>
2159
2160 * config.in (HAVE_AS_PLTSEQ): Add.
2161 * config/rs6000/predicates.md (indirect_call_operand): New.
2162 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
2163 (rs6000_sibcall_sysv): Declare.
2164 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
2165 CALL_LONG for -fno-plt.
2166 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
2167 (rs6000_indirect_call_template_1): Emit .reloc directives for
2168 UNSPEC_PLTSEQ calls.
2169 (rs6000_pltseq_template): New function.
2170 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
2171 relocs supported by assembler. Move SYMBOL_REF test to callers.
2172 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
2173 insns in UNSPEC_PLTSEQ, preserving original func_desc.
2174 (rs6000_call_sysv): Likewise.
2175 (rs6000_sibcall_sysv): New function.
2176 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
2177 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
2178 UNSPEC_PLT16_LO): New.
2179 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
2180 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
2181 cookie in constraints. Test explicitly for flags in length attr.
2182 Handle unspec operand 1.
2183 (call_value_indirect_nonlocal_sysv): Likewise.
2184 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
2185 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
2186 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
2187 (sibcall_indirect_nonlocal_sysv): New pattern.
2188 (sibcall_value_indirect_nonlocal_sysv): Likewise.
2189 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
2190 call alternatives.
2191 * configure.ac: Check for gas plt sequence marker support.
2192 * configure: Regenerate.
2193
2194 2018-11-29 Alan Modra <amodra@gmail.com>
2195
2196 * config/rs6000/predicates.md (unspec_tls): New.
2197 * config/rs6000/rs6000-protos.h (rs6000_call_template),
2198 (rs6000_sibcall_template): Update prototype.
2199 (rs6000_longcall_ref): Delete.
2200 (rs6000_call_sysv): Declare.
2201 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
2202 (global_tlsarg): New variable.
2203 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
2204 handling.
2205 (print_operand): Extract UNSPEC_TLSGD address operand.
2206 (rs6000_call_template, rs6000_sibcall_template): Remove arg
2207 parameter, extract from second call operand instead.
2208 (rs6000_longcall_ref): Make static, localize vars.
2209 (rs6000_call_aix): Rename parameter to reflect new usage. Take
2210 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
2211 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
2212 tlsarg from global_tlsarg.
2213 (rs6000_call_sysv): New function.
2214 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
2215 rs6000_sibcall_template throughout.
2216 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
2217 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
2218 (tls_gdld_nomark): New insn.
2219 (tls_gd): Swap operand order. Simplify mode selection.
2220 (tls_gd_high, tls_gd_low): Swap operand order.
2221 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
2222 Simplify mode selection.
2223 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
2224 (call, call_value): Don't assert for second call operand.
2225 Use rs6000_call_sysv.
2226
2227 2018-11-29 Alan Modra <amodra@gmail.com>
2228
2229 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
2230 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
2231 (call_value_nonlocal_darwin64): Remove constraints from second call
2232 arg, the rounded_stack_size_rtx arg.
2233 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
2234 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
2235 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
2236 (call_value_local64, call_indirect_nonlocal_sysv),
2237 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
2238 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
2239 (call_value_nonlocal_sysv_secure, call_local_aix),
2240 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
2241 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
2242 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
2243 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
2244 (sibcall_value_aix): Likewise.
2245
2246 2018-11-29 Alan Modra <amodra@gmail.com>
2247
2248 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
2249 with P throughout except for call mems which should use SI.
2250 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
2251 attributes. Replace with bits, mode and ptrload respectively.
2252
2253 2018-11-29 Alan Modra <amodra@gmail.com>
2254
2255 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
2256 (rs6000_indirect_sibcall_template): Declare.
2257 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
2258 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
2259 New functions.
2260 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
2261 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
2262 (call_indirect_aix, call_value_indirect_aix): Use
2263 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
2264 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
2265 handle both speculation and non-speculation cases.
2266 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
2267 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
2268
2269 2018-11-29 Alan Modra <amodra@gmail.com>
2270
2271 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
2272 (rs6000_sibcall_template): Declare.
2273 (macho_call_template): Rename from output_call.
2274 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
2275 (rs6000_call_template, rs6000_sibcall_template): Likewise.
2276 (macho_call_template): Rename from output_call.
2277 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
2278 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
2279 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
2280 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
2281 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
2282 (call_value_nonlocal_aix): Use rs6000_call_template and update
2283 occurrences of output_call to macho_call_template.
2284 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
2285 (sibcall_value_aix): Use rs6000_sibcall_template.
2286
2287 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2288
2289 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
2290 we determine if unaligned vsx is ok.
2291
2292 2018-11-28 Jan Hubicka <jh@suse.cz>
2293
2294 * predict.c (determine_unlikely_bbs): Forward declare; also determine
2295 edges that are always known to be taken because it is only likely
2296 edge out of given BB.
2297 (tree_estimate_probability): Call before profile guessing to get bit
2298 of extra precision.
2299
2300 2018-11-28 Jan Hubicka <jh@suse.cz>
2301
2302 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
2303 profile_probability::always better.
2304
2305 2018-11-28 Jan Hubicka <jh@suse.cz>
2306
2307 * profile-count.h (profile_count::split): Give better result when
2308 splitting profile_probability::always.
2309
2310 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
2311
2312 PR target/88207
2313 * ira-costs.c (scan_one_insn): Process subregs when updating costs
2314 for pseudos and allocnos from insn.
2315
2316 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
2317
2318 * config/rs6000/aix72.h: Update to match aix71.h changes.
2319
2320 2018-11-28 Jeff Law <law@redhat.com>
2321
2322 * config/h8300/constraints.md: Add "C" constraint for call insns.
2323 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
2324 and define_insn pair. Move invalid call targets into a register in
2325 the expander and fix constraints in the matching pattern.
2326 * config/h8300/predicates.md (call_expander_operand): Renamed from
2327 call_insn_operand. Reject things we shouldn't be trying to handle.
2328 (call_insn_operand): New predicate for use by the call/call_value
2329 insns.
2330 (small_call_insn_operand): Update appropriately.
2331
2332 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2333
2334 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
2335 calls to strtok with strtok_r.
2336
2337 2018-11-28 Richard Biener <rguenther@suse.de>
2338
2339 PR tree-optimization/88223
2340 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
2341 over a stored-same value may-alias store make sure to consider
2342 partial overlaps which are valid when TBAA reasonings do not
2343 apply and byte-granular overlaps are possible at all.
2344
2345 2018-11-28 Richard Biener <rguenther@suse.de>
2346
2347 PR tree-optimization/88217
2348 * vr-values.c (vr_values::extract_range_from_phi_node): Make
2349 sure to handle results > +INF and < -INF correctly when
2350 trying to drop down to +INF - 1 or -INF + 1.
2351
2352 2018-11-28 Alan Modra <amodra@gmail.com>
2353
2354 * xcoffout.c (do_block): Signed/unsigned warning fix.
2355
2356 2018-11-28 Richard Biener <rguenther@suse.de>
2357
2358 PR tree-optimization/79351
2359 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
2360 empty CONSTRUCTORs ensure the store is at a constant position.
2361
2362 2018-11-28 Richard Biener <rguenther@suse.de>
2363
2364 PR tree-optimization/88229
2365 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
2366 is an INTEGER_CST before accessing it so.
2367
2368 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2369
2370 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
2371
2372 2018-11-28 Jakub Jelinek <jakub@redhat.com>
2373
2374 PR target/88189
2375 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
2376 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
2377 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
2378
2379 2018-11-27 Martin Liska <mliska@suse.cz>
2380
2381 * gcov.c (generate_results): Append current_working_directory
2382 only when exists.
2383
2384 2018-11-27 Mike Gulick <mgulick@mathworks.com>
2385
2386 PR preprocessor/83173
2387 * input.c (dump_location_info): Dump reason and included_from
2388 fields from line_map_ordinary struct. Fix indentation when
2389 location > 5 digits.
2390 * diagnostic-show-locus.c (num_digits, num_digits): Move to
2391 diagnostic.c to allow it to be utilized by input.c.
2392 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
2393 here.
2394 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
2395 * diagnostic.h (num_digits): Add extern definition.
2396
2397 2018-11-27 Fredrik Noring <noring@nocrew.org>
2398
2399 * config/mips/mips.c (mips_reorg_process_insns)
2400 (mips_option_override): Handle `-mfix-r5900'.
2401 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
2402 `mno-fix-r5900'.
2403 * config/mips/mips.opt (mfix-r5900): New option.
2404 * doc/invoke.texi: Document the `r5900' processor name, and
2405 `-mfix-r5900' and `-mno-fix-r5900' options.
2406
2407 2018-11-27 Jakub Jelinek <jakub@redhat.com>
2408
2409 PR target/88188
2410 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
2411 output_operand_lossage instead of gcc_assert.
2412 <case 't'>: Likewise.
2413 <case 'z'>: Likewise.
2414 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
2415
2416 2018-11-27 Jeff Law <law@redhat.com>
2417
2418 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
2419 in call to move_by_pieces.
2420
2421 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
2422 to move_by_pieces.
2423
2424 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
2425 call to move_by_pieces.
2426
2427 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
2428 in call to move_by_pieces.
2429
2430 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
2431 RETURN_BEGIN in call to move_by_pieces.
2432 (microblaze_expand_block_move): Likewise.
2433
2434 2018-11-27 Tamar Christina <tamar.christina@arm.com>
2435
2436 * doc/md.texi (xorsign): Document it.
2437
2438 2018-11-27 Martin Liska <mliska@suse.cz>
2439
2440 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
2441 * gcc.c (find_fortran_preinclude_file): New function
2442 to handle Fortran pre-include.
2443
2444 2018-11-27 Martin Liska <mliska@suse.cz>
2445
2446 * asan.c (asan_emit_stack_protection): Use new enum values
2447 instead of int constants.
2448 * builtins.c (expand_builtin_memory_copy_args): Replace int
2449 type with memop_ret enum type.
2450 (expand_builtin_mempcpy_args): Likewise.
2451 (expand_builtin_memcpy): Use new enum values
2452 instead of int constants. Likewise.
2453 (expand_builtin_mempcpy): Likewise.
2454 (expand_movstr): Likewise.
2455 (expand_builtin_strcpy_args): Likewise.
2456 (expand_builtin_stpcpy_1): Likewise.
2457 (expand_builtin_strncpy): Likewise.
2458 (expand_builtin_memset_args): Likewise.
2459 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
2460 (move_by_pieces_d::finish_retmode): ... this.
2461 (move_by_pieces): Change last argument type to memop_ret.
2462 (store_by_pieces): Use new enum values
2463 instead of int constants.
2464 (emit_block_move_hints): Likewise.
2465 (emit_push_insn): Likewise.
2466 (store_expr): Likewise.
2467 * expr.h (store_by_pieces): Change int to newly added enum
2468 type.
2469 * rtl.h (enum memop_ret): Define.
2470 (move_by_pieces): Use the enum type.
2471
2472 2018-11-27 Alan Modra <amodra@gmail.com>
2473
2474 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
2475 cpu here.
2476 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
2477 form. Error on missing -mcpu case.
2478 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
2479 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
2480 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
2481 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
2482 else if .. specs form. Error on missing -mcpu case. Don't output
2483 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
2484
2485 2018-11-26 David Malcolm <dmalcolm@redhat.com>
2486
2487 * dump-context.h (dump_context::dump_loc): Convert 1st param from
2488 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2489 const dump_location_t & to const dump_user_location_t &.
2490 (dump_context::dump_loc_immediate): Convert 2nd param from
2491 const dump_location_t & to const dump_user_location_t &.
2492 (dump_context::dump_gimple_stmt): Convert 1st param from
2493 dump_flags_t to const dump_metadata_t &.
2494 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2495 2nd param from const dump_location_t & to
2496 const dump_user_location_t &.
2497 (dump_context::dump_gimple_expr): Convert 1st param from
2498 dump_flags_t to const dump_metadata_t &.
2499 (dump_context::dump_gimple_expr_loc): Likewise; convert
2500 2nd param from const dump_location_t & to
2501 const dump_user_location_t &.
2502 (dump_context::dump_generic_expr): Convert 1st param from
2503 dump_flags_t to const dump_metadata_t &.
2504 (dump_context::dump_generic_expr_loc): Likewise; convert
2505 2nd param from const dump_location_t & to
2506 const dump_user_location_t &.
2507 (dump_context::dump_printf_va): Convert 1st param from
2508 dump_flags_t to const dump_metadata_t &.
2509 (dump_context::dump_printf_loc_va): Likewise; convert
2510 2nd param from const dump_location_t & to
2511 const dump_user_location_t &.
2512 (dump_context::dump_dec): Convert 1st param from
2513 dump_flags_t to const dump_metadata_t &.
2514 (dump_context::dump_symtab_node): Likewise.
2515 (dump_context::begin_scope): Split out 2nd param into
2516 user and impl locations.
2517 (dump_context::ensure_pending_optinfo): Add metadata param.
2518 (dump_context::begin_next_optinfo): Replace dump_location_t param
2519 with metadata and user location.
2520 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
2521 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2522 const dump_location_t & to const dump_user_location_t &.
2523 (dump_context::dump_loc_immediate): Convert 2nd param from
2524 const dump_location_t & to const dump_user_location_t &.
2525 (dump_context::dump_gimple_stmt): Convert 1st param from
2526 dump_flags_t to const dump_metadata_t &.
2527 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2528 2nd param from const dump_location_t & to
2529 const dump_user_location_t &.
2530 (dump_context::dump_gimple_expr): Convert 1st param from
2531 dump_flags_t to const dump_metadata_t &.
2532 (dump_context::dump_gimple_expr_loc): Likewise; convert
2533 2nd param from const dump_location_t & to
2534 const dump_user_location_t &.
2535 (dump_context::dump_generic_expr): Convert 1st param from
2536 dump_flags_t to const dump_metadata_t &.
2537 (dump_context::dump_generic_expr_loc): Likewise; convert
2538 2nd param from const dump_location_t & to
2539 const dump_user_location_t &.
2540 (dump_context::dump_printf_va): Convert 1st param from
2541 dump_flags_t to const dump_metadata_t &.
2542 (dump_context::dump_printf_loc_va): Likewise; convert
2543 2nd param from const dump_location_t & to
2544 const dump_user_location_t &.
2545 (dump_context::dump_dec): Convert 1st param from
2546 dump_flags_t to const dump_metadata_t &.
2547 (dump_context::dump_symtab_node): Likewise.
2548 (dump_context::begin_scope): Split out 2nd param into
2549 user and impl locations.
2550 (dump_context::ensure_pending_optinfo): Add metadata param.
2551 (dump_context::begin_next_optinfo): Replace dump_location_t param
2552 with metadata and user location.
2553 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2554 const dump_metadata_t &.
2555 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2556 const dump_location_t & to const dump_user_location_t &.
2557 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2558 const dump_metadata_t &.
2559 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2560 const dump_location_t & to const dump_user_location_t &.
2561 (dump_generic_expr): Convert 1st param from dump_flags_t to
2562 const dump_metadata_t &.
2563 (dump_generic_expr_loc): Likewise; convert 2nd param from
2564 const dump_location_t & to const dump_user_location_t &.
2565 (dump_printf): Convert 1st param from dump_flags_t to
2566 const dump_metadata_t &.
2567 (dump_printf_loc): Likewise; convert 2nd param from
2568 const dump_location_t & to const dump_user_location_t &.
2569 (dump_dec): Convert 1st param from dump_flags_t to
2570 const dump_metadata_t &.
2571 (dump_symtab_node): Likewise.
2572 (dump_begin_scope): Split out 2nd param into user and impl
2573 locations.
2574 (selftest::assert_impl_location_eq): New function.
2575 (ASSERT_IMPL_LOCATION_EQ): New macro.
2576 (selftest::test_impl_location): Update to use
2577 ASSERT_IMPL_LOCATION_EQ.
2578 (selftest::test_capture_of_dump_calls): Convert "loc" to
2579 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
2580 verifying line numbers of dump emissions.
2581 * dumpfile.h (class dump_metadata_t): New class.
2582 (dump_printf): Convert 1st param from dump_flags_t to
2583 const dump_metadata_t &.
2584 (dump_printf_loc): Likewise; convert 2nd param from
2585 const dump_location_t & to const dump_user_location_t &.
2586 (dump_generic_expr_loc): Likewise.
2587 (dump_generic_expr): Convert 1st param from dump_flags_t to
2588 const dump_metadata_t &.
2589 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2590 const dump_location_t & to const dump_user_location_t &.
2591 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2592 const dump_metadata_t &.
2593 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2594 const dump_location_t & to const dump_user_location_t &.
2595 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2596 const dump_metadata_t &.
2597 (dump_symtab_node): Likewise.
2598 (dump_dec): Likewise.
2599 (dump_begin_scope): Split out 2nd param into user and impl
2600 locations.
2601 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
2602 location and impl_location, and capture the impl_location.
2603 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
2604 * loop-unroll.c (report_unroll): Update for changes to
2605 dump_printf_loc and dump_printf.
2606 * opt-problem.cc (opt_problem::opt_problem): Update for change to
2607 dump_loc.
2608 * optinfo-emit-json.cc
2609 (selftest::test_building_json_from_dump_calls): Convert "loc" from
2610 dump_location_t to dump_user_location_t.
2611 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
2612 dump_loc_immediate.
2613 * profile.c (compute_branch_probabilities): Update for change to
2614 dump_printf_loc.
2615 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
2616 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
2617 dump_printf_loc.
2618
2619 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2620
2621 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
2622 and check_effective_target_ptr_eq_long.
2623
2624 2018-11-27 Alan Modra <amodra@gmail.com>
2625
2626 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
2627 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
2628 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
2629 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
2630 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
2631 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
2632 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2633 (ASM_APP_ON, ASM_APP_OFF): Don't define.
2634 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2635 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2636 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2637 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
2638 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2639 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2640 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
2641 (GNU_USER_TARGET_CRTN): Redefine.
2642 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
2643 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
2644 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
2645 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
2646 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
2647 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
2648 (LINK_EH_SPEC): Don't define.
2649
2650 2018-11-26 Martin Sebor <msebor@redhat.com>
2651
2652 PR 87756
2653 * expr.c (string_constant): Handle top-level decls of all character
2654 types and subobjects of narrow character type.
2655
2656 2018-11-27 Alan Modra <amodra@gmail.com>
2657
2658 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
2659 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
2660 GNU_USER_TARGET_OS_CPP_BUILTINS.
2661 (RS6000_ABI_NAME): Define.
2662 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
2663 GNU_USER_TARGET_OS_CPP_BUILTINS.
2664 (MUSL_DYNAMIC_LINKER32): Undef before defining.
2665 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
2666 (CHOOSE_DYNAMIC_LINKER): Don't define.
2667 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
2668 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
2669 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
2670 not already defined.
2671 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
2672 TARGET_OS_CPP_BUILTINS.
2673
2674 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2675
2676 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
2677
2678 2018-11-26 Jakub Jelinek <jakub@redhat.com>
2679
2680 PR target/88195
2681 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
2682 and !TARGET_64BIT, return NULL_TREE.
2683
2684 PR c++/86900
2685 * dwarf2out.c (secname_for_decl): For functions with
2686 DECL_SECTION_NAME if in_cold_section_p, try to return
2687 current_function_section's name if it is a named section.
2688
2689 2018-11-26 Maya Rashish <coypu@sdf.org>
2690
2691 PR target/58397
2692 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
2693 * config/x-netbsd: New file.
2694 * config/host-netbsd: New file.
2695
2696 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2697
2698 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
2699 Clarify documentation for check_effective_target_size32plus.
2700
2701 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2702
2703 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
2704 and modify expand_strncmp_vec_sequence.
2705 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
2706 (generate_6432_conversion): New function.
2707 (expand_block_compare): Add support for vsx.
2708 (expand_block_compare_gpr): New function.
2709 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
2710 default limit to 63 because of more compact vsx code.
2711
2712 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
2713
2714 PR target/88178
2715 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
2716 for registers for which no debug information can be generated.
2717 Use INVALID_REGNUM for non-existent registers.
2718 (dbx64_register_map): Ditto.
2719 (svr4_dbx_register_map): Ditto.
2720
2721 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
2722
2723 PR c/57182
2724 * doc/invoke.texi (Optimize Options): Document that
2725 -freorder-functions also uses "hot" and "cold" attributes.
2726
2727 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2728
2729 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
2730
2731 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2732
2733 * config/arm/types.md (mul64): Rename to...
2734 (widen_mul64): ... This.
2735 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
2736 * config/arm/cortex-a15.md: Likewise.
2737 * config/arm/cortex-a5.md: Likewise.
2738 * config/arm/cortex-a53.md: Likewise.
2739 * config/arm/cortex-a57.md: Likewise.
2740 * config/arm/cortex-a7.md: Likewise.
2741 * config/arm/cortex-m4.md: Likewise.
2742 * config/arm/exynos-m1.md: Likewise.
2743 * config/arm/marvell-pj4.md: Likewise.
2744 * config/arm/xgene1.md: Likewise.
2745
2746 2018-11-26 Richard Biener <rguenther@suse.de>
2747
2748 PR tree-optimization/88182
2749 * tree-vect-loop.c (vectorizable_reduction): Pick up single
2750 correct reduc_def_info.
2751 * tree-vect-slp.c (vect_analyze_slp_instance): Set
2752 STMT_VINFO_REDUC_DEF of the first stmt.
2753
2754 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2755
2756 * doc/invoke.texi: Document z14/arch12 -march option.
2757
2758 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2759
2760 PR c/57166
2761 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
2762 (Warning Options): Likewise.
2763
2764 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2765
2766 PR web/79738
2767 * doc/extend.texi (Common Function Attributes): Clarify that
2768 functions with "const" attribute can read const global variables.
2769
2770 2018-11-26 Alan Modra <amodra@gmail.com>
2771
2772 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
2773
2774 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2775
2776 PR other/54265
2777 * doc/extend.texi (Common Variable Attributes): Use preferred
2778 placement of type attributes in examples, plus whitespace fixes.
2779 (Type Attributes): Clarify why placement of attributes
2780 immediately after struct/union/enum keyword is preferred.
2781 (Common Type Attributes): Use preferred placement of type
2782 attributes in examples, plus more whitespace fixes.
2783
2784 2018-11-25 Paul Koning <ni1d@arrl.net>
2785
2786 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
2787
2788 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2789
2790 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
2791 attributes): Document d_runtime.
2792
2793 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
2794
2795 PR bootstrap/88157
2796 * ira-costs.c (record_operand_costs): Initiate register move cost
2797 for mode.
2798
2799 2018-11-23 Jeff Law <law@redhat.com>
2800
2801 PR rtl-optimization/87468
2802 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
2803 EDGE_IGNORE on all outgoing edges of the duplicate block.
2804
2805 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
2806
2807 PR bootstrap/88157
2808 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
2809 its mode does not fit to the original class.
2810
2811 2018-11-23 Martin Sebor <msebor@redhat.com>
2812
2813 PR tree-optimization/87756
2814 * expr.c (string_constant): Synthesize a string literal from
2815 the address of a constant character.
2816 * tree.c (build_string_literal): Add an argument.
2817 * tree.h (build_string_literal): Same.
2818
2819 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2820
2821 * config/aarch64/aarch64-cores.def: Define emag.
2822 * config/aarch64/aarch64-tune.md: Regenerated with emag.
2823 * config/aarch64/aarch64.c (emag_tunings): New struct.
2824 * doc/invoke.texi: Document mtune value.
2825
2826 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2827 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2828
2829 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
2830 for GCC 9.
2831 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
2832 prefetch tunings.
2833 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
2834 costs.
2835 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
2836 for XGene1.
2837
2838 2018-11-23 Richard Biener <rguenther@suse.de>
2839
2840 PR tree-optimization/88149
2841 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
2842 the case where there are two different def types for the
2843 same operand at different operand position in the same stmt.
2844
2845 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
2846
2847 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
2848 gen_atomic_compare_swap_1.
2849 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
2850 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
2851 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
2852 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
2853 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
2854 checks.
2855 * config/arm/arm.md (neon_vext<mode>),
2856 (neon_vrev64<mode>, neon_vrev32<mode>),
2857 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
2858 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
2859 before the pattern name.
2860 * config/arm/sync.md:
2861 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
2862 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
2863
2864 2018-11-23 Jakub Jelinek <jakub@redhat.com>
2865
2866 PR tree-optimization/86614
2867 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
2868 if TREE_NO_WARNING is set on ref.ref.
2869
2870 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
2871 Alan Coopersmith <alan.coopersmith@oracle.com>
2872
2873 PR c/53608
2874 * doc/extend.texi (Designated Inits): Clarify handling of multiple
2875 initializers for unions.
2876
2877 2018-11-22 Jan Hubicka <jh@suse.cz>
2878
2879 PR lto/88142
2880 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
2881 parameters; do not warn here.
2882 (odr_subtypes_equivalent_p): Likewise.
2883 (warn_odr): Fix typo.
2884 (warn_types_mismatch): Do not output confused warnings on integer types.
2885 (odr_types_equivalent_p): Update.
2886
2887 2018-11-22 Jakub Jelinek <jakub@redhat.com>
2888
2889 * config/i386/i386.c (ix86_option_override_internal,
2890 ix86_can_inline_p, classify_argument, construct_container,
2891 ix86_expand_prologue, ix86_expand_split_stack_prologue,
2892 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
2893 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
2894 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
2895 Formatting fixes.
2896
2897 * config/i386/i386.c (ix86_option_override_internal): For
2898 stack_protector_guard related options, use opts_set->x_ instead
2899 of global_options_set. and prefix options with opts->x_ . Move
2900 defaults for offset and reg into else block.
2901
2902 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
2903
2904 * config/i386/i386.c (ix86_check_avx_upper_register):
2905 Return true for all SSE registers with mode bitsize > 128.
2906
2907 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
2908
2909 PR rtl-optimization/87718
2910 * ira-costs.c: Remove trailing white-spaces.
2911 (record_operand_costs): Add a special treatment for moves
2912 involving a hard register.
2913
2914 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
2915
2916 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
2917 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
2918
2919 2018-11-22 Martin Liska <mliska@suse.cz>
2920
2921 * common/config/i386/i386-common.c (processor_names): Add
2922 static assert and add missing "znver2".
2923 (ix86_get_valid_option_values): Add checking assert for null
2924 values and add "native" value if feasible.
2925 * config/i386/i386.h: Do not declare size of processor_names.
2926 * common/config/i386/i386-common.c:
2927 * config/i386/i386.c: Add static assert for size
2928 of processor_cost_table.
2929
2930 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2931
2932 * target-insns.def (stack_protect_combined_set): Define new standard
2933 pattern name.
2934 (stack_protect_combined_test): Likewise.
2935 * cfgexpand.c (stack_protect_prologue): Try new
2936 stack_protect_combined_set pattern first.
2937 * function.c (stack_protect_epilogue): Try new
2938 stack_protect_combined_test pattern first.
2939 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
2940 parameters to control which register to use as PIC register and force
2941 reloading PIC register respectively. Insert in the stream of insns if
2942 possible.
2943 (legitimize_pic_address): Expose above new parameters in prototype and
2944 adapt recursive calls accordingly. Use pic_reg if non null instead of
2945 cached one.
2946 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
2947 (arm_legitimize_address): Adapt to new legitimize_pic_address
2948 prototype.
2949 (thumb_legitimize_address): Likewise.
2950 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
2951 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
2952 (thumb1_expand_prologue): Likewise.
2953 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
2954 change.
2955 (arm_load_pic_register): Likewise.
2956 * config/arm/predicated.md (guard_addr_operand): New predicate.
2957 (guard_operand): New predicate.
2958 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
2959 prototype change.
2960 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
2961 prototype change.
2962 (stack_protect_combined_set): New expander..
2963 (stack_protect_combined_set_insn): New insn_and_split pattern.
2964 (stack_protect_set_insn): New insn pattern.
2965 (stack_protect_combined_test): New expander.
2966 (stack_protect_combined_test_insn): New insn_and_split pattern.
2967 (arm_stack_protect_test_insn): New insn pattern.
2968 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
2969 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
2970 (UNSPEC_SP_TEST): Likewise.
2971 * doc/md.texi (stack_protect_combined_set): Document new standard
2972 pattern name.
2973 (stack_protect_set): Clarify that the operand for guard's address is
2974 legal.
2975 (stack_protect_combined_test): Document new standard pattern name.
2976 (stack_protect_test): Clarify that the operand for guard's address is
2977 legal.
2978
2979 2018-11-22 Richard Biener <rguenther@suse.de>
2980
2981 PR tree-optimization/88148
2982 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
2983 valueization callback parameter and handle it.
2984 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
2985 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
2986
2987 2018-11-22 Richard Biener <rguenther@suse.de>
2988
2989 PR lto/87229
2990 PR lto/88112
2991 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
2992 which can appear in size expressions.
2993 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
2994 CALL_EXPR_BY_DESCRIPTOR.
2995 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
2996 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
2997 CALL_EXPR_BY_DESCRIPTOR.
2998 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
2999
3000 Revert
3001 PR lto/87229
3002 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3003 sizepos values.
3004
3005 2018-11-22 Richard Biener <rguenther@suse.de>
3006
3007 PR tree-optimization/88069
3008 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
3009 apply to default defs.
3010
3011 2018-11-22 Jakub Jelinek <jakub@redhat.com>
3012
3013 PR target/85644
3014 PR target/86832
3015 * config/i386/i386.c (ix86_option_override_internal): Default
3016 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
3017 is defined.
3018 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
3019 stack_protect_test, stack_protect_test_<mode>): Use empty condition
3020 instead of TARGET_SSP_TLS_GUARD.
3021
3022 2018-11-22 Martin Liska <mliska@suse.cz>
3023
3024 PR sanitizer/88017
3025 * config/i386/i386.c (ix86_option_override_internal): Error
3026 about usage -mabi=ms and -fsanitize=thread.
3027
3028 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3029
3030 Revert the revert:
3031 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
3032
3033 Revert:
3034 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
3035
3036 * lra-spills.c (lra_final_code_change): Remove useless move insns.
3037
3038 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3039
3040 PR middle-end/88129
3041 * function.c (expand_function_end): Do not emit extra blockage insn.
3042
3043 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
3044
3045 PR target/85667
3046 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
3047 of FIRST_SSE_REG for 4 or 8 byte modes.
3048
3049 2018-11-21 Jan Hubicka <jh@suse.cz>
3050
3051 PR lto/87957
3052 * tree.c (fld_decl_context): Break out from ...
3053 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
3054 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
3055 (fld_incomplete_type_of): Build copy of TYP_DECL.
3056 * ipa-devirt.c (free_enum_values): Rename to ...
3057 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
3058 and TREE_TYPEs of TYPE_DECLs.
3059 (get_odr_type): Initialize odr_vtable_hash if needed.
3060
3061 2018-11-21 Alexandre Oliva <oliva@adacore.com>
3062
3063 * final.c (compute_discriminator): Declare. Renamed from...
3064 (maybe_set_discriminator): ... this. Set and return a local.
3065 (override_discriminator): New.
3066 (final_scan_insn_1): Set it.
3067 (notice_source_line): Adjust. Always set discriminator.
3068
3069 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3070
3071 PR target/87839
3072 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
3073 rIJ constraint for aarch64_plus_operand rather than rn.
3074
3075 2018-11-21 Renlin Li <renlin.li@arm.com>
3076
3077 PR middle-end/84877
3078 * explow.h (get_dynamic_stack_size): Declare it as external.
3079 * explow.c (record_new_stack_level): Remove function static attribute.
3080 * function.c (assign_stack_local_1): Dynamically align the stack slot
3081 addr for parameter copy on the stack.
3082
3083 2018-11-21 Richard Biener <rguenther@suse.de>
3084
3085 PR bootstrap/88133
3086 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
3087 * Makefile.in (bitmap.o-warn): Remove again.
3088
3089 2018-11-20 Jeff Law <law@redhat.com>
3090
3091 PR tree-optimization/88069
3092 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
3093 degenerate virtual PHIs.
3094
3095 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3096
3097 PR target/87317
3098 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
3099 nonimmediate_operand with register_operand.
3100 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
3101 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
3102 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
3103 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
3104 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
3105 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
3106 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
3107 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
3108 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
3109 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
3110 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
3111 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
3112 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
3113 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
3114 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
3115 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
3116 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
3117 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
3118 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
3119 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
3120 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
3121 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
3122 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
3123 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
3124 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
3125 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
3126 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
3127
3128 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3129
3130 * read-rtl.c (apply_subst_iterator): Handle define_split and
3131 define_insn_and_split.
3132
3133 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3134
3135 PR rtl-optimization/87817
3136 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
3137 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
3138 in the pattern to avoid triggering UB when operands[2] is zero.
3139 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
3140 (*tbm_bextri_<mode>): ... this.
3141
3142 2018-11-21 Tom de Vries <tdevries@suse.de>
3143
3144 PR driver/79855
3145 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
3146 period.
3147
3148 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
3149
3150 * configure.ac: Add check for Binutils to determine whether vector
3151 load/store alignments hints are being supported.
3152 * config.in: Regenerate.
3153 * configure: Regenerate.
3154 * config/s390/s390.c (print_operand): Support new output
3155 modifier A.
3156 * config/s390/s390.md ("movti"): Append alignment hint output
3157 using the new output modifier 'A'.
3158 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
3159 ("*vec_ti_to_v1ti"): Likewise.
3160
3161 2018-11-20 Martin Sebor <msebor@redhat.com>
3162
3163 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
3164
3165 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3166
3167 PR lto/84044
3168 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
3169 compare ENUM values.
3170
3171 2018-11-20 Jakub Jelinek <jakub@redhat.com>
3172
3173 PR tree-optimization/87895
3174 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
3175 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
3176 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
3177 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
3178 has any preds and always use EDGE_PRED (, 0).
3179
3180 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
3181
3182 PR target/88070
3183 * mode-switching.c (create_pre_exit): After reload, always split the
3184 fallthrough edge to the exit block.
3185
3186 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3187
3188 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
3189 * tree.c (build_array_type_1): Forward declare.
3190 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
3191 (fld_type_variant): Likewise.
3192 (fld_simplified_types): New hash.
3193 (fld_process_array_type): New function.
3194 (fld_incomplete_type_of): Handle array and enumeration types.
3195 (fld_simplified_type): Handle simplification of arrays.
3196 (free_lang_data): Allocate and free simplified types hash.
3197
3198 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3199
3200 PR lto/87957
3201 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
3202 when sybtype already violates ODR.
3203 (get_odr_type): Do not ICE when insert is false and type duplicate
3204 is not registered yet.
3205 (register_odr_type): Be sure to register subtypes first.
3206
3207 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
3208
3209 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
3210 DImode parts of the target operand.
3211
3212 2018-11-20 Nathan Sidwell <nathan@acm.org>
3213
3214 PR 87926
3215 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
3216
3217 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3218
3219 PR lto/87997
3220 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
3221 type checking to...
3222 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
3223
3224 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3225
3226 PR ipa/87706
3227 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
3228 * ipa.c (possible_inline_candidate_p): Break out from ..
3229 (process_references): ... here ; drop before_inlining_p;
3230 cleanup handling of alises.
3231 (walk_polymorphic_call_targets): Likewise.
3232 (symbol_table::remove_unreachable_nodes): Likewise.
3233 * passes.c (pass_data_ipa_remove_symbols): New structure.
3234 (pass_ipa_remove_symbols): New pass.
3235 (make_pass_ipa_remove_symbols): New function.
3236 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
3237 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
3238
3239 2018-11-20 Richard Biener <rguenther@suse.de>
3240
3241 * tree-vect-stmts.c (vectorizable_condition): Do not get
3242 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
3243 pointless vect_is_simple_use calls.
3244
3245 2018-11-20 Richard Biener <rguenther@suse.de>
3246
3247 PR tree-optimization/88074
3248 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
3249 backedges.
3250
3251 2018-11-20 Richard Biener <rguenther@suse.de>
3252
3253 PR tree-optimization/88069
3254 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
3255 virtual PHI arguments.
3256
3257 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
3258
3259 PR target/88083
3260 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
3261 involved.
3262 * rtl.h (contains_constant_pool_address_p): New function.
3263 * rtlanal.c (contains_constant_pool_address_p): Likewise.
3264
3265 2018-11-20 Richard Biener <rguenther@suse.de>
3266
3267 PR middle-end/83215
3268 * alias.c (component_uses_parent_alias_set_from): Remove
3269 alias-set zero and TYPE_TYPELESS_STORAGE case both already
3270 handled in other ways.
3271
3272 2018-11-20 Richard Biener <rguenther@suse.de>
3273
3274 PR tree-optimization/88087
3275 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
3276 call fntype.
3277 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
3278 call fntype.
3279
3280 2018-11-20 Richard Biener <rguenther@suse.de>
3281
3282 PR middle-end/88089
3283 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
3284
3285 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
3286
3287 PR lto/87957
3288 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
3289
3290 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
3291
3292 PR driver/50250
3293 * doc/invoke.texi (Link Options): Mention shared libraries
3294 in documentation for the -l option. Simplify discussion and
3295 point to the system linker documentation for details.
3296
3297 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
3298
3299 PR rtl-optimization/88033
3300 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
3301 to itself. Use HARD_REGISTER_NUM_P.
3302
3303 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3304
3305 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
3306 of the loop if vf is non-constant.
3307
3308 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3309
3310 PR tree-optimization/87025
3311 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
3312 immediately after creating the scope optinfo.
3313 (selftest::test_pr87025): New function.
3314 (selftest::dumpfile_c_tests): Call it.
3315 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
3316 that we're not popping the top-level records array.
3317 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
3318 not changing the kind of a "scope" optinfo.
3319
3320 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3321
3322 PR tree-optimization/87025
3323 * dump-context.h: Include "optinfo.h".
3324 (class optrecord_json_writer): New forward decl.
3325 (dump_context::forcibly_enable_optinfo_p): Delete.
3326 (dump_context::optinfo_enabled_p): New member function.
3327 (dump_context::optimization_records_enabled_p): New member
3328 function.
3329 (dump_context::set_json_writer): New member function.
3330 (dump_context::emit_optinfo): New member function.
3331 (dump_context::m_forcibly_enable_optinfo): Delete.
3332 (dump_context::m_json_writer): New member data.
3333 * dumpfile.c (dump_context::set_json_writer): New member function.
3334 (dump_context::finish_any_json_writer): New member function.
3335 (dump_context::end_scope): Replace call to
3336 optimization_records_maybe_pop_dump_scope with call to
3337 m_json_writer->pop_scope.
3338 (dump_context::optinfo_enabled_p): New member function.
3339 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
3340 to dump_context::emit_optinfo.
3341 (dump_context::emit_optinfo): New member function.
3342 (temp_dump_context::temp_dump_context): Replace
3343 m_forcibly_enable_optinfo with call to set_json_writer.
3344 (temp_dump_context::~temp_dump_context): Clean up any json writer.
3345 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
3346 optinfo-emit-json.h
3347 (the_json_writer): Delete.
3348 (optimization_records_start): Delete.
3349 (optimization_records_finish): Delete.
3350 (optimization_records_enabled_p): Delete, in favor of
3351 dump_context::optimization_records_enabled_p.
3352 (optimization_records_maybe_record_optinfo): Delete.
3353 (optimization_records_maybe_pop_dump_scope): Delete.
3354 * optinfo-emit-json.h: Include "json.h". Delete forward
3355 decl of opt_pass.
3356 (optimization_records_start): Delete.
3357 (optimization_records_finish): Delete.
3358 (optimization_records_enabled_p): Delete.
3359 (optimization_records_maybe_record_optinfo): Delete.
3360 (optimization_records_maybe_pop_dump_scope): Delete.
3361 (class optrecord_json_writer): Move here from
3362 optinfo-emit-json.cc.
3363 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
3364 to optinfo::emit with call to dump_context::emit_optinfo.
3365 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3366 (optinfo_enabled_p): Delete, in favor of
3367 dump_context::optinfo_enabled_p.
3368 (optinfo_wants_inlining_info_p): Update for conversion o
3369 optimization_records_enabled_p to a member function of
3370 dump_context.
3371 * optinfo.h (optinfo_enabled_p): Delete, in favor of
3372 dump_context::optinfo_enabled_p.
3373 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3374 * toplev.c: Include "dump-context.h".
3375 (compile_file): Replace call to optimization_records_finish with
3376 dump_context::finish_any_json_writer.
3377 (do_compile): Replace call to optimization_records_start with
3378 conditionally creating a optrecord_json_writer for the
3379 dump_context.
3380
3381 2018-11-19 Jakub Jelinek <jakub@redhat.com>
3382
3383 PR tree-optimization/88071
3384 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
3385 of false as last argument to gsi_remove.
3386 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
3387 false as last argument to gsi_replace.
3388
3389 PR debug/87039
3390 * omp-expand.c: Don't include debug.h.
3391 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
3392 from innermost outer parallel, task, teams or target that has a
3393 child_fn set, or, if there is no such outer region, use
3394 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
3395 whether a suitable BLOCK is found or not.
3396 (expand_parallel_call, expand_teams_call): Don't call
3397 adjust_context_and_scope here.
3398 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
3399 (expand_omp_taskreg, expand_omp_target): Likewise. Call
3400 adjust_context_and_scope.
3401 * dwarf2out.c (dwarf2out_early_global_decl): For
3402 decl_function_context recurse instead of calling dwarf2out_decl.
3403
3404 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
3405
3406 PR rtl-optimization/85925
3407 * rtl.h (word_register_operation_p): New predicate.
3408 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
3409 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
3410 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
3411 (num_sign_bit_copies1): Likewise.
3412
3413 2018-11-19 Richard Biener <rguenther@suse.de>
3414
3415 PR lto/87229
3416 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3417 sizepos values.
3418
3419 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
3420
3421 * compare-elim.c (struct comparison): Add not_in_a field.
3422 (is_not): New static function.
3423 (strip_not): Likewise.
3424 (conforming_compare): Handle a NOT in the first operand.
3425 (can_eliminate_compare): Likewise.
3426 (find_comparison_dom_walker::before_dom_children): Likewise.
3427 (try_eliminate_compare): Likewise.
3428 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
3429 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
3430
3431 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
3432
3433 * doc/extend.texi (Common Type Attributes): Fix typos.
3434
3435 2018-11-19 Martin Liska <mliska@suse.cz>
3436
3437 PR gcov-profile/88045
3438 * coverage.c (coverage_begin_function): Add assert.
3439
3440 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
3441
3442 PR other/40498
3443 * doc/extend.texi (Common Function Attributes): Document that
3444 no_instrument_function applies to -p and -pg, too.
3445 * doc/invoke.texi (Instrumentation Options): Add cross-references
3446 to docs for -p, -pg, and -finstrument-functions.
3447
3448 2018-11-18 Alan Modra <amodra@gmail.com>
3449
3450 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
3451 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
3452 (GNU_USER_TARGET_CRTN): Define.
3453 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
3454 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
3455
3456 2018-11-18 Alan Modra <amodra@gmail.com>
3457
3458 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
3459 !HAVE_LD_PIE variant.
3460 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
3461
3462 2018-11-17 Nick Clifton <nickc@redhat.com>
3463 Sandra Loosemore <sandra@codesourcery.com>
3464
3465 PR driver/31357
3466 * doc/invoke.texi (Overall Options): Document that --help and
3467 --help=<value> options cannot be combined.
3468
3469 2018-11-17 Jim Wilson <jimw@sifive.com>
3470
3471 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
3472 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
3473 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
3474 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
3475 to step2 if frame_pointer_needed and step1 is 0.
3476
3477 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3478
3479 PR c++/4225
3480 * doc/cpp.texi (System Headers): Add note about implicit
3481 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
3482
3483 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3484
3485 PR c++/4025
3486 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
3487 -fno-implicit-templates.
3488
3489 2018-11-17 Jakub Jelinek <jakub@redhat.com>
3490
3491 PR tree-optimization/87546
3492 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
3493 min_precision variable, initially set it to orig_precision, only does
3494 something if op_type's precision is <= min_precision and update
3495 min_precision whenever calling set_op.
3496
3497 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
3498
3499 PR ipa/87957
3500 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
3501
3502 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3503
3504 * doc/invoke.texi (Option Summary): Fix whitespace and line
3505 breaks in @gccoptlist environments.
3506 (Warning Options): Likewise.
3507 (Optimize Options): Likewise.
3508 (PowerPC SPE Options): Likewise.
3509 (RS/6000 and PowerPC Options): Likewise.
3510
3511 2018-11-16 Jeff Law <law@redhat.com>
3512
3513 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
3514 gcc_assert.
3515
3516 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3517
3518 PR middle-end/23197
3519 * doc/invoke.texi (Optimize Options): Update options enabled by
3520 fprofile-generate, -fprofile-use, and -fauto-profile.
3521
3522 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3523
3524 PR target/87927
3525 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
3526 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
3527 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
3528 the byte_op hook.
3529 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
3530 * targhooks.c (default_print_patchable_function_entry): Assert
3531 asm_int_op does not return a NULL string.
3532 * varasm.c (integer_asm_op): Return the op for a partial int type
3533 when the requested size does not correspond to an integer type.
3534 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
3535 * doc/tm.texi: Regenerate.
3536
3537 2018-11-12 Jason Merrill <jason@redhat.com>
3538
3539 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
3540
3541 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
3542
3543 * config/rs6000/constraints.md (wF constraint): Remove power9
3544 fusion documentation. Just document wF's use for power8 fusion.
3545 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
3546 (fusion_gpr_addis): Delete power9 fusion support. Change power8
3547 fusion support to require the upper 12 bits to be all 0's or all
3548 1's.
3549 (fusion_gpr_mem_load): Add comment.
3550 (fusion_addis_mem_combo_load): Remove power9 fusion support.
3551 (fusion_addis_mem_combo_store): Delete.
3552 (fusion_offsettable_mem_operand): Delete.
3553 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
3554 power8 fusion here.
3555 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
3556 (POWERPC_MASKS): Delete power9 fusion.
3557 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
3558 (fusion_p9_p): Delete.
3559 (expand_fusion_p9_load): Delete.
3560 (expand_fusion_p9_store): Delete.
3561 (emit_fusion_p9_load): Delete.
3562 (emit_fusion_p9_store): Delete.
3563 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
3564 fusion support.
3565 (rs6000_option_override_internal): Set power8 fusion based on
3566 whether we are tuning for power8. Delete power9 fusion support.
3567 (rs6000_opt_masks): Delete -mpower9-fusion switch.
3568 (emit_fusion_load): Rename emit_fusion_load_store to
3569 emit_fusion_load, and drop fusion store support. Update callers.
3570 (emit_fusion_load_store): Likewise.
3571 (emit_fusion_gpr_load): Likewise.
3572 (fusion_p9_p): Delete.
3573 (expand_fusion_p9_load): Delete.
3574 (expand_fusion_p9_store): Delete.
3575 (emit_fusion_p9_load): Delete.
3576 (emit_fusion_p9_store): Delete.
3577 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
3578 (GPR_FUSION): Delete.
3579 (FPR_FUSION): Delete.
3580 (power9 fusion peephole2s): Delete.
3581 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
3582 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
3583 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
3584 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
3585 (fusion_p9_<mode>_constant): Delete.
3586 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
3587 power9 fusion switch.
3588 * doc/md.texi (PowerPC constraints): Update wF constraint
3589 documentation for power8 fusion only.
3590
3591 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3592
3593 PR rtl-optimization/87475
3594 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
3595 CROSSING_JUMP_P insns.
3596 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
3597
3598 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
3599
3600 PR target/88051
3601 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
3602 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
3603 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
3604
3605 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3606
3607 PR middle-end/88032
3608 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
3609 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
3610
3611 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
3612
3613 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
3614 location_t parameter.
3615 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3616 (switch_decision_tree::do_jump_if_equal): Likewise.
3617 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
3618 of switch statement to emit_case_nodes.
3619 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
3620 set it on the newly built GIMPLE comparison statement.
3621 (switch_decision_tree::do_jump_if_equal): Likewise.
3622 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
3623 in calls to do_jump_if_equal as well as recursive calls.
3624
3625 2018-11-16 Andi Kleen <ak@linux.intel.com>
3626
3627 * config/i386/i386.md: Allow memory operands to ptwrite.
3628
3629 2018-11-16 Michael Matz <matz@suse.de>
3630
3631 * system.h (PRsa): New macro.
3632 (SIZE_AMOUNT): Cast number to uint64_t.
3633 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
3634 (pool_usage::dump_footer): Likewise and also use PRIu64.
3635 * bitmap.h (bitmap_usage::dump): Likewise.
3636 * ggc-common.c (ggc_usage::dump): Likewise.
3637 * ggc-page.c (ggc_print_statistics): Likewise.
3638 * input.c (dump_line_table_statistics): Likewise.
3639 * mem-stats.h (mem_usage::dump): Likewise.
3640 (mem_usage::dump_footer): Likewise.
3641 * rtl.c (dump_rtx_statistics): Likewise.
3642 * tree-cfg.c (dump_cfg_stats): Likewise.
3643 * tree-dfa.c (dump_dfa_stats): Likewise.
3644 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3645 * tree-ssanames (ssanames_print_statistics): Likewise.
3646 * vec.c (vec_usage::dump): Likewise.
3647 (vec_usage::dump_footer): Likewise.
3648
3649 2018-11-16 Richard Biener <rguenther@suse.de>
3650
3651 PR tree-optimization/88011
3652 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
3653 replacing set_value_range_to_undefined and
3654 set_value_range_to_varying with method calls.
3655
3656 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
3657
3658 * config/s390/s390.md
3659 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
3660 assembler.
3661 (*r<noxa>sbg_<mode>_sll): Likewise.
3662 (*r<noxa>sbg_<mode>_srl): Likewise.
3663 (*r<noxa>sbg_sidi_srl): New pattern.
3664
3665 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
3666
3667 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
3668 Default to TARGET_VXWORKS_RTP.
3669 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3670 of TARGET_VXWORKS_RTP.
3671 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3672 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
3673
3674 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3675
3676 PR c++/25759
3677 * doc/extend.texi (Common Type Attributes): Make it explicit
3678 that attribute "packed" can apply to C++ classes.
3679
3680 2018-11-15 Martin Sebor <msebor@redhat.com>
3681
3682 PR c++/87541
3683 PR c++/87542
3684 * tree.c (type_argument_type): New function.
3685 * tree.h (type_argument_type): Declare it.
3686 * gcc/doc/extend.texi (alloc_align): Update and clarify.
3687 (alloc_size, nonnull, sentinel): Same.
3688
3689 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
3690 Kwok Cheung Yeung <kcy@codesourcery.com>
3691
3692 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
3693 int_mode_for_size fails.
3694 (vectorizable_load): Likewise.
3695
3696 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3697
3698 * doc/ux.texi (Group logically-related diagnostics): Move
3699 discussion of auto_diagnostic_group into this new subsection.
3700 Give an example of where this grouping is used.
3701
3702 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3703
3704 PR other/19165
3705 * Makefile.in (OBJS): Move json.o to...
3706 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
3707 * common.opt (fdiagnostics-format=): New option.
3708 (diagnostics_output_format): New enum.
3709 * diagnostic-format-json.cc: New file.
3710 * diagnostic.c (default_diagnostic_final_cb): New function, taken
3711 from start of diagnostic_finish.
3712 (diagnostic_initialize): Initialize final_cb to
3713 default_diagnostic_final_cb.
3714 (diagnostic_finish): Move "being treated as errors" messages to
3715 default_diagnostic_final_cb. Call any final_cb.
3716 (default_diagnostic_finalizer): Add diagnostic_t param.
3717 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
3718 diagnostic_finalizer callback.
3719 * diagnostic.h (enum diagnostics_output_format): New enum.
3720 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
3721 (struct diagnostic_context): Add "final_cb".
3722 (default_diagnostic_finalizer): Add diagnostic_t param.
3723 (diagnostic_output_format_init): New decl.
3724 * doc/invoke.texi (-fdiagnostics-format): New option.
3725 * dwarf2out.c (gen_producer_string): Ignore
3726 OPT_fdiagnostics_format_.
3727 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
3728 * lto-wrapper.c (append_diag_options): Ignore it.
3729 * opts.c (common_handle_option): Handle it.
3730
3731 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3732
3733 PR tree-optimization/88015
3734 * graphite-isl-ast-to-gimple.c
3735 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
3736 for dump_enabled_p.
3737 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
3738
3739 2018-11-15 Richard Biener <rguenther@suse.de>
3740
3741 PR middle-end/88029
3742 * gimple.c (gimple_call_flags): Union flags from decl, type
3743 and call fntype.
3744 * trans-mem.c (is_tm_pure_call): Simplify.
3745
3746 2018-11-15 Richard Biener <rguenther@suse.de>
3747
3748 PR tree-optimization/88031
3749 * tree-vect-loop.c (vectorizable_reduction): Move check
3750 for multiple types earlier so we get the expected dump.
3751 Simplify calls to vectorizable_condition.
3752 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
3753 * tree-vect-stmts.c (vectorizable_condition): Instead of
3754 reduc_def and reduc_index take just a flag. Simplify
3755 code-generation now that we can rely on the defs being set up.
3756 (vectorizable_comparison): Remove unused argument.
3757
3758 2018-11-15 Richard Biener <rguenther@suse.de>
3759
3760 PR tree-optimization/88030
3761 * tree-complex.c (need_eh_cleanup): New global.
3762 (update_complex_assignment): Mark blocks that need EH update.
3763 (expand_complex_comparison): Likewise.
3764 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
3765 perform EH cleanup and schedule CFG cleanup if that did anything.
3766
3767 2018-11-15 Jakub Jelinek <jakub@redhat.com>
3768
3769 PR rtl-optimization/88018
3770 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
3771 on the presence of fallthru edge, rather than if it is a USE or not.
3772
3773 2018-11-15 Richard Biener <rguenther@suse.de>
3774
3775 PR middle-end/87917
3776 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
3777 analyze_subscript_affine_affine properly.
3778
3779 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
3780
3781 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
3782 (GLIBC_DYNAMIC_LINKER): Define.
3783 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
3784
3785 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3786
3787 PR tree-optimization/84648
3788 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
3789 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
3790 by calling adjust_cond_for_loop_until_wrap.
3791
3792 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3793
3794 PR other/56334
3795 * doc/extend.texi (Common Function Attributes): Clarify linker
3796 restrictions on "aligned" attribute.
3797 (Common Variable Attributes): Likewise. Mention that linker
3798 restrictions don't apply to stack-allocated variables.
3799
3800 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
3801
3802 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
3803 as an lvalue.
3804
3805 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3806
3807 PR lto/55102
3808 PR lto/56700
3809 * doc/invoke.texi (Optimize Options): Remove bad example about
3810 interaction between -flto and -O. Replace it with a note that
3811 you need to compile with -O and not just link. Copy-edit -flto
3812 discussion to reduce verbiage and improve flow.
3813
3814 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3815
3816 PR middle-end/59658
3817 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
3818 also suppress many optimizations. Alphabetize option lists for
3819 -O1, -O2, and -Os. Add list of options disabled with -Og, and
3820 correct documentation for those options to say that.
3821 * opts.c (default_options_table): Sort table by level and option
3822 name, to make it easier to correlate to the manual.
3823
3824 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
3825
3826 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
3827 printing of the names of segment registers.
3828
3829 2018-11-14 Nathan Sidwell <nathan@acm.org>
3830
3831 PR debug/88006
3832 PR debug/87462
3833 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
3834 type list.
3835
3836 2018-11-14 David Malcolm <dmalcolm@redhat.com>
3837
3838 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
3839
3840 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3841
3842 P1236R1 - Signed integers are two's complement
3843 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
3844
3845 PR bootstrap/86739
3846 * hash-map.h (hash_map::iterator::reference_pair): New class.
3847 (hash_map::iterator::operator*): Return it rather than std::pair.
3848
3849 2018-11-14 Jeff Law <law@redhat.com>
3850
3851 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
3852 iff the operand is a constant.
3853
3854 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
3855
3856 * gimple-ssa-evrp-analyze.c
3857 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
3858 ignore_equivs_equal_p to equal_p.
3859 * ipa-cp.c (meet_with_1): Use equal_p instead of
3860 ignore_equivs_equal_p.
3861 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
3862 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
3863 (value_range::operator==): Remove.
3864 (value_range::operator!=): Remove.
3865 (vrp_prop::visit_stmt): Use equal_p.
3866 * tree-vrp.h (value_range): Remove operator==, operator!=,
3867 ignore_equivs_equal_p.
3868 * vr-values.c (update_value_range): Use equal_p.
3869
3870 2018-11-14 Michael Matz <matz@suse.de>
3871
3872 PR middle-end/86575
3873 * gimplify.c (collect_fallthrough_labels): Add new argument,
3874 return location via that, don't modify statements.
3875 (warn_implicit_fallthrough_r): Adjust call, don't use
3876 statement location directly.
3877
3878 2018-11-14 Richard Biener <rguenther@suse.de>
3879
3880 PR middle-end/87985
3881 * tree-data-ref.c (split_constant_offset): Add wrapper
3882 allocating a cache hash-map.
3883 (split_constant_offset_1): Cache results of expanding
3884 expressions from SSA def stmts.
3885
3886 2018-11-14 Richard Biener <rguenther@suse.de>
3887
3888 PR middle-end/88021
3889 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
3890 to lambda_int.
3891 (lambda_vector_mult_const): Likewise.
3892 (lambda_matrix_right_hermite): Use lambda_int temporaries.
3893
3894 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
3895 Jackson Woodruff <jackson.woodruff@arm.com>
3896
3897 PR 71026/tree-optimization
3898 * match.pd: Simplify floating point comparisons.
3899
3900 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3901
3902 PR rtl-optimization/87817
3903 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
3904 last argument has low 8 bits clear, fold to 0.
3905
3906 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
3907
3908 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
3909 MAX_OFILE_ALIGNMENT as needed.
3910
3911 2018-11-14 Richard Biener <rguenther@suse.de>
3912
3913 PR tree-optimization/88019
3914 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
3915 COND_EXPR arguments to non-trapping overflow.
3916
3917 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
3918
3919 * config/arc/arc.h (reg_class): Reorder registers classes, remove
3920 unused register classes.
3921 (REG_CLASS_NAMES): Likewise.
3922 (REG_CLASS_CONTENTS): Likewise.
3923 (FIXED_REGISTERS): Make lp_count fixed.
3924 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
3925 (PROGRAM_COUNTER_REGNO): Remove.
3926 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
3927 register classes, use constants for register numbers, remove
3928 reg_class_contents references.
3929 (arc_process_double_reg_moves): Add asserts.
3930 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
3931 lra_in_progress predicate.
3932 (arc_init_reg_tables): Remove unused register classes.
3933 (arc_register_move_cost): Likewise.
3934 (arc_preferred_reload_class): Likewise.
3935 (hwloop_optimize): Update rtx patterns involving lp_count register.
3936 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
3937 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
3938 CHEAP_CORE_REGS. Former one will be used for LRA.
3939 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
3940 one will be used for LRA.
3941 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
3942 one will be used for LRA.
3943 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
3944 Former one will be used for LRA.
3945 ("f"): Delete constraint.
3946 ("k"): Likewise.
3947 ("e"): Likewise.
3948 ("l"): Change it from register constraint to constraint.
3949 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
3950 (movhi_insn): Likewise.
3951 (movsi_insn): Update pattern.
3952 (arc_lp): Likewise.
3953 (dbnz): Likewise.
3954 (stack_tie): Remove 'b' constraint letter.
3955 (R4_REG): Define.
3956 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
3957 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
3958 (R57_REG, R59_REG, PCL_REG): Likewise.
3959 (ILINK1_REGNUM): Renamed to ILINK1_REG.
3960 (ILINK2_REGNUM): Renamed to ILINK2_REG.
3961 (Rgp): Remove.
3962 (SP_REGS): Likewise.
3963 (Rcw): Remove unused reg classes.
3964 * config/arc/predicates.md (dest_reg_operand): Just default on
3965 register_operand predicate.
3966 (mpy_dest_reg_operand): Likewise.
3967 (move_dest_operand): Use macros instead of constants.
3968 * config/arc/arc.opt (mlra): Switch to lra as default.
3969
3970 2018-11-14 Richard Biener <rguenther@suse.de>
3971
3972 PR tree-optimization/87974
3973 * tree-vect-loop.c (vectorizable_reduction): When computing
3974 the vectorized reduction PHI vector type ignore constant
3975 and external defs.
3976
3977 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3978
3979 PR tree-optimization/87977
3980 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
3981 stmt, build a new one and replace the old one with it. Formatting fix.
3982 Call release_ssa_name (x) if !has_other_use and !delete_div.
3983 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
3984 verify lhs of stmt is still def.
3985
3986 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
3987
3988 PR rtl-optimization/87507
3989 * lower-subreg.c (operand_for_swap_move_operator): New function.
3990 (simple_move): Strip simple operators.
3991 (find_pseudo_copy): Likewise.
3992 (resolve_operand_for_swap_move_operator): New function.
3993 (resolve_simple_move): Strip simple operators and swap operands.
3994
3995 2018-11-13 Jakub Jelinek <jakub@redhat.com>
3996
3997 PR tree-optimization/87898
3998 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
3999 (ipa_simd_modify_function_body): Remove debug stmts where the first
4000 argument was changed into a non-decl.
4001
4002 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
4003
4004 PR rtl-optimization/87899
4005 * lra-lives.c (start_living): Update white space in comment.
4006 (enum point_type): New.
4007 (sparseset_contains_pseudos_p): New function.
4008 (update_pseudo_point): Likewise.
4009 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
4010 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
4011 handling. Move early exit after adding conflicts.
4012 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
4013 if regno is already live. Remove all handling of program points.
4014 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
4015 after adding conflicts. Remove all handling of program points and
4016 ignore_reg_for_conflicts.
4017 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
4018 and do not guard call to mark_pseudo_live.
4019 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
4020 and do not guard call to mark_pseudo_dead.
4021 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
4022 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
4023 Use new function update_pseudo_point. Handle register copies by
4024 removing the source register from the live set. Handle INOUT operands.
4025 Update to the next program point using the unused_set, dead_set and
4026 start_dying sets.
4027 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
4028
4029 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4030
4031 * builtins.c: Replace "source_location" with "location_t".
4032 * diagnostic-show-locus.c: Likewise.
4033 * diagnostic.c: Likewise.
4034 * dumpfile.c: Likewise.
4035 * gcc-rich-location.h: Likewise.
4036 * genmatch.c: Likewise.
4037 * gimple.h: Likewise.
4038 * gimplify.c: Likewise.
4039 * input.c: Likewise.
4040 * input.h: Likewise. Eliminate the typedef.
4041 * omp-expand.c: Likewise.
4042 * selftest.h: Likewise.
4043 * substring-locations.h (get_source_location_for_substring):
4044 Rename to...
4045 (get_location_within_string): ...this.
4046 * tree-cfg.c: Replace "source_location" with "location_t".
4047 * tree-cfgcleanup.c: Likewise.
4048 * tree-diagnostic.c: Likewise.
4049 * tree-into-ssa.c: Likewise.
4050 * tree-outof-ssa.c: Likewise.
4051 * tree-parloops.c: Likewise.
4052 * tree-phinodes.c: Likewise.
4053 * tree-phinodes.h: Likewise.
4054 * tree-ssa-loop-ivopts.c: Likewise.
4055 * tree-ssa-loop-manip.c: Likewise.
4056 * tree-ssa-phiopt.c: Likewise.
4057 * tree-ssa-phiprop.c: Likewise.
4058 * tree-ssa-threadupdate.c: Likewise.
4059 * tree-ssa.c: Likewise.
4060 * tree-ssa.h: Likewise.
4061 * tree-vect-loop-manip.c: Likewise.
4062
4063 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
4064
4065 * doc/extend.texi: Fix typo in the weakref description.
4066
4067 2018-11-13 Richard Biener <rguenther@suse.de>
4068
4069 PR tree-optimization/86991
4070 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
4071 group building until we have successfully detected the SLP
4072 reduction.
4073 (vect_is_simple_reduction): Remove fixup code here.
4074
4075 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4076
4077 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
4078 (dump_gimple_stmt): Use it.
4079 (dump_gimple_stmt_loc): Likewise.
4080 (dump_gimple_expr): Likewise.
4081 (dump_gimple_expr_loc): Likewise.
4082 (dump_generic_expr): Likewise.
4083 (dump_generic_expr_loc): Likewise.
4084 (dump_printf): Likewise.
4085 (dump_printf_loc): Likewise.
4086 (dump_dec): Likewise.
4087 (dump_dec): Likewise.
4088 (dump_hex): Likewise.
4089 (dump_symtab_node): Likewise.
4090 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
4091 Guard dump call with dump_enabled_p.
4092 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
4093 * graphite-optimize-isl.c (optimize_isl): Likewise.
4094 * graphite.c (graphite_transform_loops): Likewise.
4095 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
4096 * tree-parloops.c (parallelize_loops): Likewise.
4097 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
4098 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
4099 (vect_prune_runtime_alias_test_list): Likewise.
4100 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
4101 (vect_estimate_min_profitable_iters): Likewise.
4102 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
4103 (vect_build_slp_tree_2): Likewise.
4104 (vect_supported_load_permutation_p): Likewise.
4105 (vect_slp_analyze_operations): Likewise.
4106 (vect_slp_analyze_bb_1): Likewise.
4107 (vect_slp_bb): Likewise.
4108 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
4109 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
4110 (pass_slp_vectorize::execute): Likewise.
4111 (increase_alignment): Likewise.
4112
4113 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4114
4115 PR ipa/87955
4116 * ipa-inline.c (report_inline_failed_reason): Guard calls to
4117 cl_target_option_print_diff and cl_optimization_print_diff with
4118 if (dump_file).
4119
4120 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4121
4122 * doc/invoke.texi (-fsave-optimization-record): Note that the
4123 output is compressed.
4124 * optinfo-emit-json.cc: Include <zlib.h>.
4125 (optrecord_json_writer::write): Compress the output.
4126
4127 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
4128
4129 * tree-vrp.c (value_range_base::dump): Dump type.
4130 Do not use INF nomenclature for 1-bit types.
4131 (dump_value_range): Group all variants to common dumping code.
4132 (debug): New overloaded functions for value_ranges.
4133 (value_range_base::dump): Remove no argument version.
4134 (value_range::dump): Same.
4135
4136 2018-11-13 Richard Biener <rguenther@suse.de>
4137
4138 PR tree-optimization/87931
4139 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
4140 nested cycles we support to latch computations vectorizable_reduction
4141 handles.
4142
4143 2018-11-13 Martin Liska <mliska@suse.cz>
4144
4145 PR tree-optimization/87885
4146 * cfghooks.c (account_profile_record): Rename
4147 to ...
4148 (profile_record_check_consistency): ... this.
4149 Calculate missing num_mismatched_freq_in.
4150 (profile_record_account_profile): New function
4151 that calculates time and size of a function.
4152 * cfghooks.h (struct profile_record): Remove
4153 all tuples.
4154 (struct cfg_hooks): Remove after_pass flag.
4155 (account_profile_record): Rename to ...
4156 (profile_record_check_consistency): ... this.
4157 (profile_record_account_profile): New.
4158 * cfgrtl.c (rtl_account_profile_record): Remove
4159 after_pass flag.
4160 * passes.c (check_profile_consistency): Do only
4161 checking.
4162 (account_profile): Calculate size and time of
4163 function only.
4164 (pass_manager::dump_profile_report): Reformat
4165 output.
4166 (execute_one_ipa_transform_pass): Call
4167 consistency check before clean upand call account_profile
4168 after a clean up is done.
4169 (execute_one_pass): Call check_profile_consistency and
4170 account_profile instead of using after_pass flag..
4171 * tree-cfg.c (gimple_account_profile_record): Likewise.
4172
4173 2018-11-13 Martin Liska <mliska@suse.cz>
4174
4175 PR sanitizer/87930
4176 * config/i386/i386.c (ix86_option_override_internal): Error
4177 about usage -mabi=ms and -fsanitize={,kernel-}address.
4178
4179 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
4180
4181 * config/aarch64/aarch64.c
4182 (aarch64_vectorize_preferred_vector_alignment): Change return type to
4183 poly_uint64.
4184 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
4185 alignment being a poly int.
4186 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
4187 return type to poly_uint64.
4188 * target.def (default_preferred_vector_alignment): Likewise.
4189 * targhooks.c (default_preferred_vector_alignment): Likewise.
4190 * targhooks.h (default_preferred_vector_alignment): Likewise.
4191 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
4192 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
4193 poly int.
4194 (vect_update_misalignment_for_peel): Likewise.
4195 (vect_enhance_data_refs_alignment): Likewise.
4196 (vect_find_same_alignment_drs): Likewise.
4197 (vect_duplicate_ssa_name_ptr_info): Likewise.
4198 (vect_setup_realignment): Likewise.
4199 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4200 poly_uint64.
4201 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
4202 mask with a compile time variable vector alignment.
4203 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
4204 int.
4205 (vect_do_peeling): Exit early if vector alignment is not constant.
4206 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
4207 a poly int.
4208 (vectorizable_store): Likewise.
4209 (vectorizable_load): Likweise.
4210 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
4211 poly_uint64.
4212 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
4213 poly int.
4214 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4215 poly_uint64.
4216
4217 2018-11-13 Richard Biener <rguenther@suse.de>
4218
4219 PR tree-optimization/87962
4220 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
4221 detect outer reduction for disqualifying in-loop uses.
4222
4223 2018-11-13 Richard Biener <rguenther@suse.de>
4224
4225 PR tree-optimization/87967
4226 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
4227 for constants for the scalar loop.
4228
4229 2018-11-13 Alan Modra <amodra@gmail.com>
4230
4231 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
4232 integer constants when -mcmodel=medium.
4233
4234 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4235
4236 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
4237 * config/arc/elf.h (PROFILE_HOOK): Define.
4238 * config/arc/linux.h (PROFILE_HOOK): Likewise.
4239
4240 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4241
4242 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
4243 jump table data in the text section.
4244
4245 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4246
4247 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
4248 to fit the eh_return pattern.
4249 * config/arc/arc.md (eh_return): Define.
4250 (VUNSPEC_ARC_EH_RETURN): Likewise.
4251 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
4252 new implementation.
4253 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
4254
4255
4256 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4257
4258 * common/config/arc/arc-common.c (arc_option_optimization_table):
4259 Millicode optimization is default on for size optimizations.
4260 * config/arc/arc-protos.h (arc_check_multi): New function.
4261 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
4262 (ENTER_LEAVE_START_REG): Define.
4263 (ENTER_LEAVE_END_REG): Likewise.
4264 (arc_override_options): Disable millicode when long calls option
4265 is on.
4266 (arc_frame_info): Change it from int to bool.
4267 (arc_compute_frame_size): Clean up.
4268 (arc_save_restore): Remove.
4269 (frame_save_reg): New function.
4270 (frame_restore_reg): Likewise.
4271 (arc_enter_leave_p): Likewise.
4272 (arc_save_callee_saves): Likewise.
4273 (arc_restore_callee_saves): Likewise.
4274 (arc_save_callee_enter): Likewise.
4275 (arc_restore_callee_leave): Likewise.
4276 (arc_save_callee_milli): Likewise.
4277 (arc_restore_callee_milli): Likewise.
4278 (arc_expand_prologue): Reimplement to emit enter/leave
4279 instructions.
4280 (arc_expand_epilogue): Likewise.
4281 (arc_check_multi): New function.
4282 * config/arc/arc.md (push_multi_fp): New pattern.
4283 (push_multi_fp_blink): Likewise.
4284 (pop_multi_fp): Likewise.
4285 (pop_multi_fp_blink): Likewise.
4286 (pop_multi_fp_ret): Likewise.
4287 (pop_multi_fp_blink_ret): Likewise.
4288 * config/arc/arc.opt (mmillicode): Update option.
4289 (mcode-density-frame): New option.
4290 * config/arc/predicates.md (push_multi_operand): New predicate.
4291 (pop_multi_operand): Likewise.
4292 * doc/invoke.texi (ARC): Update ARC options information.
4293
4294
4295 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4296
4297 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
4298 * config/arc/arc.c (operands_ok_ldd_std): New function.
4299 (mem_ok_for_ldd_std): Likewise.
4300 (gen_operands_ldd_std): Likewise.
4301 * config/arc/arc.md: Add peephole2 rules for std/ldd.
4302
4303 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
4304
4305 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
4306 test on stack_usage_file.
4307 (lang_dependent_init): Do not open the .su file if generating LTO.
4308
4309 2018-11-13 Jakub Jelinek <jakub@redhat.com>
4310
4311 PR rtl-optimization/87918
4312 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
4313 simplify_gen_relational rather than simplify_gen_binary.
4314
4315 2018-11-13 Richard Biener <rguenther@suse.de>
4316
4317 * tree-ssanames.h (set_range_info): Use value_range_base.
4318 (get_range_info): Likewise.
4319 * tree-ssanames.c (set_range_info): Likewise.
4320 (get_range_info): Likewise.
4321 * tree-vrp.c (value_range_base::union_helper): Split
4322 out common parts of value_range[_base]::union_.
4323 (value_range_base::union_): Update.
4324 (value_range::union_): Likewise.
4325 (determine_value_range_1): Use value_range_base.
4326 (determine_value_range): Likewise.
4327 * tree-vrp.h (value_range_base::union_helper): Move ...
4328 (value_range::union_helper): ... from here.
4329
4330 2018-11-13 Alan Modra <amodra@gmail.com>
4331
4332 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
4333 offset for PRE_DEC.
4334 (rs6000_secondary_reload_gpr): Don't call find_replacement.
4335
4336 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
4337
4338 PR middle-end/59634
4339 * doc/invoke.texi (Optimize Options): Clarify that the
4340 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
4341 apply to data cache size.
4342
4343 2018-11-13 Alan Modra <amodra@gmail.com>
4344
4345 * config/rs6000/predicates.md (logical_const_operand),
4346 (logical_operand): Correct comment.
4347 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
4348
4349 2018-11-13 Alan Modra <amodra@gmail.com>
4350
4351 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
4352
4353 2018-11-13 Alan Modra <amodra@gmail.com>
4354
4355 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
4356 description.
4357 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
4358 covered by alternative.
4359 (movcc_internal1): Ignore h for register preference.
4360 (mov<mode>_hardfloat64): Likewise.
4361 (mov<mode>_softfloat): Ignore c, l, h for register preference.
4362
4363 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4364
4365 PR preprocessor/47823
4366 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
4367 documentation to...
4368 (Pragmas): ...here.
4369 * doc/extend.texi (Pragmas): Note additional pragmas documented
4370 in the CPP manual.
4371
4372 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4373
4374 PR middle-end/86677
4375 PR middle-end/87528
4376 * tree-scalar-evolution.c (expression_expensive_p): Make
4377 BUILTIN POPCOUNT as expensive when backend does not define it.
4378
4379 2018-11-12 Fredrik Noring <noring@nocrew.org>
4380
4381 * config.gcc: Update with-llsc defaults for MIPS r5900.
4382
4383 2018-11-12 Martin Liska <mliska@suse.cz>
4384
4385 PR gcov-profile/87442
4386 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
4387 options.
4388 * doc/invoke.texi: Document them.
4389 * tree-profile.c (parse_profile_filter): New.
4390 (parse_profile_file_filtering): Likewise.
4391 (release_profile_file_filtering): Likewise.
4392 (include_source_file_for_profile): Likewise.
4393 (tree_profiling): Filter source files based on the
4394 newly added options.
4395
4396 2018-11-12 Martin Liska <mliska@suse.cz>
4397
4398 PR target/87903
4399 * doc/extend.texi: Add missing values for __builtin_cpu_is and
4400 __builtin_cpu_supports for x86 target.
4401
4402 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4403
4404 PR middle-end/21110
4405 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
4406 have to be Pmode.
4407 (Arithmetic): Likewise for "lo_sum".
4408
4409 2018-11-12 Renlin Li <renlin.li@arm.com>
4410
4411 PR target/87815
4412 * dse.c (get_stored_val): Add check for compile-time constantness
4413 of gap.
4414
4415 2018-11-12 Sudakshina Das <sudi.das@arm.com>
4416
4417 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
4418 (ARMv8_5a): New fgroup.
4419 (armv8.5-a): New arch.
4420 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
4421 sb and predres.
4422 * config/arm/arm-tables.opt: Regenerate.
4423 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
4424 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
4425 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
4426 Add matching rules for -march=armv8.5-a and extensions.
4427 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
4428 Add sb and predres to all armv8-a except armv8.5-a.
4429
4430 2018-11-12 Richard Biener <rguenther@suse.de>
4431
4432 * tree-vrp.h (value_range[_base]::set): Make public. Provide
4433 overload for single value.
4434 (value_range[_base]::set_nonnull): New.
4435 (value_range[_base]::set_null): Likewise.
4436 (value_range): Document bitmap copying behavior, mark
4437 copy constructor and assignment operator deleted.
4438 (value_range::move): New.
4439 (value_range::set_and_canonicalize): Default bitmap to zero.
4440 (set_value_range_to_nonnull): Remove.
4441 (set_value_range_to_null): Likewise.
4442 (set_value_range): Likewise.
4443 (set_value_range_to_value): Likewise.
4444 (extract_range_from_unary_expr): Work on value_range_base.
4445 (extract_range_from_binary_expr_1): Likewise. Rename to...
4446 (extract_range_from_binary_expr): ... this.
4447 * tree-vrp.c (value_range::update): Clear equiv bitmap
4448 if required.
4449 (value_range::move): New, move equiv bitmap.
4450 (value_range_base::set_undefined): Avoid assignment.
4451 (value_range::set_undefined): Likewise.
4452 (value_range_base::set_varying): Likewise.
4453 (value_range::set_varying): Likewise.
4454 (set_value_range): Remove.
4455 (value_range_base::set): New overload for value.
4456 (value_range::set): Likewise.
4457 (set_value_range_to_nonnull): Remove.
4458 (value_range_base::set_nonnull): New.
4459 (value_range::set_nonnull): Likewise.
4460 (set_value_range_to_null): Remove.
4461 (value_range_base::set_null): New.
4462 (value_range::set_null): Likewise.
4463 (range_is_null): Work on value_range_base.
4464 (range_is_nonnull): Likewise.
4465 (ranges_from_anti_range): Likewise.
4466 (extract_range_into_wide_ints): Likewise.
4467 (extract_range_from_multiplicative_op): Likewise.
4468 (extract_range_from_binary_expr): Likewise. Update for API changes.
4469 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
4470 handling.
4471 (value_range::intersect_helper): Avoid copy and assignment.
4472 (value_range::union_helper): Likewise.
4473 (determine_value_range_1): Adjust.
4474 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
4475 Avoid assignment by using move.
4476 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
4477 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4478 Likewise.
4479 * tree-ssanames.c (get_range_info): Likewise.
4480 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
4481 * vr-values.c (vr_values::get_value_range): Adjust.
4482 (vr_values::update_value_range): Likewise.
4483 (symbolic_range_based_on_p): Work on value_range_base.
4484 (vr_values::extract_range_from_binary_expr): Use value_range_base.
4485 (vr_values::extract_range_from_unary_expr): Likewise.
4486 (vr_values::extract_range_from_cond_expr): Avoid assignment.
4487 (vr_values::extract_range_from_comparison): Adjust.
4488 (vr_values::check_for_binary_op_overflow): Use value_range_base.
4489 (vr_values::extract_range_basic): Adjust.
4490 (vr_values::adjust_range_with_scev): Likewise.
4491 (vr_values::vrp_visit_assignment_or_call): Likewise.
4492 (vr_values::get_vr_for_comparison): Change API to avoid
4493 assignment and copy construction.
4494 (vr_values::compare_name_with_value): Adjust accordingly.
4495 (vr_values::compare_names): Likewise.
4496 (vr_values::extract_range_from_phi_node): Avoid assignment and
4497 bogus in-place modify of equiv bitmap.
4498 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
4499 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
4500 for extract_range_from_unary_expr API change.
4501 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
4502
4503 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
4504
4505 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
4506
4507 2018-11-12 Richard Biener <rguenther@suse.de>
4508
4509 * tree-vrp.h (value_range_base::symbolic_p,
4510 value_range_base::constant_p, value_range_base::zero_p,
4511 value_range_base::singleton_p): Move from value_range.
4512 (value_range::dump): Add.
4513 * gimple-ssa-evrp-analyze.c
4514 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
4515 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
4516 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4517 Use set_varying.
4518 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
4519 (value_range::constant_p): Likewise.
4520 (value_range::singleton_p): Likewise.
4521 (value_range_base::dump): Add.
4522 (set_value_range_to_undefined): Remove.
4523 (set_value_range_to_varying): Likewise.
4524 (range_int_cst_p): Take value_range_base argument.
4525 (range_int_cst_singleton_p): Likewise.
4526 (value_range_constant_singleton): Likewise.
4527 (vrp_set_zero_nonzero_bits): Likewise.
4528 (extract_range_from_multiplicative_op): Use set_varying.
4529 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
4530 (extract_range_from_unary_expr): Likewise.
4531 (dump_value_range_base): Change to overload of dump_value_range.
4532 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
4533 (vrp_prop::visit_stmt): Likewise.
4534 (value_range::intersect_helper): Likewise.
4535 (value_range::union_helper): Likewise.
4536 (determine_value_range_1): Likewise.
4537
4538 2018-11-12 Richard Biener <rguenther@suse.de>
4539
4540 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
4541 (set_value_range_to_null): Likewise.
4542 * vr-values.c (vr_values::extract_range_from_comparison):
4543 Clear equiv for constant singleton ranges.
4544
4545 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
4546
4547 * config/i386/sse.md: Combine VFIXUPIMM* patterns
4548 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4549 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4550 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
4551 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4552 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4553 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
4554
4555 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4556
4557 PR c/69502
4558 * doc/extend.texi (Common Type Attributes): For the align type
4559 attribute, copy language about decreasing alignment from the
4560 corresponding variable attribute.
4561
4562 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4563
4564 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
4565 -frounding-math.
4566
4567 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4568
4569 PR c++/43105
4570 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
4571 -frtti and -fno-rtti code.
4572
4573 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4574
4575 PR c/26366
4576 * doc/extend.texi (Other Builtins): Document probability associated
4577 with __builtin_expect.
4578
4579 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
4580
4581 PR target/87928
4582 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
4583 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
4584 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
4585 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
4586
4587 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4588
4589 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
4590
4591 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4592
4593 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
4594
4595 2018-11-11 Richard Biener <rguenther@suse.de>
4596
4597 * tree-vrp.h (class value_range_base): New base class for
4598 value_range containing all but the m_equiv member.
4599 (dump_value_range_base): Add.
4600 (range_includes_zero_p): Work on value_range_base.
4601 * tree-vrp.c (value_range_base::set): Split out base handling
4602 from...
4603 (value_range::set): this.
4604 (value_range::set_equiv): New.
4605 (value_range_base::value_range_base): New constructors.
4606 (value_range_base::check): Split out base handling from...
4607 (value_range::check): this.
4608 (value_range::equal_p): Refactor in terms of
4609 ignore_equivs_equal_p which is now member of the base.
4610 (value_range_base::set_undefined): New.
4611 (value_range_base::set_varying): Likewise.
4612 (value_range_base::dump):Split out base handling from...
4613 (value_range::dump): this.
4614 (value_range_base::set_and_canonicalize): Split out base handling
4615 from...
4616 (value_range::set_and_canonicalize): this.
4617 (value_range_base::union_): New.
4618 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
4619 for m_vr.
4620 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
4621 instead of value_range everywhere.
4622 (ipcp_vr_lattice::print): Use dump_value_range_base.
4623 (ipcp_vr_lattice::meet_with): Adjust.
4624 (ipcp_vr_lattice::meet_with_1): Likewise.
4625 (ipa_vr_operation_and_type_effects): Likewise.
4626 (propagate_vr_across_jump_function): Likewise.
4627 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
4628 (ipa_get_value_range): Likewise.
4629 (ipa_set_jfunc_vr): Likewise.
4630 (ipa_compute_jump_functions_for_edge): Likewise.
4631
4632 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
4633
4634 PR middle-end/65703
4635 * doc/invoke.texi (Optimize Options): Add @opindex entries
4636 for the positive forms of -fno-xxx and -mno-xxx options
4637 that were lacking them.
4638
4639 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
4640
4641 * combine.c (make_more_copies): Only make an intermediate copy if the
4642 dest of a move is a pseudo.
4643
4644 2018-11-09 Maya Rashish <coypu@sdf.org>
4645
4646 PR target/87221
4647 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
4648 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
4649
4650 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
4651
4652 PR driver/41179
4653 PR middle-end/65703
4654 * doc/invoke.texi (Optimize Options): Clarify default behavior
4655 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
4656
4657 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
4658
4659 PR tree-optimization/87940
4660 * expr.c (string_constant): Don't strip NOPS in subexpressions.
4661 Fold PLUS_EXPR correctly.
4662
4663 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
4664
4665 PR target/87762
4666 * config/s390/s390.c (s390_safe_relative_long_p): New function.
4667 (annotate_constant_pool_refs): Skip insns which support
4668 relative addressing.
4669 (annotate_constant_pool_refs_1): New helper function.
4670 (find_constant_pool_ref): Skip insns which support relative
4671 addression.
4672 (find_constant_pool_ref_1): New helper function.
4673 (replace_constant_pool_ref): Skip insns which support
4674 relative addressing.
4675 (replace_constant_pool_ref_1): New helper function.
4676 (s390_mainpool_start): Adapt to the new signature.
4677 (s390_mainpool_finish): Likewise.
4678 (s390_chunkify_start): Likewise.
4679 (s390_chunkify_finish): Likewise.
4680 (pass_s390_early_mach::execute): Likewise.
4681 (s390_prologue_plus_offset): Likewise.
4682 (s390_emit_prologue): Likewise.
4683 (s390_emit_epilogue): Likewise.
4684
4685 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4686
4687 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
4688 but unsupported lastprivate with conditional modifier.
4689
4690 2018-11-09 Jeff Law <law@redhat.com>
4691
4692 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
4693 unused argument better. Add gcc_unreachable to silence warning.
4694
4695 2018-11-09 Martin Sebor <msebor@redhat.com>
4696
4697 PR middle-end/81824
4698 * attribs.c (has_attribute): New helper function.
4699 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
4700 * attribs.h (decls_mismatched_attributes): Declare.
4701 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
4702 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
4703 * common.opt (-Wattribute-alias): Take an argument.
4704 (-Wno-attribute-alias): New option.
4705 * doc/extend.texi (Common Function Attributes): Document copy.
4706 (Common Variable Attributes): Same.
4707 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
4708 (-Wattribute-alias): Document new option argument.
4709
4710 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4711
4712 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
4713 matching criteria. Remove unused array initializer.
4714
4715 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
4716 Jinsong Ji <jji@us.ibm.com>
4717
4718 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
4719 constraints by introducing a new temporary.
4720 (_mm_cvtss_si64): Likewise.
4721
4722 2018-11-09 Martin Liska <mliska@suse.cz>
4723
4724 * common.opt: Add -fipa-stack-alignment flag.
4725 * doc/invoke.texi: Document it.
4726 * final.c (rest_of_clean_state): Guard stack
4727 shrinking with flag.
4728
4729 2018-11-09 Martin Liska <mliska@suse.cz>
4730
4731 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
4732 to ...
4733 (ipa_discover_variable_flags): ... this.
4734 * common.opt: Come up with new flag -fipa-reference-addressable.
4735 * doc/invoke.texi: Document it.
4736 * ipa-reference.c (propagate): Call the renamed fn.
4737 * ipa-visibility.c (whole_program_function_and_variable_visibility):
4738 Likewise.
4739 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
4740 ...
4741 (ipa_discover_variable_flags): ... this. Discover
4742 non-addressable variables only with the newly added flag.
4743 * opts.c: Enable the newly added flag with -O1 and higher
4744 optimization level.
4745
4746 2018-11-09 David Malcolm <dmalcolm@redhat.com>
4747
4748 * json.cc (selftest::test_writing_literals): Fix comment.
4749
4750 2018-11-09 Martin Liska <mliska@suse.cz>
4751
4752 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
4753 string to a stack buffer.
4754 (aarch64_parse_cpu): Likewise.
4755 (aarch64_parse_tune): Likewise.
4756
4757 2018-11-09 Richard Biener <rguenther@suse.de>
4758
4759 PR tree-optimization/87953
4760 * tree-vect-loop.c (vectorizable_reduction): For analysis
4761 always pass ops[0] to vectorizable_condition.
4762
4763 2018-11-09 Stafford Horne <shorne@gmail.com>
4764 Richard Henderson <rth@twiddle.net>
4765 Joel Sherrill <joel@rtems.org>
4766
4767 * common/config/or1k/or1k-common.c: New file.
4768 * config/or1k/*: New.
4769 * config.gcc (or1k*-*-*): New.
4770 * configure.ac (or1k*-*-*): New test for openrisc tls.
4771 * configure: Regenerated.
4772 * doc/install.texi: Document OpenRISC triplets.
4773 * doc/invoke.texi: Document OpenRISC arguments.
4774 * doc/md.texi: Document OpenRISC.
4775
4776 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4777
4778 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
4779 (arm7tdmi-s): Delete CPU.
4780 (arm710t): Add aliases for arm720t and arm740t.
4781 (arm720t, arm740t): Delete CPUs.
4782 (arm920t): Add aliases for arm920, arm922t and arm940t.
4783 (arm920, arm922t, arm940t): Delete CPUs.
4784 (arm10tdmi): Add alias for arm1020t.
4785 (arm1020t): Delete CPU.
4786 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
4787 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
4788 (arm10e): Add aliases for arm1020e and arm1022e.
4789 (arm1020e, arm1022e): Delete CPU.
4790 * config/arm/arm.md (generic_sched): Remove entries that are now
4791 handled by aliases.
4792 (generic_vfp): Likewise.
4793 * config/arm/arm1020e.md: Simplify tuning selection based on alias
4794 changes.
4795 * config/arm/arm-tune.md: Regenerated.
4796 * config/arm/arm-tables.opt: Regenerated.
4797
4798 2018-11-09 Richard Biener <rguenther@suse.de>
4799
4800 PR tree-optimization/87621
4801 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
4802 op with only phi inputs.
4803 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
4804 (ch_base::copy_headers): Run CSE on copied loop headers.
4805 (pass_ch_vect::process_loop_p): Simplify.
4806
4807 2018-11-09 Alexandre Oliva <oliva@adacore.com>
4808
4809 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
4810 for non-w64 x86_64 biarch.
4811
4812 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
4813
4814 PR rtl-optimization/86438
4815 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
4816 of in_b for the compare if in_b is SET_DEST.
4817
4818 PR target/87793
4819 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
4820 non-toplevel UNSPEC.
4821
4822 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4823
4824 * tree-vrp.c (value_range::check): Do not access internals
4825 directly.
4826 (value_range::singleton_p): Same.
4827 (value_range::type): Same.
4828 (vrp_finalize): Use value_range API.
4829
4830 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4831
4832 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
4833
4834 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4835
4836 * vr-values.c (vr_values::get_value_range): Use value_range API
4837 instead of piecing together ranges.
4838 (vr_values::update_value_range): Same.
4839
4840 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4841
4842 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
4843 of performing ad-hoc calculations.
4844 * tree-ssanames.c (set_range_info): New overloaded function
4845 accepting value_range &.
4846 (get_range_info): Same.
4847 * tree-ssanames.h (set_range_info_raw): Remove.
4848 (set_range_info): New prototype.
4849 (get_range_info): Same.
4850 * tree-vrp.h (value_range::null_p): Rename to zero_p.
4851 * tree-vrp.c (value_range::null_p): Same.
4852
4853 2018-11-09 Jan Hubicka <jh@suse.cz>
4854
4855 * tree.c (fld_type_variant_equal_p): Test user align flag.
4856 (flt_type_variant): Copy user align flag.
4857 (fld_incomplete_type_of): Clear it.
4858
4859 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4860
4861 * config/arm/neon.md (div<mode>3): New pattern.
4862
4863 2018-11-08 Andi Kleen <ak@linux.intel.com>
4864
4865 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
4866 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
4867 (ix86_handle_option): Handle OPT_mptwrite.
4868 * config/i386/cpuid.h (bit_PTWRITE): Add.
4869 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
4870 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
4871 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
4872 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
4873 (ix86_option_override_internal): Handle PTA_PTWRITE.
4874 (ix86_valid_target_attribute_inner_p): Define ptwrite.
4875 (def_builtin2): Force UINT64 to be 64bit only.
4876 * config/i386/i386.h (TARGET_PTWRITE): Add.
4877 (TARGET_PTWRITE_P): Add.
4878 (PTA_PTWRITE): Add.
4879 * config/i386/i386.md: Define ptwrite.
4880 * config/i386/i386.opt: Add -mptwrite.
4881 * config/i386/immintrin.h (_ptwrite64): Add.
4882 (_ptwrite32): Add
4883 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
4884 * doc/invoke.texi: Document -mptwrite.
4885
4886 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
4887
4888 PR rtl-optimization/87600
4889 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
4890 * lra-constraints.c (process_alt_operands): Skip illegal hard
4891 register usage. Prefer reloading non hard register operands.
4892
4893 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
4894
4895 PR other/36572
4896 * doc/invoke.texi (Optimize Options): Clarify default behavior
4897 for -fno-sched-interblock and -fno-sched-spec.
4898
4899 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
4900
4901 * collect2.c (linker_select): Add USE_LLD_LD.
4902 (ld_suffixes): Add ld.lld.
4903 (main): Handle -fuse-ld=lld.
4904 * common.opt (-fuse-ld=lld): New option.
4905 * doc/invoke.texi (-fuse-ld=lld): Document.
4906 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
4907
4908 2018-11-08 Paul Koning <ni1d@arrl.net>
4909
4910 * config/pdp11/constraints.md: Add "Z" series constraints for use
4911 with pre-dec and post-inc addressing.
4912 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
4913 (pdp11_expand_operands): Add int argument (word count).
4914 (pdp11_sp_frame_offset): Delete.
4915 (pdp11_cmp_length): New function.
4916 (pushpop_regeq): New function.
4917 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
4918 Add hook.
4919 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
4920 frame layout.
4921 (pdp11_initial_elimination_offset): Ditto.
4922 (pdp11_expand_operands): Add word count argument. Bugfixes.
4923 (output_move_multiple): Change how pointer adjustment is done.
4924 (pdp11_gen_int_label): Correct format.
4925 (output_ascii): Ditto.
4926 (pdp11_asm_output_var): Add code for DEC assembler case.
4927 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
4928 value.
4929 (legitimate_const_double_p): Ditto.
4930 (pdp11_register_move_cost): Adjust for new register classes.
4931 (pdp11_regno_reg_class): Ditto.
4932 (expand_block_move): Delete.
4933 (pushpop_regeq): New function.
4934 (pdp11_legitimate_address_p): Bugfix in check for constant
4935 offset.
4936 (pdp11_sp_frame_offset): Delete.
4937 (pdp11_reg_save_size): New helper function for new frame layout.
4938 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
4939 (pdp11_expand_shift): Bugfix in check for constant shift count.
4940 (pdp11_shift_length): Ditto.
4941 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
4942 (pdp11_cmp_length): New function.
4943 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
4944 some compile options.
4945 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
4946 (CALL_USED_REGISTERS): Ditto.
4947 (ELIMINABLE_REGS): Ditto.
4948 (REGISTER_NAMES): Ditto.
4949 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
4950 constraints.
4951 (REG_CLASS_NAMES): Ditto.
4952 (REG_CLASS_CONTENTS): Ditto. Also remove
4953 HARD_FRAME_POINTER_REGNUM.
4954 (CPU_REG_CLASS): New macro.
4955 (CLASS_MAX_NREGS): Adjust for new register classes.
4956 (FUNCTION_PROFILER): Make no-op.
4957 (may_call_alloca): Remove unused declaration.
4958 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
4959 (ASM_OUTPUT_SKIP): Fix format.
4960 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
4961 (HARD_FRAME_POINTER_REGNUM): Remove.
4962 (return): Delete.
4963 (*rts): Rename. Remove epilogue related checks.
4964 (cmpsi, cmpdi): New insn.
4965 (cbranch<mode>4): Change to apply to SI and DI modes as well.
4966 (mov<mode>): Change constraints to enforce that push/pop
4967 destination cannot use the same register as source.
4968 (*mov<mode><cc_cc>): Ditto.
4969 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
4970 at assembly output rather than as RTL expander.
4971 (zero_extendqihi2): Bugfix in check for same registers.
4972 (adddi3_nocc): Bugfix in check for constant operand.
4973 (addsi3_nocc): Ditto.
4974 (subdi3_nocc): Ditto.
4975 (subsi3_nocc): Ditto.
4976 (negdi2_nocc): Copy input to pdp11_expand_operands.
4977 (negsi2_nocc): Ditto.
4978 (bswap2_nocc): Ditto.
4979 * config/pdp11/pdp11.opt (mlra): Fix documentation.
4980 * config/pdp11/t-pdp11: Use -Os.
4981
4982 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
4983
4984 * config/arm/parsecpu.awk (/alias/): New parsing rule.
4985 (/begin cpu/): Check that the cpu name hasn't been previously defined.
4986 (gen_comm_data): Print out CPU alias tables.
4987 (check_cpu): Match aliases when checking the CPU name.
4988 * config/arm/arm-protos.h (cpu_alias): New structure.
4989 (cpu_option): Add entry for aliases.
4990 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
4991 strongarm1100 and strongarm1110.
4992 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
4993 (config/arm/arm-generic.md): Remove redundant references to
4994 strongarm110, strongarm1100 and strongarm1110.
4995 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
4996 Scan aliases for additional hints.
4997 (arm_parse_cpu_option_name): Also match a cpu name against the list
4998 of aliases.
4999 * config/arm/arm-tables.opt: Regenerated.
5000 * config/arm/arm-tune.md: Regenerated.
5001
5002 2018-11-08 Jakub Jelinek <jakub@redhat.com>
5003
5004 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
5005 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
5006 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5007 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
5008 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5009 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
5010 * gengtype.c (open_base_files): Add omp-general.h.
5011 * gimple.c (gimple_build_omp_critical):
5012 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
5013 gimple_omp_taskgroup_set_clauses.
5014 (gimple_build_omp_atomic_load): Add mo argument, call
5015 gimple_omp_atomic_set_memory_order.
5016 (gimple_build_omp_atomic_store): Likewise.
5017 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
5018 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
5019 instead of GSS_OMP.
5020 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
5021 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
5022 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
5023 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
5024 different value for GF_OMP_ATOMIC_NEED_VALUE.
5025 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
5026 comments.
5027 (struct gimple_statement_omp_single_layout): And remove here.
5028 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
5029 than gimple_statement_omp_single_layout.
5030 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
5031 GIMPLE_OMP_TEAMS.
5032 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
5033 (gimple_omp_subcode): Formatting fix.
5034 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
5035 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
5036 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
5037 gimple_omp_teams_host, gimple_omp_teams_set_host,
5038 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
5039 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
5040 gimple_omp_taskgroup_set_clauses): New inline functions.
5041 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
5042 (gimple_build_omp_atomic_store): Likewise.
5043 (gimple_omp_atomic_seq_cst_p): Remove.
5044 (gimple_omp_atomic_memory_order): New function.
5045 (gimple_omp_atomic_set_seq_cst): Remove.
5046 (gimple_omp_atomic_set_memory_order): New function.
5047 (gimple_build_omp_taskgroup): Add clauses argument.
5048 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
5049 (dump_gimple_omp_task): Print taskwait with depend clauses.
5050 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
5051 dump_omp_atomic_memory_order.
5052 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
5053 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
5054 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
5055 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
5056 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
5057 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
5058 ORT_UNTIED_TASKLOOP enumerators.
5059 (enum gimplify_defaultmap_kind): New.
5060 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
5061 target_map_pointers_as_0len_arrays members, add defaultmap.
5062 (new_omp_context): Initialize defaultmap member.
5063 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5064 (maybe_fold_stmt): Don't fold even in host teams regions.
5065 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
5066 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
5067 ctx->omp_firstprivatize_variable.
5068 (omp_add_variable): Don't add private/firstprivate for VLAs in
5069 ORT_TASKGROUP.
5070 (omp_default_clause): Print "taskloop" rather than "task" if
5071 ORT_*TASKLOOP.
5072 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5073 Handle new defaultmap clause kinds.
5074 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
5075 iterator to be lastprivate or private. Fix up diagnostics if linear
5076 is used on collapse>1 simd iterator.
5077 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5078 (gimplify_omp_depend): New function.
5079 (gimplify_scan_omp_clauses): Add shared clause on parallel for
5080 combined parallel master taskloop{, simd} if taskloop has
5081 firstprivate, lastprivate or reduction clause. Handle
5082 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
5083 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
5084 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
5085 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
5086 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
5087 lastprivate.
5088 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
5089 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
5090 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
5091 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5092 (gimplify_omp_task): Handle taskwait with depend clauses.
5093 (gimplify_omp_for): Add shared clause on parallel for combined
5094 parallel master taskloop{, simd} if taskloop has firstprivate,
5095 lastprivate or reduction clause. Use ORT_TASKLOOP or
5096 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
5097 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
5098 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
5099 __for_end and __for_range temporaries on OMP_PARALLEL for
5100 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
5101 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
5102 sandwiched in between two taskloops.
5103 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
5104 instead of ctx->omp_firstprivatize_variable.
5105 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
5106 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
5107 host teams, use gimplify_and_return_first etc. for body like
5108 for target or target data constructs, and at the end call
5109 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
5110 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
5111 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
5112 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
5113 gimple_omp_atomic_set_seq_cst calls.
5114 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
5115 case, handle taskgroup clauses.
5116 * lto-streamer-out.c (hash_tree): Handle
5117 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5118 * Makefile.in (GTFILES): Add omp-general.h.
5119 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
5120 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
5121 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
5122 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
5123 BUILT_IN_GOMP_LOOP_DOACROSS_START,
5124 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
5125 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5126 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
5127 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
5128 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
5129 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
5130 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
5131 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5132 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
5133 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
5134 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
5135 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
5136 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
5137 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
5138 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
5139 * omp-expand.c (workshare_safe_to_combine_p): Return false for
5140 non-worksharing loops.
5141 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
5142 (determine_parallel_type): Don't combine parallel with worksharing
5143 which has _reductemp_ clause.
5144 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
5145 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
5146 if there is nonmonotonic modifier or if there is no modifier and no
5147 ordered clause. For dynamic and guided schedule without monotonic
5148 and nonmonotonic modifier, default to nonmonotonic.
5149 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
5150 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
5151 task reductions.
5152 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
5153 there are any reduction clauses.
5154 (expand_taskwait_call): New function.
5155 (expand_teams_call): New function.
5156 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
5157 expand_teams_call for it. Formatting fix. Handle taskwait with
5158 depend clauses.
5159 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
5160 of worksharing loops with task reductions.
5161 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
5162 expansion of worksharing loops with task reductions.
5163 (expand_omp_sections): Handle expansion of sections with task
5164 reductions.
5165 (expand_omp_synch): For host teams call expand_omp_taskreg.
5166 (omp_memory_order_to_memmodel): New function.
5167 (expand_omp_atomic_load, expand_omp_atomic_store,
5168 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
5169 instead of gimple_omp_atomic_seq_cst_p.
5170 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
5171 depend clauses as a standalone directive.
5172 * omp-general.c (enum omp_requires): New variable.
5173 (omp_extract_for_data): Initialize have_reductemp member. Allow
5174 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
5175 GT_EXPR loops depending on incr sign. Formatting fixes.
5176 * omp-general.h (struct omp_for_data): Add have_reductemp member.
5177 (enum omp_requires): New enum.
5178 (omp_requires_mask): Declare.
5179 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
5180 Fix comment typos.
5181 * omp-low.c (struct omp_context): Add task_reductions and
5182 task_reduction_map fields.
5183 (is_host_teams_ctx): New function.
5184 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
5185 (use_pointer_for_field): Use is_global_var instead of
5186 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
5187 in outer contexts.
5188 (build_outer_var_ref): Ignore taskgroup outer contexts.
5189 (delete_omp_context): Release task_reductions and task_reduction_map.
5190 (scan_sharing_clauses): Don't add any fields for reduction clause on
5191 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
5192 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
5193 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
5194 Handle OMP_CLAUSE_NONTEMPORAL.
5195 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
5196 needed.
5197 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
5198 clauses with task modifier.
5199 (scan_omp_task): Handle taskwait with depend clauses.
5200 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
5201 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
5202 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
5203 (scan_omp_for): Fix comment formatting.
5204 (scan_omp_teams): Handle host teams constructs.
5205 (check_omp_nesting_restrictions): Allow teams with no outer
5206 OpenMP context. Adjust diagnostics for teams strictly nested into
5207 some explicit OpenMP construct other than target. Allow OpenMP atomics
5208 inside of simd regions.
5209 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
5210 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
5211 taskreg_nesting_level while scanning host teams construct.
5212 (task_reduction_read): New function.
5213 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
5214 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
5215 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
5216 second argument create_tmp_var if it is NULL. Don't ignore shared
5217 clauses in is_host_teams_ctx contexts. Handle
5218 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
5219 clauses.
5220 (lower_reduction_clauses): Ignore reduction clauses with task
5221 modifier. Remove second argument create_tmp_var if it is NULL.
5222 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
5223 (lower_send_clauses): Ignore reduction clauses with task modifier.
5224 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
5225 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
5226 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
5227 rely that it is the last stmt in body so far. Ignore outer taskgroup
5228 contexts.
5229 (omp_task_reductions_find_first, omp_task_reduction_iterate,
5230 lower_omp_task_reductions): New functions.
5231 (lower_omp_sections): Handle reduction clauses with taskgroup
5232 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
5233 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
5234 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
5235 modifiers.
5236 (lower_omp_taskgroup): Handle taskgroup reductions.
5237 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
5238 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
5239 (lower_depend_clauses): If there are any
5240 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5241 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
5242 seen, assume lowering is done already and return early. Set kind
5243 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
5244 (lower_omp_taskreg): Handle reduction clauses with task modifier on
5245 parallel construct. Handle reduction clause on taskloop construct.
5246 Handle taskwait with depend clauses.
5247 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
5248 for host teams constructs.
5249 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
5250 nontemporal and _reductemp_ clause entries.
5251 (omp_clause_code_name): Likewise.
5252 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
5253 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
5254 * tree-core.h (enum omp_clause_code): Add
5255 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
5256 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
5257 (struct tree_base): Add omp_atomic_memory_order field into union.
5258 Remove OMP_ATOMIC_SEQ_CST comment.
5259 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5260 and OMP_CLAUSE_DEPEND_DEPOBJ.
5261 (struct tree_omp_clause): Add subcode.defaultmap_kind.
5262 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
5263 OpenMP constructs with body and clauses operands.
5264 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
5265 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
5266 (OMP_TASKGROUP_CLAUSES): Define.
5267 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
5268 OMP_CLAUSE__LOOPTEMP_.
5269 (OMP_ATOMIC_SEQ_CST): Remove.
5270 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
5271 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
5272 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
5273 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
5274 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
5275 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
5276 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
5277 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
5278 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
5279 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
5280 Define.
5281 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
5282 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5283 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
5284 (convert_local_omp_clauses): Likewise. Remove useless test.
5285 * tree-parloops.c (create_call_for_reduction_1): Pass
5286 OMP_MEMORY_ORDER_RELAXED as new argument to
5287 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
5288 * tree-pretty-print.c (dump_omp_iterators): New function.
5289 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
5290 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
5291 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
5292 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
5293 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
5294 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
5295 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
5296 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
5297 (dump_omp_atomic_memory_order): New function.
5298 (dump_generic_node): Use it. Print taskgroup clauses. Print
5299 taskwait with depend clauses.
5300 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
5301 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
5302 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
5303 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
5304 write_ts_omp_clause_tree_pointers): Likewise.
5305
5306 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5307
5308 PR ipa/86395
5309 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
5310 "-missed", "-note", and "-all" sub-options.
5311 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
5312 API.
5313 (can_early_inline_edge_p): Likewise.
5314 (want_early_inline_function_p): Likewise.
5315 (want_inline_self_recursive_call_p): Likewise.
5316 (recursive_inlining): Likewise.
5317 (inline_small_functions): Likewise.
5318 (flatten_function): Likewise.
5319 (ipa_inline): Likewise.
5320 (inline_always_inline_functions): Likewise.
5321 (early_inline_small_functions): Likewise.
5322 (early_inliner): Likewise.
5323 * tree-inline.c (expand_call_inline): Likewise.
5324
5325 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5326
5327 * pretty-print.c (pp_format): Handle %f.
5328 (selftest::test_pp_format): Add test of %f.
5329 * pretty-print.h (pp_double): New macro.
5330
5331 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5332
5333 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
5334 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
5335 (dump_pretty_printer::decode_format): Implement "%C" for
5336 cgraph_node *.
5337 (selftest::test_capture_of_dump_calls): Rename "where" to
5338 "stmt_loc". Convert test_decl to a function decl and set its
5339 location. Add a symbol_table_test RAII instance and a
5340 cgraph_node, using it to test "%C" and dump_symtab_node.
5341
5342 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
5343
5344 PR middle-end/87916
5345 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
5346
5347 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5348
5349 * cgraph.c: Include "selftest.h".
5350 (saved_symtab): New variable.
5351 (selftest::symbol_table_test::symbol_table_test): New ctor.
5352 (selftest::symbol_table_test::~symbol_table_test): New dtor.
5353 (selftest::test_symbol_table_test): New test.
5354 (selftest::cgraph_c_tests): New.
5355 * cgraph.h (saved_symtab): New decl.
5356 (selftest::symbol_table_test): New class.
5357 * selftest-run-tests.c (selftest::run_tests): Call
5358 selftest::cgraph_c_tests.
5359 * selftest.h (selftest::cgraph_c_tests): New decl.
5360
5361 2018-11-08 Richard Biener <rguenther@suse.de>
5362
5363 * tree-data-ref.h (lambda_int): New typedef.
5364 (lambda_vector_gcd): Adjust.
5365 (lambda_vector_new): Likewise.
5366 (lambda_matrix_new): Likewise.
5367 * tree-data-ref.c (print_lambda_vector): Adjust.
5368
5369 2018-11-08 Richard Biener <rguenther@suse.de>
5370
5371 PR tree-optimization/87929
5372 * tree-complex.c (expand_complex_comparison): Clean EH.
5373
5374 2018-11-08 Martin Liska <mliska@suse.cz>
5375
5376 * doc/extend.texi: Reword.
5377 * predict.c (expr_expected_value_1): Likewise.
5378
5379 2018-11-08 Richard Biener <rguenther@suse.de>
5380
5381 PR tree-optimization/87913
5382 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
5383 of extreme values to ordered comparisons.
5384
5385 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5386
5387 PR middle-end/42726
5388 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
5389
5390 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5391
5392 * doc/invoke.texi: Remove leading dash from @opindex entries
5393 throughout the file.
5394
5395 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5396
5397 PR driver/80828
5398 * doc/invoke.texi (Option Summary): Add -e and --entry.
5399 (Link Options): Likewise.
5400
5401 2018-11-07 Nathan Sidwell <nathan@acm.org>
5402
5403 PR 87926
5404 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
5405 --disable-checking bootstrap.
5406
5407 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
5408
5409 * configure: Regenerated.
5410
5411 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5412
5413 PR c/87691
5414 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
5415 to the mode of the widest field iff the widest field has mode class
5416 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
5417 reference.
5418
5419 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
5420
5421 * common.opt: Add -Wattribute-warning.
5422 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
5423 * expr.c (expand_expr_real_1): Add new attribute to warning_at
5424 call to allow user configure behavior of "warning" attribute.
5425
5426 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
5427
5428 * target.def: Put @: after every vs., e.g., and i.e. where it is
5429 followed by whitespace.
5430 * doc/extend.texi: Ditto.
5431 * doc/fragments.texi: Ditto.
5432 * doc/gimple.texi: Ditto.
5433 * doc/implement-c.texi: Ditto.
5434 * doc/install.texi: Ditto.
5435 * doc/invoke.texi: Ditto.
5436 * doc/md.texi: Ditto.
5437 * doc/plugins.texi: Ditto.
5438 * doc/rtl.texi: Ditto.
5439 * doc/sourcebuild.texi: Ditto.
5440 * doc/tm.texi.in: Ditto.
5441 * doc/ux.texi: Ditto.
5442 * doc/tm.texi: Regenerate.
5443
5444 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5445
5446 * config/arm/arm-cpus.in (ares): New entry.
5447 * config/arm/arm-tables.opt: Regenerate.
5448 * config/arm/arm-tune.md: Likewise.
5449 * doc/invoke.texi (ARM Options): Document ares.
5450
5451 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5452
5453 * config/aarch64/aarch64-cores.def (ares): Define.
5454 * config/aarch64/aarch64-tune.md: Regenerate.
5455 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
5456
5457 2018-11-07 Jan Hubicka <jh@suse.cz>
5458
5459 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
5460 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
5461 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
5462 TYPE_DECL.
5463
5464 2018-11-07 Richard Biener <rguenther@suse.de>
5465
5466 PR tree-optimization/87914
5467 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
5468 of nested cycles.
5469 (vectorizable_reduction): Handle shifts and rotates by dispatching
5470 to vectorizable_shift.
5471 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
5472 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
5473 def cases.
5474 (vectorizable_shift): Export and handle being called as
5475 vect_nested_cycle.
5476 (vect_analyze_stmt): Call vectorizable_shift after
5477 vectorizable_reduction.
5478 * tree-vectorizer.h (vectorizable_shift): Declare.
5479
5480 2018-11-07 Jan Hubicka <jh@suse.cz>
5481
5482 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
5483 than const decls in TREE_VALUE of enum.
5484 (dump_type_inheritance_graph): Improve duplicate dumping.
5485 (free_enum_values): New.
5486 (build_type_inheritance_graph): Use it.
5487 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
5488 which are not main variants or not ODR types.
5489 (verify_type_variant): Expect variants to have no TYPE_VALUES.
5490
5491 2018-11-07 Richard Biener <rguenther@suse.de>
5492
5493 * ipa-inline.c (want_inline_small_function_p): Compute
5494 big_speedup_p lazily and last.
5495
5496 2018-11-07 Jan Hubicka <jh@suse.cz>
5497
5498 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
5499 building incomplete variant of complete type.
5500 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
5501 variant of complete type.
5502
5503 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5504
5505 * config/mips/mips.c: Fix typo in documentation of
5506 mips_loongson_ext2_prefetch_cookie.
5507 (mips_option_override): fix brain twister logical.
5508 * config/mips/mips.h: Fix typo in documentation of
5509 ISA_HAS_CTZ_CTO and define pattern.
5510 * config/mips/mips.md (prefetch): Hoist EXT2 above
5511 the 2EF/EXT block.
5512 (prefetch_indexed): Hoist EXT2 above the EXT block.
5513
5514 2018-11-07 Jan Hubicka <jh@suse.cz>
5515
5516 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
5517 return and parameter types of function and method types.
5518 (free_lang_data_in_cgraph): Update.
5519
5520 2018-11-07 Martin Liska <mliska@suse.cz>
5521
5522 PR rtl-optimization/87868
5523 * postreload-gcse.c (eliminate_partially_redundant_load): Set
5524 threshold to max_count if we would overflow.
5525 * profile-count.h: Make max_count a public constant.
5526
5527 2018-11-07 Martin Liska <mliska@suse.cz>
5528
5529 * mem-stats.h: Fix GNU coding style.
5530
5531 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5532
5533 * config/mips/gs264e.md: New.
5534 * config/mips/mips-cpus.def: Define gs264e.
5535 * config/mips/mips-tables.opt: Regenerate.
5536 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5537 gs264e.
5538 (mips_issue_rate): Add support for gs264e.
5539 (mips_multipass_dfa_lookahead): Likewise.
5540 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
5541 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
5542 (MIPS_ASE_MSA_SPEC): New.
5543 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
5544 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
5545 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
5546 * config/mips/mips.md: Include gs264e.md.
5547 (processor): Add gs264e.
5548 * config/mips/mips.opt (MSA): Use Mask instead of Var.
5549 * doc/invoke.texi: Add gs264e to supported architectures.
5550
5551 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5552
5553 * config/mips/gs464e.md: New.
5554 * config/mips/mips-cpus.def: Define gs464e.
5555 * config/mips/mips-tables.opt: Regenerate.
5556 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5557 gs464e.
5558 (mips_issue_rate): Add support for gs464e.
5559 (mips_multipass_dfa_lookahead): Likewise.
5560 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
5561 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
5562 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
5563 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
5564 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
5565 * config/mips/mips.md: Include gs464e.md.
5566 (processor): Add gs464e.
5567 * doc/invoke.texi: Add gs464e to supported architectures.
5568
5569 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5570
5571 * config/mips/loongson3a.md: Rename to ...
5572 * config/mips/gs464.md: ... here.
5573 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
5574 as an alias of gs464 processor.
5575 * config/mips/mips-tables.opt: Regenerate.
5576 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
5577 instead of PROCESSOR_LOONGSON_3A.
5578 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
5579 TUNE_LOONGSON_3A.
5580 (mips_option_override): Enable MMI and EXT for gs464.
5581 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
5582 Rename TUNE_LOONGSON_3A to TUNE_GS464.
5583 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
5584 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
5585 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
5586 TARGET_LOONGSON_3A.
5587 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
5588 (processor): Add gs464;
5589 * doc/invoke.texi: Add gs464 to supported architectures.
5590
5591 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5592
5593 * config/mips/mips-protos.h
5594 (mips_loongson_ext2_prefetch_cookie): New prototype.
5595 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
5596 (mips_option_override): Enable TARGET_LOONGSON_EXT when
5597 TARGET_LOONGSON_EXT2 is true.
5598 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
5599 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
5600 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
5601 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
5602 TARGET_LOONGSON_EXT2.
5603 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
5604 (define_insn "ctz<mode>2"): New insn pattern.
5605 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
5606 (define_insn "prefetch_indexed_<mode>"): Include
5607 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
5608 * config/mips/mips.opt (-mloongson-ext2): Add option.
5609 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
5610
5611 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5612
5613 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
5614 __mips_loongson_ext.
5615 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
5616 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
5617 -mloongson-ext.
5618 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
5619 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
5620 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
5621 instead of TARGET_LOONGSON_3A.
5622 * config/mips/mips.opt (-mloongson-ext): Add option.
5623 * gcc/doc/invoke.texi (-mloongson-ext): Document.
5624
5625 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5626
5627 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
5628 * config/mips/loongson.md: Move to ...
5629 * config/mips/loongson-mmi.md: here; Adjustment.
5630 * config/mips/loongson.h: Move to ...
5631 State as deprecated. Include loongson-mmiintrin.h for back
5632 compatibility and warning.
5633 * config/mips/loongson-mmiintrin.h: ... here.
5634 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
5635 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
5636 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5637 (mips_option_override): Make sure MMI use hard float;
5638 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
5639 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
5640 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
5641 TARGET_LOONGSON_VECTORS.
5642 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
5643 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
5644 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
5645 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
5646 -mloongson-mmi.
5647 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
5648 TARGET_LOONGSON_VECTORS.
5649 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
5650 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5651 (Loongson MMI patterns): Include loongson-mmi.md instead of
5652 loongson.md.
5653 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
5654 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
5655
5656 2018-11-07 Richard Biener <rguenther@suse.de>
5657
5658 PR lto/87906
5659 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
5660 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
5661
5662 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
5663
5664 PR rtl-optimization/87874
5665 * lra.c (lra_substitute_pseudo): Do not create a subreg for
5666 const wide ints.
5667
5668 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
5669
5670 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
5671 if not in indexed or indirect form.
5672 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
5673 (bswap<mode>2_store): Ditto.
5674
5675 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
5676
5677 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
5678 the UNSPEC.
5679
5680 2018-11-06 Richard Biener <rguenther@suse.de>
5681
5682 PR tree-optimization/86850
5683 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
5684 instead of src.m_vec.
5685
5686 2018-11-06 Jan Hubicka <jh@suse.cz>
5687
5688 * tree.c (fld_simplified_type_name): Break out form ...
5689 (free_lang_data_in_type): ... here.
5690 (fld_type_variant_equal_p): Use it.
5691
5692 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5693
5694 * config/default-d.c: Include memmodel.h.
5695
5696 * config/sol2-d.c: New file.
5697 * config/t-sol2 (sol2-d.o): New rule.
5698 * config.gcc <*-*-solaris2*>: Set d_target_objs,
5699 target_has_targetdm.
5700
5701 2018-11-06 Jan Hubicka <jh@suse.cz>
5702
5703 * tree.c (fld_type_variant): Also copy alignment; be sure that
5704 new variant is equal.
5705
5706 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
5707
5708 PR target/87762
5709 * config/s390/s390.md: Add relative_long attribute.
5710
5711 2018-11-06 Jan Hubicka <jh@suse.cz>
5712
5713 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
5714 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
5715 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
5716 stream TYPE_NEEDS_CONSTRUCTING.
5717 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
5718 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
5719
5720 2018-11-06 Richard Biener <rguenther@suse.de>
5721
5722 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
5723 dump-scope ...
5724 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
5725
5726 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5727
5728 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
5729 REG_CLASS_CONTENTS[GEN_REGS].
5730 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
5731
5732 2018-11-06 Jan Hubicka <jh@suse.cz>
5733
5734 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
5735
5736 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5737
5738 PR sanitizer/80953
5739 * config/sol2.h (ASAN_CC1_SPEC): Define.
5740 (LD_WHOLE_ARCHIVE_OPTION): Define.
5741 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
5742 (ASAN_REJECT_SPEC): Provide default.
5743 (LIBASAN_EARLY_SPEC): Define.
5744 (LIBTSAN_EARLY_SPEC): Define.
5745 (LIBLSAN_EARLY_SPEC): Define.
5746 * config/i386/sol2.h (CC1_SPEC): Redefine.
5747 (ASAN_REJECT_SPEC): Define.
5748
5749 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
5750 (TARGET_ASAN_SHADOW_OFFSET): Define.
5751 (sparc_asan_shadow_offset): New function.
5752 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
5753 (ASAN_REJECT_SPEC): Define.
5754
5755 2018-11-06 Jan Hubicka <jh@suse.cz>
5756
5757 * tree.c (fld_type_variant): Copy canonical type.
5758 (fld_incomplete_type_of): Check that canonical types looks sane;
5759 copy canonical type.
5760 (verify_type): Accept when incomplete type has complete canonical type.
5761
5762 2018-11-06 Jan Hubicka <jh@suse.cz>
5763
5764 * tree.c (free_lang_data): Reset overwite_assembler_name,
5765 print_xnode, print_decl, print_type and print_identifier of
5766 langhooks.
5767
5768 2018-11-06 Richard Biener <rguenther@suse.de>
5769
5770 PR tree-optimization/87889
5771 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
5772 Do nothing if old and new arg are the same
5773
5774 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
5775
5776 PR target/87723
5777 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
5778 attributes for operands 3 and 4.
5779
5780 2018-11-06 Richard Biener <rguenther@suse.de>
5781
5782 PR middle-end/18041
5783 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
5784 matching bitfield insertion.
5785
5786 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
5787
5788 * auto-inc-dec.c: Include valtrack.h. Improve comments.
5789 (reg_next_debug_use): New.
5790 (attempt_change): Propagate adjusted expression into affected
5791 debug insns.
5792 (merge_in_block): Track uses in debug insns.
5793 (pass_inc_dec::execute): Allocate and release
5794 reg_next_debug_use.
5795
5796 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
5797
5798 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
5799 (_mm512_fixupimm_round_pd): Update parameters and builtin.
5800 (_mm512_maskz_fixupimm_round_pd): Ditto.
5801 (_mm512_fixupimm_round_ps): Ditto.
5802 (_mm512_maskz_fixupimm_round_ps): Ditto.
5803 (_mm_fixupimm_round_sd): Ditto.
5804 (_mm_maskz_fixupimm_round_sd): Ditto.
5805 (_mm_fixupimm_round_ss): Ditto.
5806 (_mm_maskz_fixupimm_round_ss): Ditto.
5807 (_mm512_fixupimm_pd): Ditto.
5808 (_mm512_maskz_fixupimm_pd): Ditto.
5809 (_mm512_fixupimm_ps): Ditto.
5810 (_mm512_maskz_fixupimm_ps): Ditto.
5811 (_mm_fixupimm_sd): Ditto.
5812 (_mm_maskz_fixupimm_sd): Ditto.
5813 (_mm_fixupimm_ss): Ditto.
5814 (_mm_maskz_fixupimm_ss): Ditto.
5815 (_mm512_mask_fixupimm_round_pd): Update builtin.
5816 (_mm512_mask_fixupimm_round_ps): Ditto.
5817 (_mm_mask_fixupimm_round_sd): Ditto.
5818 (_mm_mask_fixupimm_round_ss): Ditto.
5819 (_mm512_mask_fixupimm_pd): Ditto.
5820 (_mm512_mask_fixupimm_ps): Ditto.
5821 (_mm_mask_fixupimm_sd): Ditto.
5822 (_mm_mask_fixupimm_ss): Ditto.
5823 * config/i386/avx512vlintrin.h:
5824 (_mm256_fixupimm_pd): Update parameters and builtin.
5825 (_mm256_maskz_fixupimm_pd): Ditto.
5826 (_mm256_fixupimm_ps): Ditto.
5827 (_mm256_maskz_fixupimm_ps): Ditto.
5828 (_mm_fixupimm_pd): Ditto.
5829 (_mm_maskz_fixupimm_pd): Ditto.
5830 (_mm_fixupimm_ps): Ditto.
5831 (_mm_maskz_fixupimm_ps): Ditto.
5832 (_mm256_mask_fixupimm_pd): Update builtin.
5833 (_mm256_mask_fixupimm_ps): Ditto.
5834 (_mm_mask_fixupimm_pd): Ditto.
5835 (_mm_mask_fixupimm_ps): Ditto.
5836 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
5837 * config/i386/i386-builtin.def: Update builtin definitions.
5838 * config/i386/i386.c: Handle new builtin types and remove useless ones.
5839 * config/i386/sse.md: Update VFIXUPIMM* patterns.
5840 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
5841 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
5842 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
5843 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
5844 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
5845 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
5846 * config/i386/subst.md:
5847 (round_saeonly_sd_mask_operand4): Add new subst_attr.
5848 (round_saeonly_sd_mask_op4): Ditto.
5849 (round_saeonly_expand_operand5): Ditto.
5850 (round_saeonly_expand): Update.
5851
5852 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
5853
5854 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
5855
5856 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
5857
5858 PR rtl-optimization/87871
5859 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
5860
5861 2018-11-05 Paul Koning <ni1d@arrl.net>
5862
5863 * doc/sourcebuild.texi (target attributes): Document new "inf"
5864 effective target keyword.
5865
5866 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
5867
5868 * config/s390/s390.c (s390_register_move_cost): Increase costs for
5869 moves involving the CC reg.
5870
5871 2018-11-05 Richard Biener <rguenther@suse.de>
5872
5873 PR tree-optimization/87873
5874 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
5875 argument.
5876 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
5877 * tree-vect-loop.c (vect_transform_loop): When splitting the
5878 loop exit also create forwarder PHIs for constants.
5879 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
5880 Handle constant to_arg, add extra checking we match up the correct
5881 PHIs.
5882
5883 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
5884
5885 * config/s390/s390.md: QImode and HImode for load on condition.
5886
5887 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
5888
5889 * config/s390/predicates.md: Fix typo.
5890 * config/s390/s390.md: Allow immediates for load on condition.
5891
5892 2018-11-05 Martin Liska <mliska@suse.cz>
5893
5894 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
5895 * bitmap.h (struct bitmap_usage): Likewise.
5896 * ggc-common.c (SCALE): Remove.
5897 (LABEL): Likewise.
5898 (struct ggc_usage): Use SIZE_AMOUNT. And update
5899 compare method.
5900 * ggc-page.c (SCALE): Remove.
5901 (STAT_LABEL): Remove.
5902 (ggc_print_statistics): Use SIZE_AMOUNT.
5903 * gimple.h (SCALE): Remove.
5904 (LABEL): Likewise.
5905 * input.c (ONE_K): Remove.
5906 (ONE_M): Likewise.
5907 (SCALE): Likewise.
5908 (STAT_LABEL): Likewise.
5909 (FORMAT_AMOUNT): Likewise.
5910 (dump_line_table_statistics): Use SIZE_AMOUNT.
5911 * mem-stats.h (struct mem_usage): Likewise.
5912 * rtl.c (dump_rtx_statistics): Likewise.
5913 (rtx_alloc_counts): Change type to size_t.
5914 (rtx_alloc_sizes): Likewise.
5915 (rtx_count_cmp): New.
5916 (dump_rtx_statistics): Sort first based on counts.
5917 * tree.c (tree_nodes_cmp): New.
5918 (tree_codes_cmp): New.
5919 (dump_tree_statistics): Sort first based on counts.
5920 * system.h (ONE_K): New.
5921 (ONE_M): Likewise.
5922 (SIZE_SCALE): Likewise.
5923 (SIZE_LABEL): Likewise.
5924 (SIZE_AMOUNT): Likewise.
5925 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
5926 * tree-dfa.c (dump_dfa_stats): Likewise.
5927 * tree-phinodes.c (phinodes_print_statistics): Likewise.
5928 * tree-ssanames.c (ssanames_print_statistics): Likewise.
5929 * tree.c (dump_tree_statistics): Likewise.
5930 * vec.c (struct vec_usage): Likewise.
5931 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
5932 trigger a -Werror=format-overflow with
5933 --enable-gather-detailed-stats.
5934
5935 2018-11-05 Martin Liska <mliska@suse.cz>
5936
5937 * mem-stats.h (mem_alloc_description::release_instance_overhead):
5938 Return T *.
5939 * vec.c (struct vec_usage): Register m_element_size.
5940 (vec_prefix::register_overhead): New arguments: elements and
5941 element_size.
5942 (vec_prefix::release_overhead): Subtract elements.
5943 * vec.h (struct vec_prefix): Change signature.
5944 (va_heap::reserve): Pass proper arguments.
5945 (va_heap::release): Likewise.
5946
5947 2018-11-05 Martin Liska <mliska@suse.cz>
5948
5949 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
5950 style.
5951 * vec.c: Likewise.
5952
5953 2018-11-05 Richard Biener <rguenther@suse.de>
5954
5955 * tree-scalar-evolution.h (final_value_replacement_loop): Update
5956 prototype.
5957 * tree-scalar-evolution.c (final_value_replacement_loop): Return
5958 whether anything was done.
5959 (scev_const_prop): Remove constant propagation part, fold
5960 remains into ...
5961 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
5962 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
5963 conditionally.
5964
5965 2018-11-05 Jakub Jelinek <jakub@redhat.com>
5966
5967 PR tree-optimization/87859
5968 * gimple-ssa-store-merging.c (struct merged_store_group): Add
5969 only_constants and first_nonmergeable_order members.
5970 (merged_store_group::merged_store_group): Initialize them.
5971 (merged_store_group::do_merge): Clear only_constants member if
5972 adding something other than INTEGER_CST store.
5973 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
5974 stores with order >= first_nonmergeable_order. Use
5975 merged_store->only_constants instead of always recomputing it.
5976 Set merged_store->first_nonmergeable_order if we've skipped any
5977 stores. Attempt to merge overlapping INTEGER_CST stores that
5978 we would otherwise skip.
5979
5980 PR sanitizer/87837
5981 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
5982
5983 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
5984
5985 PR target/87853
5986 * config/i386/emmintrin.h (__v16qs): New to cope with option
5987 -funsigned-char.
5988 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
5989 (_mm_cmplt_epi8): Likewise.
5990 (_mm_cmpgt_epi8): Likewise.
5991
5992 2018-11-05 Richard Biener <rguenther@suse.de>
5993
5994 PR rtl-optimization/87852
5995 * fwprop.c (use_killed_between): Only consider single-defs of the
5996 use whose definition statement dominates the use.
5997
5998 2018-11-05 Martin Liska <mliska@suse.cz>
5999
6000 PR web/87829
6001 * doc/invoke.texi: Remove options that are
6002 not disabled with -Os.
6003
6004 2018-11-05 Martin Liska <mliska@suse.cz>
6005
6006 PR c/87811
6007 * doc/extend.texi: Update constrain about the last argument
6008 of __builtin_expect_with_probability.
6009
6010 2018-11-05 Martin Liska <mliska@suse.cz>
6011
6012 PR c/87811
6013 * predict.c (expr_expected_value_1): Verify
6014 that last argument is a real constants and emit
6015 error.
6016
6017 2018-11-05 Martin Liska <mliska@suse.cz>
6018
6019 PR gcov-profile/77698
6020 * ipa-profile.c (ipa_profile): Adjust hotness threshold
6021 only in LTO mode.
6022
6023 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6024
6025 PR tree-optimization/86572
6026 * builtins.c (c_strlen): Handle negative offsets in a safe way.
6027
6028 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6029
6030 PR tree-optimization/87672
6031 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
6032 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
6033
6034 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
6035
6036 PR middle-end/58372
6037 * cfgexpand.c (pass_expand::execute): Move the call to
6038 finish_eh_generation in front of the call to expand_stack_alignment.
6039
6040 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
6041
6042 * common/config/i386/i386-common.c (processor_alias_table): Add
6043 znver2 entry.
6044 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
6045 (case ${target}): Add znver2.
6046 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
6047 -march=native recognize znver2 processors.
6048 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
6049 * config/i386/i386.c (m_znver2): New definition.
6050 (m_ZNVER): New definition.
6051 (m_AMD_MULTIPLE): Includes m_znver2.
6052 (processor_cost_table): Add znver2 entry.
6053 (processor_target_table): Add znver2 entry.
6054 (get_builtin_code_for_version): Set priority for
6055 PROCESSOR_ZNVER2.
6056 (processor_model): Add M_AMDFAM17H_ZNVER2.
6057 (arch_names_table): Ditto.
6058 (ix86_reassociation_width): Include znver2.
6059 * config/i386/i386.h (TARGET_znver2): New definition.
6060 (struct ix86_size_cost): Add TARGET_ZNVER2.
6061 (enum processor_type): Add PROCESSOR_ZNVER2.
6062 * config/i386/i386.md (define_attr "cpu"): Add znver2.
6063 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
6064 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
6065 (ix86_adjust_cost): Add znver2.
6066 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
6067 * gcc/doc/extend.texi: Add details about znver2.
6068 * gcc/doc/invoke.texi: Add details about znver2.
6069
6070 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
6071
6072 PR target/87079
6073
6074 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
6075 pattern.
6076
6077 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6078
6079 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
6080 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
6081
6082 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
6083
6084 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
6085 shrink-wrapping when -mtrack-speculation.
6086
6087 2018-11-02 Richard Biener <rguenther@suse.de>
6088
6089 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
6090 (pop_cost_one_pair): Do not free pair.
6091 (pop_best_coalesce): Likewise.
6092 (create_coalesce_list): Initialize obstack.
6093 (delete_coalesce_list): Free obstack.
6094 (find_coalesce_pair): Obstack-allocate coalesce pairs.
6095 (add_cost_one_coalesce): Likewise.
6096 (struct live_track): Remove bitmap pointer indirections.
6097 (new_live_track): Adjust.
6098 (delete_live_track): Likewise.
6099 (live_track_remove_partition): Likewise.
6100 (live_track_add_partition): Likewise.
6101 (live_track_live_p): Likewise.
6102 (live_track_process_def): Likewise.
6103 (live_track_clear_base_vars): Likewise.
6104
6105 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6106
6107 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
6108 * configure: Regenerate.
6109 * config.in: Regenerate.
6110 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
6111 HAVE_AS_REGISTER_PSEUDO_OP guard.
6112 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
6113 !HAVE_AS_REGISTER_PSEUDO_OP support.
6114 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
6115 guard.
6116
6117 2018-11-02 Richard Biener <rguenther@suse.de>
6118
6119 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
6120 with is_type_die.
6121
6122 2018-11-02 Richard Biener <rguenther@suse.de>
6123
6124 PR tree-optimization/87776
6125 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
6126 executable when iterating but running into rpo-vn-max-loop-depth
6127 and not eliding the iteration.
6128
6129 2018-11-30 Jan Hubicka <jh@suse.cz>
6130
6131 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
6132 TYPE_DECL.
6133
6134 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
6135
6136 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
6137 prototype.
6138 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
6139 Combine with rs6000_address_for_fpconvert.
6140 (rs6000_address_for_fpconvert): Combine with
6141 rs6000_force_indexed_or_indirect_mem.
6142 (rs6000_expand_vector_init): Change function call from
6143 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6144 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
6145 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6146 (floatsi<mode>2_lfiwax_mem): Ditto.
6147 (floatunssi<mode>2_lfiwzx): Ditto.
6148 (floatunssi<mode>2_lfiwzx_mem): Ditto.
6149 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
6150 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
6151 (fix_trunc<mode>si2_stfiwx): Ditto.
6152 (fixuns_trunc<mode>si2_stfiwx): Ditto.
6153 (float_<mode>si2_hw): Ditto.
6154 (floatuns_<mode>si2_hw): Ditto.
6155 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
6156 (vsx_splat_<mode>): Ditto.
6157
6158 2018-11-01 Joseph Myers <joseph@codesourcery.com>
6159
6160 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
6161 at end of assembler input text.
6162 * configure: Regenerate.
6163
6164 2018-11-01 Jakub Jelinek <jakub@redhat.com>
6165
6166 PR tree-optimization/87826
6167 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
6168 negative or larger or equal to type's precision.
6169
6170 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
6171
6172 * opts.c (default_options_table): Do not enable
6173 OPT_fdelayed_branch at -Og.
6174 * doc/invoke.texi (-fdelayed-branch): Document it.
6175
6176 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6177
6178 * optabs-libfuncs.c (build_libfunc_function_visibility):
6179 New, split out from...
6180 (build_libfunc_function): ... here.
6181 (init_one_libfunc_visibility): New, split out from ...
6182 (init_one_libfunc): ... here.
6183
6184 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
6185 scratch register need not be early-clobber. Document the reason
6186 why we cannot use ST<OP>.
6187
6188 2018-10-31 Joseph Myers <joseph@codesourcery.com>
6189
6190 PR bootstrap/82856
6191 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
6192 line for second argument of AC_DEFINE_UNQUOTED.
6193 * doc/install.texi (Tools/packages necessary for modifying GCC):
6194 Update to autoconf 2.69 and automake 1.15.1.
6195 * aclocal.m4, config.in, configure: Regenerate.
6196
6197 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
6198
6199 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
6200 initialization.
6201
6202 2018-10-31 Martin Liska <mliska@suse.cz>
6203
6204 PR driver/83193
6205 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
6206 Add new argument invalid_extension.
6207 (aarch64_get_all_extension_candidates): New function.
6208 (aarch64_rewrite_selected_cpu): Add NULL to function call.
6209 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
6210 new argument.
6211 (aarch64_get_all_extension_candidates): New function.
6212 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
6213 argument invalid_extension.
6214 (aarch64_parse_cpu): Likewise.
6215 (aarch64_print_hint_for_extensions): New function.
6216 (aarch64_validate_mcpu): Provide hint about invalid extension.
6217 (aarch64_validate_march): Likewise.
6218 (aarch64_handle_attr_arch): Pass new argument.
6219 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
6220 (aarch64_handle_attr_isa_flags): Likewise.
6221
6222 2018-10-31 Richard Biener <rguenther@suse.de>
6223
6224 PR middle-end/70359
6225 PR middle-end/86270
6226 * tree-outof-ssa.c (insert_backedge_copies): Restrict
6227 copy generation to useful cases. Place the copy before
6228 the definition of the backedge value when possible.
6229
6230 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6231
6232 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
6233 * config/arc/arc.c (arc_active_insn): New function.
6234 (check_store_cacheline_hazard): Likewise.
6235 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
6236 (arc_override_options): Disable delay slot scheduler for older
6237 A7.
6238 (arc_store_addr_hazard_p): New implementation, old one renamed to
6239 ...
6240 (arc_store_addr_hazard_internal_p): Renamed.
6241 (arc_reorg): Don't combine into brcc instructions which are part
6242 of hardware hazard solution.
6243 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
6244 (tune_arc700): Likewise.
6245 * config/arc/arc.opt (arc7xx): New tune value.
6246 * config/arc/arc700.md: Improve A7 scheduler.
6247
6248 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6249
6250 * config/arc/arc.c (arc_override_options): Remove
6251 TARGET_COMPACT_CASESI.
6252 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
6253 (CASE_VECTOR_MODE): Likewise.
6254 (CASE_VECTOR_PC_RELATIVE): Likewise.
6255 (CASE_VECTOR_SHORTEN_MODE): Likewise.
6256 (CASE_VECTOR_SHORTEN_MODE1): Delete.
6257 (ADDR_VEC_ALIGN): Update.
6258 (ASM_OUTPUT_CASE_LABEL): Undefine.
6259 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
6260 (TARGET_BI_BIH): Define.
6261 (DEFAULT_BRANCH_INDEX): Likewise.
6262 * config/arc/arc.md (casesi): Rework to accept BI/BIH
6263 instructions, remove compact_casesi use case.
6264 (casesi_compact_jump): Remove.
6265 (casesi_dispatch): New pattern.
6266 * config/arc/arc.opt: Add mbranch-index option. Deprecate
6267 compact_casesi option.
6268 * doc/invoke.texi: Document mbranch-index option.
6269
6270 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6271
6272 * config/arc/arc.c (arc_get_tp): Remove function.
6273 (arc_emit_call_tls_get_addr): Likewise.
6274 (arc_call_tls_get_addr): New function.
6275 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
6276 * config/arc/arc.md (tls_load_tp_soft): Remove.
6277 (tls_gd_get_addr): Likewise.
6278
6279 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6280
6281 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
6282 (mulsi3_600_lib): Remove pattern.
6283 (umulsi3_highpart_600_lib_le): Likewise.
6284 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
6285 (umulsidi3): Remove call to umulsidi3_600_lib.
6286 (umulsidi3_600_lib): Remove pattern.
6287 (peephole2): Remove peephole using the above deprecated patterns.
6288
6289 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6290
6291 PR target/87374
6292 * config/arm/arm.c (arm_option_check_internal): Disable the combined
6293 use of -mslow-flash-data and -mword-relocations.
6294 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
6295 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
6296 flag_pic.
6297 * doc/invoke.texi (-mword-relocations): Mention conflict with
6298 -mslow-flash-data.
6299 (-mslow-flash-data): Reciprocally.
6300
6301 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6302
6303 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
6304 16-byte modes held in GP registers to use an even regno.
6305
6306 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
6307 (aarch64_atomic_ldop_supported_p): Remove.
6308 (aarch64_gen_atomic_ldop): Remove.
6309 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
6310 Fully expand LSE operations here.
6311 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
6312 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
6313 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
6314 and use ATOMIC_LDOP instead; use register_operand for the input;
6315 drop the split and emit insns directly.
6316 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
6317 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
6318 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
6319
6320 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
6321 (aarch64_gen_atomic_ldop): Don't call it.
6322 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
6323 Use aarch64_reg_or_zero.
6324 (aarch64_atomic_exchange<ALLI>): Likewise.
6325 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
6326 operand 0; use aarch64_reg_or_zero for input; merge ...
6327 (@aarch64_atomic_swp<ALLI>): ... this and remove.
6328
6329 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
6330 (aarch64_split_compare_and_swap): Use it.
6331 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
6332 test oldval against the proper predicate.
6333 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
6334 Use nonmemory_operand for expected.
6335 (cas_short_expected_pred): New.
6336 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
6337 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
6338 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
6339 (aarch64_plushi_operand): New.
6340
6341 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
6342 Force oldval into the rval register for TARGET_LSE; emit the compare
6343 during initial expansion so that it may be deleted if unused.
6344 (aarch64_gen_atomic_cas): Remove.
6345 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
6346 Change =&r to +r for operand 0; use match_dup for operand 2;
6347 remove is_weak and mod_f operands as unused. Drop the split
6348 and merge with...
6349 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
6350 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
6351 (@aarch64_atomic_cas<GPI>): Similarly.
6352
6353 2018-10-31 Richard Biener <rguenther@suse.de>
6354
6355 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
6356 using ABSU_EXPR.
6357
6358 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6359
6360 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
6361 * config/aarch64/aarch64.md: Include saphira.md
6362 * config/aarch64/saphira.md: New file for pipeline description.
6363
6364 2018-10-30 Martin Sebor <msebor@redhat.com>
6365
6366 PR middle-end/87041
6367 * gimple-ssa-sprintf.c (format_directive): Use %G to include
6368 inlining context.
6369 (sprintf_dom_walker::compute_format_length):
6370 Avoid setting POSUNDER4K here.
6371 (get_destination_size): Handle null argument values.
6372 (get_user_idx_format): New function.
6373 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
6374 functions, including user-defined with attribute format printf.
6375 Use %G to include inlining context.
6376 Set POSUNDER4K here.
6377
6378 2018-10-30 Jan Hubicka <jh@suse.cz>
6379
6380 * params.def (lto-partitions): Bump from 32 to 128.
6381
6382 2018-10-30 Jan Hubicka <jh@suse.cz>
6383
6384 * tree.c
6385 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
6386 head in file.
6387 (free_lang_data_in_type): Forward declare.
6388 (fld_type_variant_equal_p): New function.
6389 (fld_type_variant): New function
6390 (fld_incomplete_types): New hash.
6391 (fld_incomplete_type_of): New function
6392 (fld_simplfied-type): New function.
6393 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
6394 (free_lang_data): Allocate and free fld_incomplete_type; update call
6395 of free_lang_data_in_decl.
6396
6397 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
6398
6399 * gcov.c (output_lines): Remove duplicate line.
6400
6401 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
6402
6403 * config/rs6000/rs6000.md (bswapdi2): Force address into register
6404 if not in indexed or indirect form.
6405 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
6406 (bswapdi2_store): Ditto.
6407 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
6408 helper function.
6409 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
6410 Prototype for helper function.
6411
6412 2018-10-30 Martin Sebor <msebor@redhat.com>
6413
6414 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
6415 (target, pragma GCC optimize, pragma GCC target): Ditto.
6416
6417 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
6418
6419 * doc/extend.texi: Fix prototype and description of
6420 __builtin_expect_with_probability.
6421
6422 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
6423
6424 * cgraph.h (clone_function_name_1): Replaced by new
6425 clone_function_name_numbered that takes name as string; for
6426 privatize_symbol_name_1 use only.
6427 (clone_function_name): Renamed to
6428 clone_function_name_numbered to be explicit about numbering.
6429 (clone_function_name): New two-argument function that does
6430 not number its output.
6431 (clone_function_name): New three-argument function that
6432 takes a number to append to its output.
6433 * cgraphclones.c (duplicate_thunk_for_node):
6434 (clone_function_name_1): Renamed.
6435 (clone_function_name_numbered): Two new functions.
6436 (clone_function_name): Improved documentation.
6437 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
6438 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
6439 * final.c (final_scan_insn_1): Use the new clone_function_name
6440 without numbering.
6441 * multiple_target.c (create_dispatcher_calls): Ditto.
6442 (create_target_clone): Ditto.
6443 * omp-expand.c (grid_expand_target_grid_body): Ditto.
6444 * omp-low.c (create_omp_child_function_name): Ditto.
6445 * omp-simd-clone.c (simd_clone_create): Ditto.
6446 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
6447 new clone_function_name without numbering.
6448
6449 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
6450
6451 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
6452 Assert that the allocation size is not zero.
6453
6454 2018-10-30 Richard Biener <rguenther@suse.de>
6455
6456 PR tree-optimization/87800
6457 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
6458 non-induction or reduction PHIs.
6459
6460 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org>
6461
6462 * config/aarch64/falkor-tag-collision-avoidance.c
6463 (execute_tag_collision_avoidance): Call df_note_add_problem.
6464
6465 2018-10-30 Martin Liska <mliska@suse.cz>
6466
6467 * doc/extend.texi: Fix typo in documentation
6468 of __builtin_expect_with_probability.
6469
6470 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6471
6472 PR c++/87721
6473 * input.c (get_substring_ranges_for_loc): Detect if
6474 linemap_resolve_location gives us a NULL map, and reject
6475 this case.
6476
6477 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
6478
6479 * config.gcc (xstormy16-*-elf): Set tm_d_file.
6480
6481 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6482 Martin Sebor <msebor@redhat.com>
6483 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6484
6485 * doc/ux.texi (Quoting): New subsection, adapted from material at
6486 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
6487 MartinSebor and ManuelLopezIbanez.
6488 (Fix-it hints): Note that fix-it hints shouldn't be marked for
6489 translation.
6490
6491 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
6492
6493 PR middle-end/87469
6494 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
6495 max value.
6496
6497 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6498
6499 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
6500
6501 2018-10-29 Paul Koning <ni1d@arrl.net>
6502
6503 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
6504
6505 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6506
6507 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
6508 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
6509 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
6510 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
6511 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
6512 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
6513 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
6514 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
6515 Change 'vector' to '__vector'.
6516 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
6517 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
6518 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
6519 _mm_avg_pu16): Likewise. And, whitespace corrections.
6520
6521 2018-10-29 Richard Biener <rguenther@suse.de>
6522
6523 PR tree-optimization/87785
6524 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
6525 internal defs.
6526
6527 2018-10-29 Olivier Hainque <hainque@adacore.com>
6528
6529 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
6530
6531 2018-10-29 Olivier Hainque <hainque@adacore.com>
6532
6533 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
6534 ports configuration macro, defaults to "gnu".
6535 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
6536 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
6537
6538 2018-10-29 Olivier Hainque <hainque@adacore.com>
6539
6540 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
6541
6542 2018-10-29 Richard Biener <rguenther@suse.de>
6543
6544 PR tree-optimization/87790
6545 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
6546 (vect_make_slp_decision): Adjust.
6547 (vect_slp_analyze_bb_1): Likewise.
6548 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
6549 edges.
6550
6551 2018-10-29 Richard Biener <rguenther@suse.de>
6552
6553 PR tree-optimization/87785
6554 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
6555 and processing.
6556 (vect_build_slp_tree): Likewise.
6557 (vect_gather_slp_loads): New function.
6558 (vect_analyze_slp_instance): Gather loads separately from the
6559 SLP tree build.
6560
6561 2018-10-29 Martin Liska <mliska@suse.cz>
6562
6563 * Makefile.in: Make dependency to json.o.
6564 * doc/gcov.texi: Document new JSON format, remove
6565 old intermediate format documentation.
6566 * gcov.c (struct function_info): Come up with m_name and
6567 m_demangled_name.
6568 (function_info::function_info): Initialize it.
6569 (function_info::~function_info): Release it.
6570 (main): Rename flag_intermediate_format to flag_json_format.
6571 (print_usage): Describe --json-format.
6572 (process_args): Set flag_json_format.
6573 (output_intermediate_line): Remove.
6574 (output_intermediate_json_line): Likewise.
6575 (get_gcov_intermediate_filename): Return new extension
6576 ".gcov.json.gz".
6577 (output_intermediate_file): Implement JSON emission.
6578 (output_json_intermediate_file): Implement JSON emission.
6579 (generate_results): Use ::get_name for function name.
6580 Handle JSON output file.
6581 (read_graph_file): Use ::get_name instead of cplus_demangle.
6582 (read_count_file): Likewise.
6583 (solve_flow_graph): Likewise.
6584 (add_line_counts): Likewise.
6585 (accumulate_line_counts): Use new flag_json_format.
6586 (output_function_details): Use ::get_name instead of cplus_demangle.
6587 (output_lines): Likewise.
6588 * json.cc (test_writing_literals): Add new tests.
6589 * json.h (class literal): Add new boolean constructor.
6590
6591 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
6592
6593 PR rtl-optimization/87701
6594 PR rtl-optimization/87780
6595 * combine.c (make_more_copies): Rewrite.
6596
6597 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
6598
6599 * doc/generic.texi (ABSU_EXPR): Document.
6600 * match.pd (absu(x)*absu(x) -> x*x): Handle.
6601 (absu(absu(X)) -> absu(X)): Likewise.
6602 (absu(-X) -> absu(X)): Likewise.
6603 (absu(X) where X is nonnegative -> X): Likewise.
6604
6605 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
6606
6607 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
6608 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
6609 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
6610 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
6611 (s-tm-texi): Also check timestamp on d-target.def.
6612 (generated_files): Add TM_D_H and d-target-hooks-def.h.
6613 (build/genhooks.o): Also depend on D_TARGET_DEF.
6614 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
6615 variables.
6616 * config/aarch64/aarch64-d.c: New file.
6617 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
6618 Define.
6619 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
6620 prototype.
6621 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
6622 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
6623 * config/arm/arm-d.c: New file.
6624 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
6625 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
6626 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6627 * config/arm/t-arm (arm-d.o): New rule.
6628 * config/default-d.c: New file.
6629 * config/glibc-d.c: New file.
6630 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6631 * config/i386/i386-d.c: New file.
6632 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
6633 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
6634 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6635 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
6636 * config/i386/t-i386 (i386-d.o): New rule.
6637 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6638 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6639 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
6640 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6641 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6642 * config/mips/mips-d.c: New file.
6643 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
6644 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
6645 * config/mips/t-mips (mips-d.o): New rule.
6646 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6647 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6648 * config/powerpcspe/powerpcspe-d.c: New file.
6649 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
6650 New prototype.
6651 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6652 Support GNU D by using 0 as the language type.
6653 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
6654 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
6655 * config/riscv/riscv-d.c: New file.
6656 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
6657 prototype.
6658 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
6659 * config/riscv/t-riscv (riscv-d.o): New rule.
6660 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6661 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6662 * config/rs6000/rs6000-d.c: New file.
6663 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
6664 prototype.
6665 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6666 Support GNU D by using 0 as the language type.
6667 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
6668 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
6669 * config/s390/s390-d.c: New file.
6670 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
6671 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
6672 * config/s390/t-s390 (s390-d.o): New rule.
6673 * config/sparc/sparc-d.c: New file.
6674 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
6675 prototype.
6676 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
6677 * config/sparc/t-sparc (sparc-d.o): New rule.
6678 * config/t-glibc (glibc-d.o): New rule.
6679 * configure: Regenerated.
6680 * configure.ac (tm_d_file): New variable.
6681 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
6682 * doc/contrib.texi (Contributors): Add self for the D frontend.
6683 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
6684 * doc/install.texi (Configuration): Mention libphobos as an option for
6685 --enable-shared. Mention d as an option for --enable-languages.
6686 (Testing): Mention check-d as a target.
6687 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
6688 name suffixes. Mention d as a -x option.
6689 * doc/sourcebuild.texi (Top Level): Mention libphobos.
6690 * doc/standards.texi (Standards): Add section on D language.
6691 * doc/tm.texi: Regenerated.
6692 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
6693 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
6694 * dwarf2out.c (is_dlang): New function.
6695 (gen_compile_unit_die): Use DW_LANG_D for D.
6696 (declare_in_namespace): Return module die for D, instead of adding
6697 extra declarations into the namespace.
6698 (gen_namespace_die): Generate DW_TAG_module for D.
6699 (gen_decl_die): Handle CONST_DECLSs for D.
6700 (dwarf2out_decl): Likewise.
6701 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
6702 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
6703 kinds of aggregates.
6704 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
6705 * genhooks.c: Include d/d-target.def.
6706
6707 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
6708
6709 PR target/85669
6710 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
6711 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
6712 (STACK_DYNAMIC_OFFSET): Likewise.
6713
6714 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
6715
6716 PR target/80024
6717 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
6718 error message.
6719
6720 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6721
6722 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
6723 return type and other typos.
6724
6725 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6726
6727 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
6728 a shorter sequence with fewer branches.
6729 (emit_final_str_compare_gpr): Ditto.
6730
6731 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6732
6733 * config/rs6000/tmmintrin.h: New file.
6734 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
6735
6736 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6737
6738 * config/rs6000/mmintrin.h: Enable 32bit compilation.
6739 * config/rs6000/xmmintrin.h: Likewise.
6740
6741 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6742
6743 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
6744
6745 2018-10-26 Richard Biener <rguenther@suse.de>
6746
6747 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
6748 and wrapper.
6749 (vect_mark_slp_stmts_relevant): Likewise.
6750 (vect_detect_hybrid_slp_stmts): Likewise.
6751 (vect_bb_slp_scalar_cost): Likewise.
6752 (vect_remove_slp_scalar_calls): Likewise.
6753
6754 2018-10-26 Jan Hubicka <jh@suse.cz>
6755
6756 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
6757 (warn_types_mismatch): Fix walk of DECL_NAME.
6758 (odr_types_equivalent_p): Fix overactive assert.
6759
6760 2018-10-26 Richard Biener <rguenther@suse.de>
6761
6762 PR tree-optimization/87105
6763 * tree-vectorizer.h (_slp_tree::refcnt): New member.
6764 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
6765 refcnt.
6766 (vect_create_new_slp_node): Initialize refcnt to one.
6767 (bst_traits): Move.
6768 (scalar_stmts_set_t, bst_fail): Remove.
6769 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
6770 (vect_build_slp_tree): Add bst_map argument and lookup
6771 already created SLP nodes.
6772 (vect_print_slp_tree): Handle a SLP graph, print SLP node
6773 addresses.
6774 (vect_slp_rearrange_stmts): Handle a SLP graph.
6775 (vect_analyze_slp_instance): Adjust and free SLP nodes from
6776 the CSE map. Fix indenting.
6777 (vect_schedule_slp_instance): Add short-cut.
6778
6779 2018-10-26 Martin Liska <mliska@suse.cz>
6780
6781 PR testsuite/86158
6782 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
6783 addr_expr and not with pointers.
6784
6785 2018-10-26 Jan Hubicka <jh@suse.cz>
6786
6787 * tree.c (free_lang_data_in_type): Only check main variants.
6788 * ipa-devirt.c (warn_odr): Make static.
6789 (types_same_for_odr): Drop strict variant.
6790 (types_odr_comparable): Likewise.
6791 (odr_or_derived_type_p): Look for main variants.
6792 (odr_name_hasher::equal): Cleanup comment.
6793 (odr_subtypes_equivalent): Add warn and warned arguments; check main
6794 variants.
6795 (type_variants_equivalent_p): break out from ...
6796 (odr_types_equivalent): ... here; go for main variants where needed.
6797 (warn_odr): ... here; turn static.
6798 (warn_types_mismatch): Compare mangled names of main variants.
6799 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
6800 (type_with_linkage_p): Sanity check that we look at main variant.
6801 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
6802 * tree.h (types_same_for_odr): Drop strict argument.
6803
6804 2018-10-26 Richard Biener <rguenther@suse.de>
6805
6806 PR tree-optimization/87746
6807 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
6808 Simplify and fix WRT strided store groups with size not
6809 equal to step in element count.
6810 (vect_analyze_group_access_1): Dump the whole group.
6811
6812 2018-10-25 Carl Love <cel@us.ibm.com>
6813
6814 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
6815 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
6816 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
6817 precicion entry for each overloaded builtin.
6818 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
6819 VSCEDPUO): Rename overloaded name.
6820 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
6821 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
6822 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
6823 define_expand for xscmpexqp instruction.
6824 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
6825
6826 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6827 Jinsong Ji <jji@us.ibm.com>
6828
6829 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
6830 function with vec_sl.
6831 (_mm_slli_epi32): Likewise.
6832 (_mm_slli_epi64): Likewise.
6833 (_mm_srai_epi16): Replace deprecated function with vec_sra.
6834 (_mm_srai_epi32): Likewise.
6835 (_mm_srli_epi16): Replace deprecated function with vec_sr.
6836 (_mm_srli_epi32): Likewise.
6837 (_mm_srli_epi64): Likewise.
6838 (_mm_sll_epi16): Replace deprecated function with vec_sl.
6839 (_mm_sll_epi32): Likewise.
6840 (_mm_sll_epi64): Likewise.
6841 (_mm_sra_epi16): Replace deprecated function with vec_sra.
6842 (_mm_sra_epi32): Likewise.
6843 (_mm_srl_epi16): Replace deprecated function with vec_sr.
6844 (_mm_srl_epi32): Likewise.
6845 (_mm_srl_epi64): Likewise.
6846
6847 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6848 Jinsong Ji <jji@us.ibm.com>
6849
6850 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
6851 comparison operators with vec_cmp* for compatibility due to
6852 unfortunate history; clean up formatting and use types more
6853 appropriately.
6854 (_mm_sll_epi32): Likewise.
6855 (_mm_sll_epi64): Likewise.
6856 (_mm_srl_epi16): Likewise.
6857 (_mm_srl_epi32): Likewise.
6858 (_mm_srl_epi64): Likewise.
6859
6860 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6861 Jinsong Ji <jji@us.ibm.com>
6862
6863 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
6864 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
6865 __vector __bool int. Use vec_cmpgt in preference to deprecated
6866 function vec_vcmpgtfp.
6867 (_mm_max_ps): Likewise.
6868
6869 2018-10-25 Jeff Law <law@redhat.com>
6870
6871 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
6872 if returning false.
6873
6874 2018-10-25 Martin Sebor <msebor@redhat.com>
6875
6876 * doc/extend.texi (aligned): Expand attribute description.
6877 (Alignment): Rename section. Discuss function arguments.
6878
6879 2018-10-25 Jan Hubicka <jh@suse.cz>
6880
6881 * ipa-devirt.c (main_odr_variant): Remove.
6882 (hash_odr_name, types_same_for_odr, types_odr_comparable,
6883 odr_name_hasher::equal, odr_subtypes_equivalent_p):
6884 Drop use of main_odr_variant.
6885 (add_type_duplicate): Silence confused warnings on integer types.
6886 (get_odr_type): Always look for main variant.
6887 (register_odr_type): Simplify.
6888
6889 2018-10-25 Richard Biener <rguenther@suse.de>
6890
6891 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
6892 Initialize ng to silence error with release checking bootstrap.
6893
6894 2018-10-25 Richard Biener <rguenther@suse.de>
6895
6896 * tree-if-conv.c: Include tree-ssa-sccvn.h.
6897 (tree_if_conversion): Run CSE on the if-converted loop body.
6898
6899 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
6900
6901 * config/s390/constraints.md (ZL): New constraint.
6902 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
6903 operands.
6904 * config/s390/s390.md (movdi_larl): Remove.
6905 (movdi_64): Add the LARL alternative.
6906
6907 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
6908
6909 PR bootstrap/87747
6910 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
6911 (RTX_CODE_HWINT_P): New macro.
6912 (rtx_code_size): Use RTX_CODE_HWINT_P ().
6913
6914 2018-10-25 Jan Hubicka <jh@suse.cz>
6915
6916 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
6917 is anonymous.
6918
6919 2018-10-25 Richard Biener <rguenther@suse.de>
6920
6921 PR tree-optimization/87665
6922 PR tree-optimization/87745
6923 * tree-vectorizer.h (get_earlier_stmt): Remove.
6924 (get_later_stmt): Pick up UID from the original non-pattern stmt.
6925
6926 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
6927
6928 * options.texi (Deprecated): Move list to Var section.
6929
6930 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
6931 Jinsong Ji <jji@us.ibm.com>
6932
6933 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
6934 __vector long to __vector long long.
6935 (_mm_cvtpd_ps): Likewise.
6936 (_mm_cvttpd_epi32): Likewise.
6937 (_mm_cvtpi32_pd): Likewise.
6938 (_mm_unpackhi_epi64): Likewise.
6939 (_mm_unpacklo_epi64): Likewise.
6940
6941 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
6942
6943 PR rtl-optimization/87720
6944 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
6945
6946 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
6947
6948 * gimple-ssa-isolate-paths.c
6949 (find_implicit_erroneous_behavior): Do not change code if the
6950 pass is running for warnings only.
6951 (find_explicit_erroneous_behavior): Likewise.
6952
6953 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
6954
6955 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
6956 Define as rs6000_mangle_decl_assembler_name.
6957 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
6958 long double to IEEE long double, switch the names of the long
6959 double built-in functions to be <func>f128 instead of <func>l.
6960
6961 2018-10-24 Martin Sebor <msebor@redhat.com>
6962
6963 * doc/extend.texi (nonnull): List no-argument form. Reference
6964 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
6965
6966 2018-10-24 Richard Biener <rguenther@suse.de>
6967
6968 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
6969
6970 2018-10-24 Martin Liska <mliska@suse.cz>
6971
6972 PR tree-optimization/84436
6973 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
6974 Remove.
6975 (switch_conversion::contains_linear_function_p): New.
6976 (switch_conversion::build_one_array): Support linear
6977 transformation on input.
6978 * tree-switch-conversion.h (struct switch_conversion): Add
6979 contains_linear_function_p declaration.
6980
6981 2018-10-24 Richard Biener <rguenther@suse.de>
6982
6983 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
6984 if its argument is CONSTANT_CLASS_P.
6985
6986 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
6987
6988 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
6989 it is wrong for forward declarations.
6990
6991 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
6992
6993 * config/s390/s390.c (s390_check_qrst_address): Add the missing
6994 SYMBOL_REF_P () check.
6995
6996 2018-10-24 Richard Biener <rguenther@suse.de>
6997
6998 PR tree-optimization/87105
6999 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
7000 dump classification.
7001 (vect_analyze_data_ref_accesses): Handle duplicate loads and
7002 stores by splitting the affected group after the fact.
7003 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
7004 fail the SLP build because of size constraints.
7005
7006 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7007
7008 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
7009 * configure: Regenerate.
7010 * config.in: Regenerate.
7011 * varasm.c (mergeable_string_section): Use readonly_data_section
7012 if linker doesn't support SHF_MERGE with alignment > 8.
7013 (mergeable_constant_section): Likewise.
7014
7015 2018-10-24 Richard Biener <rguenther@suse.de>
7016
7017 PR tree-optimization/84013
7018 * tree-ssa-structalias.c (struct msdi_data): New struct for
7019 marshalling data to walk_stmt_load_store_ops.
7020 (maybe_set_dependence_info): Refactor as callback for
7021 walk_stmt_load_store_ops.
7022 (compute_dependence_clique): Set restrict info on all stmt kinds.
7023
7024 2018-10-24 Martin Liska <mliska@suse.cz>
7025
7026 * cgraph.c (cgraph_node::dump):
7027 Remove reduntant dumps and make tp_first_run dump more compact.
7028
7029 2018-10-24 Richard Biener <rguenther@suse.de>
7030
7031 PR tree-optimization/87665
7032 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
7033 to reflect reality.
7034
7035 2018-10-12 Jeff Law <law@redhat.com>
7036
7037 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
7038 for H8/S.
7039
7040 2018-10-23 Richard Biener <rguenther@suse.de>
7041
7042 * tree-vrp.c (add_assert_info): Guard dump_printf with
7043 dump_enabled_p.
7044 * gimple-ssa-evrp-analyze.c
7045 (evrp_range_analyzer::record_ranges_from_incoming_edge):
7046 Use value_range::ignore_equivs_equal_p.
7047
7048 2018-10-23 Richard Biener <rguenther@suse.de>
7049
7050 PR tree-optimization/87105
7051 PR tree-optimization/87608
7052 * passes.def (pass_all_early_optimizations): Add early phi-opt
7053 after dce.
7054 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
7055 addition to debug stmts.
7056 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
7057 and abs replacement early.
7058 * tree-cfg.c (gimple_empty_block_p): Likewise.
7059
7060 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
7061
7062 PR target/86383
7063 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
7064 specified to configure.
7065 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
7066
7067 2018-10-23 Richard Biener <rguenther@suse.de>
7068
7069 PR tree-optimization/87700
7070 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
7071
7072 2018-10-23 Jakub Jelinek <jakub@redhat.com>
7073
7074 PR target/87674
7075 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
7076 second argument from __mmask16 to __mmask8.
7077 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
7078 _mm_mask_packs_epi32): Likewise.
7079 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
7080 Likewise.
7081 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
7082
7083 2018-10-23 Richard Biener <rguenther@suse.de>
7084
7085 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
7086
7087 2018-10-23 Richard Biener <rguenther@suse.de>
7088
7089 PR tree-optimization/86144
7090 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
7091 over simd attribute.
7092
7093 2018-10-23 Richard Biener <rguenther@suse.de>
7094
7095 PR tree-optimization/87693
7096 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
7097 the case we do not find the taken edge.
7098
7099 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
7100 Jinsong Ji <jji@us.ibm.com>
7101
7102 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
7103 (_mm_store_pd): Use unaligned vector type for pointer cast.
7104 (_mm_maskmoveu_si128): Likewise.
7105 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
7106 (_mm_store_ps): Use unaligned vector type for pointer cast.
7107
7108 2018-10-22 Paul Koning <ni1d@arrl.net>
7109
7110 * symtab.c (symtab_node::increase_alignment): Correct max
7111 alignment check.
7112
7113 2018-10-22 Yury Gribov <tetra2005@gmail.com>
7114
7115 PR tree-optimization/87633
7116 * match.pd: Do not generate unordered integer comparisons.
7117
7118 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7119
7120 PR rtl-optimization/87600
7121 * combine.c: Add include of expr.h.
7122 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
7123 register to a pseudo.
7124 (make_more_copies): New function, add a copy to a new pseudo after
7125 the moves from hard registers into pseudos.
7126 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
7127 later. Call make_more_copies.
7128
7129 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
7130
7131 * lra-constraints.c (process_alt_operands): New local array,
7132 matching_early_clobber. Check matching_early_clobber before
7133 decrementing reject, and set matching_early_clobber after.
7134
7135 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7136
7137 PR target/87598
7138 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
7139 call output_addr_const and hope for the best.
7140
7141 2018-10-22 Richard Biener <rguenther@suse.de>
7142
7143 * gimple-ssa-evrp-analyze.c
7144 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
7145 smarter about what ranges to use.
7146 * tree-vrp.c (add_assert_info): Dump here.
7147 (register_edge_assert_for_2): Instead of here at multiple but
7148 not all places.
7149
7150 * gcc.dg/tree-ssa/evrp12.c: New testcase.
7151 * gcc.dg/predict-6.c: Adjust.
7152 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
7153 * gcc.dg/tree-ssa/vrp02.c: Likewise.
7154 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
7155
7156 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
7157 Richard Biener <rguenther@suse.de>
7158
7159 * bitmap.h: Update data structure documentation, including a
7160 description of bitmap views as either linked-lists or splay trees.
7161 (struct bitmap_element_def): Update comments for splay tree bitmaps.
7162 (struct bitmap_head_def): Likewise.
7163 (bitmap_list_view, bitmap_tree_view): New prototypes.
7164 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
7165 tree_form fields.
7166 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
7167 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
7168 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
7169 released bitmap element here.
7170 (bitmap_element_free): Remove.
7171 (bitmap_elt_clear_from): Work on splay tree bitmaps.
7172 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
7173 this function similar ones such that linked-list bitmap implementation
7174 functions are grouped.
7175 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
7176 and moved for grouping.
7177 (bitmap_list_insert_element_after): Renamed from
7178 bitmap_elt_insert_after, and moved for grouping.
7179 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
7180 (bitmap_tree_link_left, bitmap_tree_link_right,
7181 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
7182 bitmap_tree_link_element, bitmap_tree_unlink_element,
7183 bitmap_tree_find_element): New functions for splay-tree bitmap
7184 implementation.
7185 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
7186 Renamed and moved, see above entries.
7187 (bitmap_tree_listify_from): New function to convert part of a splay
7188 tree bitmap to a linked-list bitmap.
7189 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
7190 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
7191 (bitmap_find_bit): Remove.
7192 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
7193 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
7194 Handle splay tree bitmaps.
7195 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
7196 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
7197 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
7198 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
7199 bitmap_intersect_compl_p, bitmap_ior_and_compl,
7200 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
7201 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
7202 corresponding changes to use linked-list specific bitmap_element
7203 manipulation functions as applicable for efficiency.
7204 (bitmap_tree_to_vec): New function.
7205 (debug_bitmap_elt_file): New function split out from ...
7206 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
7207 (bitmap_print): Likewise.
7208
7209 PR tree-optimization/63155
7210 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
7211 SSA edge worklists.
7212 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
7213 in tree-view.
7214
7215 2018-10-22 Martin Liska <mliska@suse.cz>
7216
7217 PR tree-optimization/87686
7218 Revert
7219 2018-08-29 Martin Liska <mliska@suse.cz>
7220
7221 * tree-switch-conversion.c (switch_conversion::expand):
7222 Strenghten assumption about gswitch statements.
7223
7224 2018-10-22 Martin Liska <mliska@suse.cz>
7225
7226 * ipa-icf.c (sem_item::compare_attributes): Remove.
7227 (sem_item::compare_referenced_symbol_properties): Use
7228 attribute_list_equal instead.
7229 (sem_function::equals_wpa): Likewise.
7230 * ipa-icf.h: Remove compare_attributes.
7231
7232 2018-10-22 Richard Biener <rguenther@suse.de>
7233
7234 PR middle-end/87682
7235 * mem-stats.h (mem_usage::operator==): Fix pasto.
7236
7237 2018-10-22 Richard Biener <rguenther@suse.de>
7238
7239 PR tree-optimization/87640
7240 * tree-vrp.c (set_value_range_with_overflow): Decompose
7241 incomplete result.
7242 (extract_range_from_binary_expr_1): Adjust.
7243
7244 2018-10-22 Martin Jambor <mjambor@suse.cz>
7245
7246 * tree-eh.h (stmt_could_throw_p): Add function parameter.
7247 (stmt_can_throw_external): Likewise.
7248 (stmt_can_throw_internal): Likewise.
7249 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
7250 (lower_eh_constructs_2): Likewise.
7251 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
7252 (stmt_can_throw_external): Likewise.
7253 (stmt_can_throw_internal): Likewise.
7254 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
7255 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
7256 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
7257 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
7258 (pass_lower_eh_dispatch::execute): Pass cfun to
7259 stmt_can_throw_external.
7260 (cleanup_empty_eh): Likewise.
7261 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
7262 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
7263 stmt_can_throw_external instead of pushing it to cfun.
7264 (symbol_table::create_edge): Likewise.
7265 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
7266 stmt_can_throw_internal.
7267 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
7268 to stmt_could_throw_p.
7269 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
7270 stmt_can_throw_internal.
7271 (pass_store_merging::execute): Likewise.
7272 * gimple-ssa-strength-reduction.c
7273 (find_candidates_dom_walker::before_dom_children): Pass cfun to
7274 stmt_could_throw_p.
7275 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
7276 stmt_can_throw_internal.
7277 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
7278 to stmt_can_throw_external.
7279 (check_stmt): Pass cfun to stmt_could_throw_p.
7280 (check_stmt): Pass cfun to stmt_can_throw_external.
7281 (pass_nothrow::execute): Likewise.
7282 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
7283 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
7284 stmt_can_throw_internal.
7285 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
7286 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
7287 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
7288 * tree-complex.c (expand_complex_libcall): Pass cfun to
7289 stmt_could_throw_p and to stmt_can_throw_internal.
7290 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
7291 * tree-inline.c (copy_edges_for_bb): Likewise.
7292 (maybe_move_debug_stmts_to_successors): Likewise.
7293 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
7294 stmt_could_throw_p.
7295 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
7296 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
7297 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
7298 stmt_can_throw_internal.
7299 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
7300 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
7301 stmt_could_throw_p.
7302 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
7303 stmt_can_throw_internal.
7304 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
7305 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
7306 stmt_could_throw_p.
7307 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
7308 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
7309 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7310 (convert_mult_to_fma_1): Likewise.
7311 (convert_to_divmod): Likewise.
7312 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
7313 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
7314 * tree-ssa-propagate.c
7315 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
7316 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
7317 (maybe_optimize_range_tests): Likewise.
7318 (linearize_expr_tree): Likewise.
7319 (reassociate_bb): Likewise.
7320 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7321 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
7322 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
7323 (handle_char_store): Likewise.
7324 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
7325 stmt_can_throw_internal.
7326 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
7327 stmt_could_throw_p.
7328 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7329 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
7330 (vectorizable_simd_clone_call): Likewise.
7331 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
7332 (gimple_stringop_fixed_value): Likewise.
7333
7334 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
7335
7336 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
7337 literal pool references.
7338 (s390_check_qrst_address): Adapt to the new behavior of
7339 s390_loadrelative_operand_p ().
7340
7341 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7342
7343 PR target/72782
7344 * config/i386/sse.md (*andnot<mode>3_bcst): New.
7345
7346 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7347
7348 PR target/72782
7349 * config/i386/sse.md (*<code><mode>3_bcst): New.
7350
7351 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7352
7353 PR target/72782
7354 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
7355 V4DI, V16SI and V8DI.
7356 (*sub<mode>3<mask_name>_bcst): New.
7357 (*add<mode>3<mask_name>_bcst): Likewise.
7358
7359 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
7360 Jinsong Ji <jji@us.ibm.com>
7361
7362 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
7363 __m64 with __vector unsigned long long for compatibility.
7364 (_mm_movemask_epi8): Likewise.
7365 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
7366 (_mm_cvttps_pi32): Likewise.
7367 (_mm_cvtpi32_ps): Likewise.
7368 (_mm_cvtps_pi16): Likewise.
7369 (_mm_loadh_pi): Likewise.
7370 (_mm_storeh_pi): Likewise.
7371 (_mm_movehl_ps): Likewise.
7372 (_mm_movelh_ps): Likewise.
7373 (_mm_loadl_pi): Likewise.
7374 (_mm_storel_pi): Likewise.
7375 (_mm_movemask_ps): Likewise.
7376 (_mm_shuffle_pi16): Likewise.
7377
7378 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7379
7380 PR target/72782
7381 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
7382 __builtin_ia32_vfnmsubpd512_mask.
7383 (_mm512_mask_fnmsub_round_pd): Likewise.
7384 (_mm512_fnmsub_pd): Likewise.
7385 (_mm512_mask_fnmsub_pd): Likewise.
7386 (_mm512_maskz_fnmsub_round_pd): Use
7387 __builtin_ia32_vfnmsubpd512_maskz.
7388 (_mm512_maskz_fnmsub_pd): Likewise.
7389 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
7390 (_mm512_mask_fnmsub_round_ps): Likewise.
7391 (_mm512_fnmsub_ps): Likewise.
7392 (_mm512_mask_fnmsub_ps): Likewise.
7393 (_mm512_maskz_fnmsub_round_ps): Use
7394 __builtin_ia32_vfnmsubps512_maskz.
7395 (_mm512_maskz_fnmsub_ps): Likewise.
7396 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
7397 __builtin_ia32_vfnmsubpd256_mask.
7398 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
7399 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7400 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
7401 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7402 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7403 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
7404 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
7405 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
7406 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
7407 __builtin_ia32_vfnmsubpd.
7408 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
7409 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
7410 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
7411 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
7412 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
7413 * config/i386/i386-builtin.def: Add
7414 __builtin_ia32_vfnmsubpd256_mask,
7415 __builtin_ia32_vfnmsubpd256_maskz,
7416 __builtin_ia32_vfnmsubpd128_mask,
7417 __builtin_ia32_vfnmsubpd128_maskz,
7418 __builtin_ia32_vfnmsubps256_mask,
7419 __builtin_ia32_vfnmsubps256_maskz,
7420 __builtin_ia32_vfnmsubps128_mask,
7421 __builtin_ia32_vfnmsubps128_maskz,
7422 __builtin_ia32_vfnmsubpd512_mask,
7423 __builtin_ia32_vfnmsubpd512_maskz,
7424 __builtin_ia32_vfnmsubps512_mask,
7425 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
7426 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
7427 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
7428 __builtin_ia32_vfnmsubpd256.
7429 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
7430 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
7431 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
7432 Likewise.
7433 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
7434 Likewise.
7435 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
7436 Likewise.
7437 (fmai_vmfnmsub_<mode><round_name>): Likewise.
7438
7439 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7440
7441 PR target/72782
7442 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
7443 __builtin_ia32_vfnmaddpd512_mask.
7444 (_mm512_mask_fnmadd_round_pd): Likewise.
7445 (_mm512_fnmadd_pd): Likewise.
7446 (_mm512_mask_fnmadd_pd): Likewise.
7447 (_mm512_maskz_fnmadd_round_pd): Use
7448 __builtin_ia32_vfnmaddpd512_maskz.
7449 (_mm512_maskz_fnmadd_pd): Likewise.
7450 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
7451 (_mm512_mask_fnmadd_round_ps): Likewise.
7452 (_mm512_fnmadd_ps): Likewise.
7453 (_mm512_mask_fnmadd_ps): Likewise.
7454 (_mm512_maskz_fnmadd_round_ps): Use
7455 __builtin_ia32_vfnmaddps512_maskz.
7456 (_mm512_maskz_fnmadd_ps): Likewise.
7457 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
7458 __builtin_ia32_vfnmaddpd256_mask.
7459 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
7460 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
7461 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
7462 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7463 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7464 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
7465 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
7466 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
7467 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
7468 __builtin_ia32_vfnmaddpd.
7469 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
7470 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
7471 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
7472 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
7473 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
7474 * config/i386/i386-builtin.def: Add
7475 __builtin_ia32_vfnmaddpd256_mask,
7476 __builtin_ia32_vfnmaddpd256_maskz,
7477 __builtin_ia32_vfnmaddpd128_mask,
7478 __builtin_ia32_vfnmaddpd128_maskz,
7479 __builtin_ia32_vfnmaddps256_mask,
7480 __builtin_ia32_vfnmaddps256_maskz,
7481 __builtin_ia32_vfnmaddps128_mask,
7482 __builtin_ia32_vfnmaddps128_maskz,
7483 __builtin_ia32_vfnmaddpd512_mask,
7484 __builtin_ia32_vfnmaddpd512_maskz,
7485 __builtin_ia32_vfnmaddps512_mask,
7486 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
7487 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
7488 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
7489 __builtin_ia32_vfnmaddpd256.
7490 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
7491 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
7492 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
7493 Likewise.
7494 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
7495 Likewise.
7496 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
7497 Likewise.
7498 (fmai_vmfnmadd_<mode><round_name>): Likewise.
7499
7500 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7501
7502 PR target/72782
7503 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
7504 __builtin_ia32_vfmsubpd512_mask.
7505 (_mm512_mask_fmsub_round_pd): Likewise.
7506 (_mm512_fmsub_pd): Likewise.
7507 (_mm512_mask_fmsub_pd): Likewise.
7508 (_mm512_maskz_fmsub_round_pd): Use
7509 __builtin_ia32_vfmsubpd512_maskz.
7510 (_mm512_maskz_fmsub_pd): Likewise.
7511 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
7512 (_mm512_mask_fmsub_round_ps): Likewise.
7513 (_mm512_fmsub_ps): Likewise.
7514 (_mm512_mask_fmsub_ps): Likewise.
7515 (_mm512_maskz_fmsub_round_ps): Use
7516 __builtin_ia32_vfmsubps512_maskz.
7517 (_mm512_maskz_fmsub_ps): Likewise.
7518 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
7519 __builtin_ia32_vfmsubpd256_mask.
7520 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
7521 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7522 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
7523 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7524 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7525 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
7526 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
7527 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
7528 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
7529 __builtin_ia32_vfmsubpd.
7530 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
7531 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
7532 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
7533 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
7534 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
7535 * config/i386/i386-builtin.def: Add
7536 __builtin_ia32_vfmsubpd256_mask,
7537 __builtin_ia32_vfmsubpd256_maskz,
7538 __builtin_ia32_vfmsubpd128_mask,
7539 __builtin_ia32_vfmsubpd128_maskz,
7540 __builtin_ia32_vfmsubps256_mask,
7541 __builtin_ia32_vfmsubps256_maskz,
7542 __builtin_ia32_vfmsubps128_mask,
7543 __builtin_ia32_vfmsubps128_maskz,
7544 __builtin_ia32_vfmsubpd512_mask,
7545 __builtin_ia32_vfmsubpd512_maskz,
7546 __builtin_ia32_vfmsubps512_mask,
7547 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
7548 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
7549 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
7550 __builtin_ia32_vfmsubpd256.
7551 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
7552 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
7553 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
7554 Likewise.
7555 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
7556 Likewise.
7557 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
7558 Likewise.
7559 (fmai_vmfmsub_<mode><round_name>): Likewise.
7560
7561 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7562
7563 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
7564 Remove plus. Renamed to ...
7565 (*sub<mode>3<mask_name>_bcst): This.
7566 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
7567 (*add<mode>3<mask_name>_bcst): This.
7568
7569 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7570
7571 PR target/72782
7572 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
7573
7574 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7575
7576 PR target/87662
7577 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
7578 (_mm_or_epi32): Likewise.
7579 (_mm256_xor_epi32): Likewise.
7580 (_mm_xor_epi32): Likewise.
7581 (_mm256_or_epi64): Likewise.
7582 (_mm_or_epi64): Likewise.
7583 (_mm256_xor_epi64): Likewise.
7584 (_mm_xor_epi64): Likewise.
7585
7586 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
7587
7588 PR target/72782
7589 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
7590
7591 2018-10-20 Jakub Jelinek <jakub@redhat.com>
7592
7593 PR middle-end/87647
7594 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
7595
7596 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
7597
7598 * doc/ux.texi: Move @section directly after @node.
7599
7600 2018-10-19 Jakub Jelinek <jakub@redhat.com>
7601
7602 PR middle-end/85488
7603 PR middle-end/87649
7604 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
7605 depend closely nested inside of loop with ordered clause with
7606 a parameter.
7607
7608 2018-10-19 David Malcolm <dmalcolm@redhat.com>
7609
7610 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
7611 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
7612 * doc/ux.texi: New file.
7613
7614 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
7615
7616 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
7617 be the first CR field allocated.
7618
7619 2018-10-19 Richard Biener <rguenther@suse.de>
7620
7621 PR target/87657
7622 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
7623 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
7624
7625 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7626
7627 PR target/72782
7628 * config/i386/sse.md
7629 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
7630 (*add<mode>3<mask_name>_bcst_2): Likewise.
7631
7632 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7633
7634 * config/i386/sse.md
7635 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7636 Replace nonimmediate_operand with register_operand.
7637 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7638 Likewise.
7639 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7640 Likewise.
7641
7642 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
7643
7644 PR rtl-optimization/87596
7645 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
7646 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
7647 for instructions in FROM..TO range.
7648
7649 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
7650
7651 * cfgexpand.c (expand_one_var): Use specific wording in error message
7652 for non-local frame variables.
7653 * stor-layout.c (layout_decl): Do not issue a warning for them.
7654
7655 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
7656
7657 * haifa-sched.c (priority): Add force_recompute parameter.
7658 (apply_replacement): Call priority () with force_recompute = true.
7659 (restore_pattern): Likewise.
7660
7661 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7662
7663 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
7664 HOST_BITS_PER_WIDE_INT.
7665 (test_vector_ops_duplicate): Likewise.
7666
7667 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7668
7669 PR target/72782
7670 * config/i386/sse.md (VF_AVX512): New.
7671 (avx512bcst): Likewise.
7672 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7673 Likewise.
7674 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7675 Likewise.
7676 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7677 Likewise.
7678
7679 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
7680
7681 * doc/invoke.texi (-dumpversion): Improve grammar.
7682 (-dumpfullversion): Make more consistent with -dumpversion.
7683
7684 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
7685
7686 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
7687 Set JUMP_LABEL to the jump insn.
7688 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
7689 Predict emitted jump and add label to jump insn.
7690
7691 2018-10-18 David Malcolm <dmalcolm@redhat.com>
7692
7693 PR tree-optimization/87562
7694 * input.c (get_substring_ranges_for_loc): Use
7695 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
7696 getting the linemap for the endpoint. Verify that it's either
7697 in the same linemap as the start point's spelling location, or
7698 at least in the same file.
7699
7700 2018-10-18 Richard Biener <rguenther@suse.de>
7701
7702 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
7703 feed width-specific load/store costs through ix86_vec_cost.
7704 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
7705 (k8_cost): Likewise.
7706 (bdver_cost): Likewise.
7707 (znver1_cost): Likewise.
7708 (btver1_cost): Likewise.
7709 (btver2_cost): Likewise.
7710
7711 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7712
7713 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
7714 to simplify subreg of vec_merge.
7715
7716 2018-10-18 Richard Biener <rguenther@suse.de>
7717
7718 * config/i386/i386.c: Fix costing of vector FMA.
7719
7720 2018-10-18 Richard Biener <rguenther@suse.de>
7721
7722 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
7723 and argument.
7724 (ix86_builtin_vectorization_cost): For vec_construct properly
7725 cost insertion into SSE regs.
7726 (...): Adjust calls to ix86_vec_cost.
7727
7728 2018-10-18 Richard Biener <rguenther@suse.de>
7729
7730 PR middle-end/87087
7731 Revert
7732 2018-02-07 Richard Biener <rguenther@suse.de>
7733
7734 PR tree-optimization/84204
7735 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7736 this place.
7737
7738 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7739
7740 PR target/87537
7741 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
7742 of vec_duplicate.
7743 (test_vector_ops_duplicate): Add test for a scalar subreg of a
7744 VEC_MERGE of a VEC_DUPLICATE.
7745
7746 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7747
7748 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
7749 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
7750 * doc/standards.texi (C Language): Document C2X.
7751 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
7752 (rl78_option_override): Handle "GNU C2X" language name.
7753
7754 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7755
7756 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
7757 Document C17 as published in 2018.
7758
7759 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
7760
7761 PR middle-end/87623
7762 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
7763 bail out if both sides do not have the same storage order.
7764
7765 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7766
7767 * bitmap.c (bitmap_head::dump): New.
7768 * bitmap.h (bitmap_head): Add dump().
7769 * gimple-ssa-evrp-analyze.c
7770 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
7771 (evrp_range_analyzer::set_ssa_range_info): Same.
7772 (evrp_range_analyzer::record_ranges_from_phis): Same.
7773 (evrp_range_analyzer::record_ranges_from_stmt): Same.
7774 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
7775 * gimple-ssa-sprintf.c (get_int_range): Same.
7776 (format_integer): Same.
7777 (sprintf_dom_walker::handle_gimple_call): Same.
7778 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
7779 (ipcp_vr_lattice::top_p): Same.
7780 (ipcp_vr_lattice::bottom_p): Same.
7781 (ipcp_vr_lattice::set_to_bottom): Same.
7782 (ipa_vr_operation_and_type_effects): Same.
7783 (propagate_vr_across_jump_function): Same.
7784 (ipcp_store_vr_results): Same.
7785 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
7786 (ipa_print_node_jump_functions_for_edge): Same.
7787 (ipa_get_value_range): Same.
7788 (ipa_compute_jump_functions_for_edge): Same.
7789 (ipa_write_jump_function): Same.
7790 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
7791 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
7792 Same.
7793 * vr-values.c (set_value_range_to_nonnegative): Same.
7794 (set_value_range_to_truthvalue): Same.
7795 (vr_values::get_value_range): Same.
7796 (vr_values::set_defs_to_varying): Same.
7797 (vr_values::update_value_range): Same.
7798 (symbolic_range_based_on_p): Same.
7799 (vr_values::op_with_boolean_value_range_p): Same.
7800 (vr_values::extract_range_for_var_from_comparison_expr): Same.
7801 (vr_values::extract_range_from_ssa_name): Same.
7802 (vr_values::extract_range_from_binary_expr): Same.
7803 (vr_values::extract_range_from_unary_expr): Same.
7804 (vr_values::extract_range_from_cond_expr): Same.
7805 (vr_values::extract_range_from_comparison): Same.
7806 (vr_values::check_for_binary_op_overflow): Same.
7807 (vr_values::extract_range_basic): Same.
7808 (vr_values::extract_range_from_assignment): Same.
7809 (compare_ranges): Same.
7810 (compare_range_with_value): Same.
7811 (vr_values::adjust_range_with_scev): Same.
7812 (vrp_valueize): Same.
7813 (vrp_valueize_1): Same.
7814 (vr_values::get_vr_for_comparison): Same.
7815 (vr_values::compare_name_with_value): Same.
7816 (vr_values::compare_names): Same.
7817 (vr_values::vrp_evaluate_conditional): Same.
7818 (find_case_label_ranges): Same.
7819 (vr_values::vrp_visit_switch_stmt): Same.
7820 (vr_values::extract_range_from_phi_node): Same.
7821 (vr_values::simplify_div_or_mod_using_ranges): Same.
7822 (vr_values::simplify_bit_ops_using_ranges): Same.
7823 (test_for_singularity): Same.
7824 (range_fits_type_p): Same.
7825 (vr_values::simplify_cond_using_ranges_1): Same.
7826 (vr_values::simplify_switch_using_ranges): Same.
7827 (vr_values::simplify_float_conversion_using_ranges): Same.
7828 (vr_values::two_valued_val_range_p): Same.
7829 (vr_values::add_equivalence): Move to value_range::equiv_add.
7830 * vr-values.h (vr_values::add_equivalence): Remove.
7831 (VR_INITIALIZER): Remove.
7832 * tree-vrp.c (value_range::set): New.
7833 (value_range::equiv_add): New.
7834 (value_range::value_range): New.
7835 (value_range::deep_copy): New.
7836 (value_range::check): New.
7837 (value_range::equal_p): New.
7838 (value_range::ignore_equivs_equal_p): New.
7839 (value_range::operator==): New.
7840 (value_range::operator!=): New.
7841 (value_range::symbolic_p): New.
7842 (value_range::numeric_p): New.
7843 (value_range::set_undefined): New.
7844 (value_range::set_varying): New.
7845 (value_range::may_contain_p): New.
7846 (value_range::equiv_clear): New.
7847 (value_range::singleton_p): New.
7848 (value_range::intersect): New.
7849 (value_range::dump): New.
7850 (value_range::set_and_canonicalize): New.
7851 (set_value_range): Adjust for value_range API.
7852 (set_value_range_to_undefined): Same.
7853 (set_value_range_to_varying): Same.
7854 (set_and_canonicalize_value_range): Same.
7855 (set_value_range_to_nonnull): Same.
7856 (set_value_range_to_null): Same.
7857 (range_is_null): Same.
7858 (range_is_nonnull): Same.
7859 (range_int_cst_p): Same.
7860 (range_int_cst_singleton_p): Same.
7861 (symbolic_range_p): Same.
7862 (range_includes_zero_p): Same.
7863 (value_range_constant_singleton): Same.
7864 (vrp_set_zero_nonzero_bits): Same.
7865 (ranges_from_anti_range): Same.
7866 (extract_range_into_wide_ints): Same.
7867 (extract_range_from_multiplicative_op): Same.
7868 (set_value_range_with_overflow): Same.
7869 (extract_range_from_binary_expr_1): Same.
7870 (extract_range_from_unary_expr): Same.
7871 (dump_value_range): Same.
7872 (debug_value_range): Same.
7873 (vrp_prop::check_array_ref): Same.
7874 (vrp_prop::check_mem_ref): Same.
7875 (vrp_prop::vrp_initialize): Same.
7876 (vrp_prop::visit_stmt): Same.
7877 (intersect_ranges): Same.
7878 (vrp_prop::visit_phi): Same.
7879 (vrp_prop::vrp_finalize): Same.
7880 (determine_value_range_1): Same.
7881 (determine_value_range): Same.
7882 (vrp_intersect_ranges_1): Rename to...
7883 (vrp_intersect_1): this.
7884 (vrp_intersect_ranges): Rename to...
7885 (value_range::intersect_helper): ...this.
7886 (vrp_meet_1): Rename to...
7887 (value_range::union_helper): ...this.
7888 (vrp_meet): Rename to...
7889 (value_range::union_): ...this.
7890 (copy_value_range): Remove.
7891 * tree-vrp.h (struct value_range): Rewrite into a proper class.
7892 (value_range::vrtype): New.
7893 (value_range::type): New.
7894 (value_range::equiv): New.
7895 (value_range::min): New.
7896 (value_range::max): New.
7897 (value_range::varying_p): New.
7898 (value_range::undefined_p): New.
7899 (value_range::null_p): New.
7900 (value_range::equiv_add): New.
7901 (copy_value_range): Remove.
7902
7903 2018-10-17 David Malcolm <dmalcolm@redhat.com>
7904
7905 * Makefile.in (SELFTEST_TARGETS): New.
7906 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
7907 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
7908 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
7909 c/Make-lang.in.
7910 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
7911 (selftest-c++-gdb, selftest-c++-valgrind): Move to
7912 cp/Make-lang.in.
7913 * configure: Regenerate.
7914 * configure.ac (selftest_languages): New.
7915
7916 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7917
7918 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
7919 overflow wraps argument.
7920 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
7921 wide_int_range_multiplicative_op.
7922 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
7923 overflow wraps argument.
7924 (wide_int_range_multiplicative_op): Same.
7925 (wide_int_range_lshift): Same.
7926 (wide_int_range_div): Same.
7927 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
7928 (wide_int_range_lshift): Same.
7929 (wide_int_range_div): Same.
7930
7931 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7932
7933 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
7934 use sign as argument.
7935 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
7936 wide_int_range_shift_undefined_p.
7937
7938 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7939
7940 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
7941 Rename to...
7942 (@despeculate_copy<ALLI_TI:mode>): ... This.
7943 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
7944 switch statement.
7945
7946 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7947
7948 * config.gcc: Obsolete *-*-solaris2.10*.
7949 * doc/install.texi (Specific, *-*-solaris2*): Document it.
7950
7951 2018-10-12 Jeff Law <law@redhat.com>
7952
7953 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
7954 reg + sym +- const_int addressing modes.
7955
7956 2018-10-15 David Malcolm <dmalcolm@redhat.com>
7957
7958 * common.opt (fdiagnostics-minimum-margin-width=): New option.
7959 * diagnostic-show-locus.c (layout::layout): Apply the minimum
7960 margin width.
7961 (layout::start_annotation_line): Only print up to 3 of the
7962 margin character, to avoid touching the left-hand side.
7963 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
7964 minimum margin width, as set by test_diagnostic_context's ctor.
7965 (selftest::test_fixit_insert_containing_newline): Likewise.
7966 (selftest::test_fixit_insert_containing_newline_2): Likewise.
7967 (selftest::test_line_numbers_multiline_range): Clear
7968 dc.min_margin_width.
7969 * diagnostic.c (diagnostic_initialize): Initialize
7970 min_margin_width.
7971 * diagnostic.h (struct diagnostic_context): Add field
7972 "min_margin_width".
7973 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
7974 * opts.c (common_handle_option): Handle
7975 OPT_fdiagnostics_minimum_margin_width_.
7976 * selftest-diagnostic.c
7977 (selftest::test_diagnostic_context::test_diagnostic_context):
7978 Initialize min_margin_width to 6.
7979 * toplev.c (general_init): Initialize global_dc->min_margin_width.
7980
7981 2018-10-15 David Malcolm <dmalcolm@redhat.com>
7982
7983 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
7984 Fix usage of "error_at_rich_loc" in the comment.
7985
7986 2018-10-15 Renlin Li <renlin.li@arm.com>
7987
7988 PR target/87563
7989 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
7990 if-conversioned loop when it contains ifn with types not
7991 supported by backend.
7992 * internal-fn.c (expand_direct_optab_fn): Add an assert.
7993 (direct_internal_fn_supported_p): New helper function.
7994 * internal-fn.h (direct_internal_fn_supported_p): Declare.
7995
7996 2018-10-15 Jakub Jelinek <jakub@redhat.com>
7997
7998 PR target/87572
7999 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8000 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8001 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8002
8003 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
8004
8005 PR tree-optimization/87022
8006 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
8007 bits in dist vector rather than the first one.
8008
8009 2018-10-15 Richard Biener <rguenther@suse.de>
8010
8011 PR middle-end/87610
8012 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
8013 (visit_loadstore): When a used restrict tag escaped verify that
8014 the points-to solution of "other" pointers do not include
8015 escaped.
8016 (compute_dependence_clique): If a used restrict tag escaped
8017 communicated that down to visit_loadstore.
8018
8019 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
8020
8021 * config/s390/s390.c (s390_expand_vec_init): Force vector element
8022 into reg if it isn't a general operand.
8023
8024 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8025
8026 PR target/87599
8027 * config/i386/sse.md (*vec_dupv2di): Add register source to
8028 movddup.
8029
8030 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8031
8032 PR target/87572
8033 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8034 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
8035 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8036 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8037
8038 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
8039
8040 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
8041 (notice_args_size): Set it in the current trace if no insn that can
8042 throw internally has been seen yet.
8043 (connect_traces): When connecting args_size between traces, allow the
8044 incoming values not to match if there is an insn setting it before the
8045 first insn that can throw internally; in that case, force the creation
8046 of a CFI note on this latter insn.
8047
8048 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
8049
8050 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
8051 the base class, because using the injected-class-name was not clearly
8052 specified until DR 176.
8053
8054 2018-10-12 Paul Koning <ni1d@arrl.net>
8055
8056 * config/pdp11/pdp11.md (doloop_end): New expander.
8057 (doloop_end_insn): renamed from "doloop_end".
8058 (addqi3): New pattern.
8059 (subqi3): New pattern.
8060 * config/pdp11/predicates.md (incdec_operand): New predicate.
8061
8062 2018-10-12 Yury Gribov <tetra2005@gmail.com>
8063
8064 PR middle-end/81376
8065 * real.c (format_helper::can_represent_integral_type_p): New function
8066 * real.h (format_helper::can_represent_integral_type_p): Ditto.
8067 * match.pd: New pattern.
8068
8069 2018-10-12 Alexandre Oliva <oliva@adacore.com>
8070
8071 * configure.ac: Introduce --enable-large-address-aware
8072 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
8073 * doc/install.texi: Document it.
8074 * configure, config.in: Rebuilt.
8075 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
8076 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
8077 (LINK_SPEC): Insert it.
8078 * config/i386/mingw-w64.h: Likewise.
8079
8080 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
8081
8082 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
8083
8084 PR rtl-optimization/87600
8085 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
8086
8087 2018-10-12 Paul Koning <ni1d@arrl.net>
8088
8089 * doc/md.texi (doloop_end): Document that the pattern code may
8090 need to check operand mode.
8091
8092 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
8093
8094 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
8095 to zero-extend between int and floating-point registers.
8096 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
8097 ldp into floating-point registers. Add type and arch attributes.
8098 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
8099 Use f_loads for type attribute.
8100
8101 2018-10-11 Martin Sebor <msebor@redhat.com>
8102
8103 * doc/extend.texi (attribute packed): Correct typos.
8104
8105 2018-10-11 Martin Sebor <msebor@redhat.com>
8106
8107 * doc/extend.texi (attribute flatten): Mention interaction with
8108 noinline.
8109
8110 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
8111
8112 PR target/87156
8113 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8114 Set new_decl virtual flag to zero.
8115
8116 2018-10-11 Martin Sebor <msebor@redhat.com>
8117
8118 PR middle-end/87593
8119 * doc/extend.texi (attribute format_arg): Discuss using multiple
8120 attributes on a single function.
8121
8122 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
8123
8124 PR tree-optimization/86829
8125 * match.pd (sin (atan (x))): New simplification rules.
8126 (cos (atan (x))): Likewise.
8127 * real.c (build_sinatan_real): New function.
8128 * real.h (build_sinatan_real): Prototype.
8129
8130 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
8131
8132 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
8133 function.
8134 (fold_mergeeo_helper): New helper function.
8135 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
8136 intrinsics. Correct some whitespace indentation issues.
8137
8138 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
8139
8140 PR target/87511
8141 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
8142 Use HOST_WIDE_INT_1U for shift.
8143
8144 2018-10-11 Doug Rupp <rupp@adacore.com>
8145 Olivier Hainque <hainque@adacore.com>
8146
8147 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
8148 Pass --relax to the linker for RTPs.
8149 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
8150
8151 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
8152 Jan Hubicka <jh@suse.cz>
8153 Martin Jambor <mjambor@suse.cz>
8154
8155 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
8156 the same elements are repeated rather than printing all of them.
8157 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
8158 "repeated" elements.
8159 * read-rtl-function.c (test_loading_repeat): New function.
8160 (read_rtl_function_c_tests): Call test_loading_repeat.
8161 * rtl-tests.c (test_dumping_repeat): New function.
8162 (rtl_tests_c_tests): Call test_dumping_repeat.
8163
8164 2018-10-11 Richard Biener <rguenther@suse.de>
8165
8166 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
8167 bdver?_cost): Unify to ...
8168 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
8169 * config/i386/i386.c (processor_cost_table): Adjust.
8170
8171 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
8172
8173 PR middle-end/87574
8174 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
8175 the thunk when expanding to GIMPLE.
8176
8177 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
8178
8179 PR bootstrap/87551
8180 * varasm.c (mergeable_string_section): Don't try to move zero-length
8181 strings to the merge section.
8182
8183 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
8184
8185 PR target/87573
8186 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
8187
8188 2018-10-10 Jakub Jelinek <jakub@redhat.com>
8189
8190 PR target/87550
8191 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
8192 to special_args set.
8193
8194 2018-10-10 Richard Biener <rguenther@suse.de>
8195
8196 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
8197 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
8198 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
8199 and recursing and pattern terminating the recursion on SSE
8200 vector width using ix86_expand_reduc.
8201 (reduc_sminmax_scal_<mode>): Split into part reducing to half
8202 width and recursing and SSE2 vector variant doing the final
8203 reduction with ix86_expand_reduc.
8204 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
8205 with terminating the recursion at AVX level, splitting that
8206 to SSE there.
8207
8208 2018-10-09 David Malcolm <dmalcolm@redhat.com>
8209
8210 * genmatch.c (error_cb): Rename to...
8211 (diagnostic_cb): ...this, converting int params to enums.
8212 (fatal_at): Update for renaming.
8213 (warning_at): Likewise.
8214 (main): Likewise.
8215 * input.c (selftest::ebcdic_execution_charset::apply):
8216 Update for renaming of...
8217 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
8218 to...
8219 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
8220 converting level and reason to enums.
8221 (class selftest::lexer_error_sink): Rename to...
8222 (class selftest::lexer_test_options): ...this, renaming field
8223 "m_errors" to "m_diagnostics".
8224 (selftest::lexer_test_options::apply): Update for renaming of...
8225 (selftest::lexer_test_options::on_error): ...this, renaming to...
8226 (selftest::lexer_test_options::on_diagnostic): ...this
8227 converting level and reason to enums.
8228 (selftest::test_lexer_string_locations_raw_string_unterminated):
8229 Update for renamings.
8230 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
8231 "reason".
8232
8233 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
8234
8235 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
8236 * config/rs6000/pmmintrin.h: New file.
8237
8238 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
8239
8240 PR tree-optimization/86659
8241 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
8242
8243 2018-10-09 Richard Biener <rguenther@suse.de>
8244
8245 PR tree-optimization/63155
8246 * tree-ssa-structalias.c: Include tree-ssa.h.
8247 (get_constraint_for_ssa_var): For undefs return nothing_id.
8248 (find_func_aliases): Cleanup PHI handling.
8249
8250 2018-10-09 Richard Biener <rguenther@suse.de>
8251
8252 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
8253 replacements.
8254
8255 2018-10-09 Martin Liska <mliska@suse.cz>
8256
8257 * asan.c (asan_emit_stack_protection): If a stack variable
8258 is located in a same file as current function, then emit
8259 line info into variable definition string.
8260
8261 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8262
8263 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
8264 information.
8265
8266 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8267
8268 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
8269 on the thunk.
8270
8271 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8272
8273 PR tree-optimization/86659
8274 * gimple-match.h (struct gimple_match_op): Add reverse field.
8275 (gimple_match_op::set_op): New overloaded method.
8276 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
8277 the REF_REVERSE_STORAGE_ORDER flag on the value.
8278 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
8279 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
8280
8281 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
8282
8283 PR middle-end/63155
8284 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
8285 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
8286
8287 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
8288
8289 PR target/87517
8290 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
8291 Defined with __builtin_ia32_vfmaddsubpd512_mask.
8292
8293 2018-10-08 Richard Biener <rguenther@suse.de>
8294
8295 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
8296 cost the same as AVX128 ones.
8297
8298 2018-10-08 Paul Koning <ni1d@arrl.net>
8299
8300 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
8301 (expand_block_move): New function.
8302 * config/pdp11/pdp11.c (output_block_move): Remove.
8303 (expand_block_move): New function.
8304 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
8305 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
8306 (*movmemhi1): Remove.
8307
8308 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
8309
8310 * config/s390/2827.md: Increase latencies for some FP instructions.
8311
8312 2018-10-08 Richard Biener <rguenther@suse.de>
8313
8314 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8315 Open a dump scope.
8316 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
8317 * tree-vectorizer.h (dump_stmt_cost): Adjust.
8318 (add_stmt_cost): Dump return value of the hook.
8319
8320 2018-10-08 Richard Biener <rguenther@suse.de>
8321
8322 PR tree-optimization/63155
8323 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
8324 (ssa_propagation_engine::ssa_propagate): Remove redundant
8325 bitmap bit clearing.
8326
8327 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
8328
8329 PR rtl-optimization/86939
8330 PR rtl-optimization/87479
8331 * ira.h (non_conflicting_reg_copy_p): New prototype.
8332 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
8333 (make_hard_regno_dead): Don't add conflicts for register
8334 ignore_reg_for_conflicts.
8335 (make_object_dead): Likewise.
8336 (non_conflicting_reg_copy_p): New function.
8337 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
8338 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
8339 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
8340 (make_hard_regno_dead): Don't add conflicts for register
8341 ignore_reg_for_conflicts. Remove special conflict handling of
8342 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
8343 check_pic_pseudo_p and update callers.
8344 (mark_pseudo_dead): Don't add conflicts for register
8345 ignore_reg_for_conflicts.
8346 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
8347
8348 2018-10-05 Andrew Waterman <andrew@sifive.com>
8349 Jim Wilson <jimw@sifive.com>
8350
8351 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
8352 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
8353 new pattern using HONOR_SNANS that emits one extra instruction.
8354
8355 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8356
8357 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
8358 patterns): Merge SI and DI patterns to a GPR pattern.
8359 (unnamed define_insn and define_split for record form of that): Merge
8360 to a single define_insn_and_split pattern.
8361
8362 2018-10-05 David Malcolm <dmalcolm@redhat.com>
8363
8364 PR c++/56856
8365 * input.c (expand_location_to_spelling_point): Add param "aspect"
8366 and use rather than hardcoding LOCATION_ASPECT_CARET.
8367 (get_substring_ranges_for_loc): Handle the case of a single token
8368 within a macro expansion.
8369 * input.h (expand_location_to_spelling_point): Add "aspect" param,
8370 defaulting to LOCATION_ASPECT_CARET.
8371
8372 2018-10-05 Paul Koning <ni1d@arrl.net>
8373
8374 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
8375 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
8376 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
8377 (pdp11_guard_type): New function.
8378
8379 2018-10-05 Paul Koning <ni1d@arrl.net>
8380
8381 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
8382 * config/pdp11/pdp11.opt (mfloat32): Remove.
8383 (mfloat64): Remove.
8384 * doc/invoke.texi (pdp11 -mfloat32): Remove:
8385 (pdp11 -mfloat64): Remove.
8386
8387 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8388
8389 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
8390 (*cmp<mode>_cc_i387): Ditto.
8391 (*cmpu<mode>_cc_i387): Ditto.
8392 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8393 * config/i386/i386.c (ix86_expand_fp_compare): Remove
8394 "scratch" argument.
8395 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
8396 Emit x86_sahf_1 pattern.
8397 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
8398 (ix86_expand_carry_flag_compare): Ditto.
8399
8400 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8401
8402 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
8403 to reg_or_0_operand. Add "C" constraint.
8404 (*cmpxf_cc_i387): Ditto.
8405 (*cmp<mode>_i387): Change operand 2 predicate
8406 to nonimm_or_0_operand. Add "C" constraint.
8407 (*cmp<mode>_cc_i387): Ditto.
8408 (*cmp<mode>_0_i387): Remove insn pattern.
8409 (*cmp<mode>_0_cc_i387): Ditto.
8410
8411 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8412
8413 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
8414 * config/i386/predicates.md (nonimm_or_0_operand): Rename
8415 from vector_move_operand. Update all uses.
8416
8417 2018-10-05 Martin Sebor <msebor@redhat.com>
8418
8419 PR tree-optimization/87490
8420 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
8421 consistently.
8422
8423 2018-10-05 Richard Biener <rguenther@suse.de>
8424
8425 PR tree-optimization/63155
8426 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
8427 vertical space in dumpfiles.
8428 * tree-ssa-propagate.h
8429 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
8430 * tree-ssa-propagate.c (cfg_blocks_back): New global.
8431 (ssa_edge_worklist_back): Likewise.
8432 (curr_order): Likewise.
8433 (cfg_blocks_get): Remove abstraction.
8434 (cfg_blocks_add): Likewise.
8435 (cfg_blocks_empty_p): Likewise.
8436 (add_ssa_edge): Add to current or next worklist based on
8437 RPO index.
8438 (add_control_edge): Likewise.
8439 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
8440 into ...
8441 (ssa_propagation_engine::ssa_propagate): ... here. Unify
8442 iteration from CFG and SSA edge worklist so we process
8443 everything in RPO order, prioritizing forward progress
8444 over iteration.
8445 (ssa_prop_init): Allocate new worklists, do not dump
8446 immediate uses.
8447 (ssa_prop_fini): Free new worklists.
8448
8449 2018-10-05 Richard Biener <rguenther@suse.de>
8450
8451 * tree-core.h (tree_block::abstract_flag): Remove.
8452 (tree_block::block_num): Make full 32bits.
8453 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
8454 * tree.h (BLOCK_ABSTRACT): Remove.
8455 * dwarf2out.c (gen_lexical_block_die): Remove dead code
8456 resulting from BLOCK_ABSTRACT being always false.
8457 (gen_inlined_subroutine_die): Likewise.
8458 (gen_block_die): Likewise.
8459 * tree.c (block_ultimate_origin): Likewise.
8460 * tree-pretty-print.c (dump_block_node): Remove code dealing
8461 with BLOCK_ABSTRACT.
8462 * tree-ssa-live.c (dump_scope_block): Likewise.
8463 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
8464 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
8465
8466 2018-10-05 Richard Biener <rguenther@suse.de>
8467
8468 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
8469 is asked for initialize mode to the component mode of the
8470 vector type.
8471
8472 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
8473
8474 PR target/87522
8475 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
8476 assembler for -mavx.
8477 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
8478
8479 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8480
8481 PR target/87509
8482 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
8483 RS6000_BTM_DFP.
8484 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
8485 to be DImode. When using mffscrn, force the operand to a register.
8486
8487 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
8488
8489 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
8490 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
8491 X87MODEF mode iterator.
8492 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
8493 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
8494 X87MODEF mode iterator.
8495
8496 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
8497
8498 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
8499 -Wno-prio-ctor-dtor.
8500
8501 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8502
8503 * Makefile.in (OBJS): Add opt-problem.o.
8504 * dump-context.h: Include "selftest.h.
8505 (selftest::temp_dump_context): New forward decl.
8506 (class dump_context): Make friend of class
8507 selftest::temp_dump_context.
8508 (dump_context::dump_loc_immediate): New decl.
8509 (class dump_pretty_printer): Move here from dumpfile.c.
8510 (class temp_dump_context): Move to namespace selftest.
8511 (temp_dump_context::temp_dump_context): Add param
8512 "forcibly_enable_dumping".
8513 (selftest::verify_dumped_text):
8514 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
8515 (selftest::verify_item):
8516 (ASSERT_IS_TEXT): Move here from dumpfile.c.
8517 (ASSERT_IS_TREE): Likewise.
8518 (ASSERT_IS_GIMPLE): Likewise.
8519 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
8520 to...
8521 (dump_context::dump_loc_immediate): ...this new function.
8522 (class dump_pretty_printer): Move to dump-context.h.
8523 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
8524 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
8525 (temp_dump_context::temp_dump_context): Move to "selftest"
8526 namespace. Add param "forcibly_enable_dumping", and use it to
8527 conditionalize the use of m_pp;
8528 (selftest::verify_dumped_text): Make non-static.
8529 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
8530 (selftest::verify_item): Make non-static.
8531 (ASSERT_IS_TEXT): Move to dump-context.h.
8532 (ASSERT_IS_TREE): Likewise.
8533 (ASSERT_IS_GIMPLE): Likewise.
8534 (selftest::test_capture_of_dump_calls): Pass "true" for new
8535 param of temp_dump_context.
8536 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
8537 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
8538 TDF_COMPARE_DEBUG.
8539 * opt-problem.cc: New file.
8540 * opt-problem.h: New file.
8541 * optinfo-emit-json.cc
8542 (selftest::test_building_json_from_dump_calls): Pass "true" for
8543 new param of temp_dump_context.
8544 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
8545 (optinfo::emit_for_opt_problem): New function.
8546 (optinfo::emit): Clarity which emit_item is used.
8547 * optinfo.h (optinfo::get_dump_location): New accessor.
8548 (optinfo::emit_for_opt_problem): New decl.
8549 (optinfo::emit): Make const.
8550 * selftest-run-tests.c (selftest::run_tests): Call
8551 selftest::opt_problem_cc_tests.
8552 * selftest.h (selftest::opt_problem_cc_tests): New decl.
8553 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
8554 bool to opt_result, converting fprintf messages to
8555 opt_result::failure_at calls. Add "stmt" param for use by the
8556 failure_at calls.
8557 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
8558 (runtime_alias_check_p): Convert return type from bool to
8559 opt_result, converting dump_printf calls to
8560 opt_result::failure_at, using the statement DDR_A for their
8561 location.
8562 (find_data_references_in_stmt): Convert return type from bool to
8563 opt_result, converting "return false" to opt_result::failure_at
8564 with a new message.
8565 * tree-data-ref.h: Include "opt-problem.h".
8566 (dr_analyze_innermost): Convert return type from bool to opt_result,
8567 and add a const gimple * param.
8568 (find_data_references_in_stmt): Convert return type from bool to
8569 opt_result.
8570 (runtime_alias_check_p): Likewise.
8571 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
8572 dr_analyze_innermost.
8573 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
8574 Convert return type from bool to opt_result, adding a message for
8575 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
8576 (vect_analyze_data_ref_dependence): Convert return type from bool
8577 to opt_result. Change sense of return type from "false"
8578 effectively meaning "no problems" to "false" meaning a problem,
8579 so that "return false" becomes "return opt_result::success".
8580 Convert "return true" calls to opt_result::failure_at, using
8581 the location of statement A rather than vect_location.
8582 (vect_analyze_data_ref_dependences): Convert return type from bool
8583 to opt_result.
8584 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
8585 calls to opt_result::failure_at, using the stmt location rather
8586 than vect_location.
8587 (vect_verify_datarefs_alignment): Convert return type from bool
8588 to opt_result.
8589 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
8590 into multiple more-tightly-scoped copies.
8591 (vect_analyze_data_refs_alignment): Convert return type from bool
8592 to opt_result.
8593 (vect_analyze_data_ref_accesses): Likewise, converting a
8594 "return false" to a "return opt_result::failure_at", adding a
8595 new message.
8596 (vect_prune_runtime_alias_test_list): Convert return type from
8597 bool to opt_result, converting dump_printf_loc to
8598 opt_result::failure_at. Add a %G to show the pertinent statement,
8599 and use the stmt's location rather than vect_location.
8600 (vect_find_stmt_data_reference): Convert return type from
8601 bool to opt_result, converting dump_printf_loc to
8602 opt_result::failure_at, using stmt's location.
8603 (vect_analyze_data_refs): Convert return type from bool to
8604 opt_result. Convert "return false" to "return
8605 opt_result::failure_at", adding messages as needed.
8606 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
8607 type from bool to opt_result.
8608 (vect_determine_vf_for_stmt): Likewise.
8609 (vect_determine_vectorization_factor): Likewise, converting
8610 dump_printf_loc to opt_result::failure_at, using location of phi
8611 rather than vect_location.
8612 (vect_analyze_loop_form_1): Convert return type from bool to
8613 opt_result, converting dump_printf_loc calls, retaining the use of
8614 vect_location.
8615 (vect_analyze_loop_form): Convert return type from loop_vec_info
8616 to opt_loop_vec_info.
8617 (vect_analyze_loop_operations): Convert return type from bool to
8618 opt_result, converting dump_printf_loc calls, using the location
8619 of phi/stmt rather than vect_location where available. Convert
8620 various "return false" to "return opt_result::failure_at" with
8621 "unsupported phi" messages.
8622 (vect_get_datarefs_in_loop): Convert return type from bool to
8623 opt_result. Add a message for the
8624 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
8625 (vect_analyze_loop_2): Convert return type from bool to
8626 opt_result. Ensure "ok" is set to a opt_result::failure_at before
8627 each "goto again;", adding new messages where needed.
8628 Add "unsupported grouped {store|load}" messages.
8629 (vect_analyze_loop): Convert return type from loop_vec_info to
8630 opt_loop_vec_info.
8631 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
8632 bool to opt_result.
8633 * tree-vect-stmts.c (process_use): Likewise, converting
8634 dump_printf_loc call and using stmt location, rather than
8635 vect_location.
8636 (vect_mark_stmts_to_be_vectorized): Likeise.
8637 (vect_analyze_stmt): Likewise, adding a %G.
8638 (vect_get_vector_types_for_stmt): Convert return type from bool to
8639 opt_result, converting dump_printf_loc calls and using stmt
8640 location, rather than vect_location.
8641 (vect_get_mask_type_for_stmt): Convert return type from tree to
8642 opt_tree, converting dump_printf_loc calls and using stmt location.
8643 * tree-vectorizer.c: Include "opt-problem.h.
8644 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
8645 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
8646 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
8647 enabled, use it to report at the top level "couldn't vectorize
8648 loop" followed by the problem.
8649 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
8650 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
8651 to opt_result.
8652 (vect_analyze_stmt): Likewise.
8653 (vect_get_vector_types_for_stmt): Likewise.
8654 (tree vect_get_mask_type_for_stmt): Likewise.
8655 (vect_analyze_data_ref_dependences): Likewise.
8656 (vect_enhance_data_refs_alignment): Likewise.
8657 (vect_analyze_data_refs_alignment): Likewise.
8658 (vect_verify_datarefs_alignment): Likewise.
8659 (vect_analyze_data_ref_accesses): Likewise.
8660 (vect_prune_runtime_alias_test_list): Likewise.
8661 (vect_find_stmt_data_reference): Likewise.
8662 (vect_analyze_data_refs): Likewise.
8663 (vect_analyze_loop): Convert return type from loop_vec_info to
8664 opt_loop_vec_info.
8665 (vect_analyze_loop_form): Likewise.
8666 (vect_analyze_slp): Convert return type from bool to opt_result.
8667
8668 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8669
8670 * doc/invoke.texi (-fopt-info): Document new "internals"
8671 sub-option.
8672 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
8673 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
8674 MSG_ALL_KINDS.
8675 (optinfo_verbosity_options): Add "internals".
8676 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
8677 (dump_context::apply_dump_filter_p): New member function.
8678 (dump_context::dump_loc): Use apply_dump_filter_p rather than
8679 explicitly masking the dump_kind.
8680 (dump_context::begin_scope): Increment the scope depth first. Use
8681 apply_dump_filter_p rather than explicitly masking the dump_kind.
8682 (dump_context::emit_item): Use apply_dump_filter_p rather than
8683 explicitly masking the dump_kind.
8684 (dump_dec): Likewise.
8685 (dump_hex): Likewise.
8686 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
8687 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
8688 (opt_info_switch_p): Update handling of default
8689 MSG_OPTIMIZED_LOCATIONS to cope with default of
8690 MSG_PRIORITY_USER_FACING.
8691 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
8692 masking the dump_kind.
8693 (selftest::test_capture_of_dump_calls): Update test_dump_context
8694 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
8695 than MSG_ALL. Generalize scope test to be run at all four
8696 combinations of with/without MSG_PRIORITY_USER_FACING and
8697 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
8698 for each of the two values.
8699 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
8700 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
8701 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
8702 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
8703 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
8704 with MSG_PRIORITY_*.
8705 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
8706 dump messages as MSG_PRIORITY_USER_FACING.
8707 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
8708 about the interaction with MSG_PRIORITY_*.
8709
8710 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
8711
8712 * varasm.c (output_constant): Add new parameter merge_strings.
8713 Make strings properly zero terminated in merge string sections.
8714 (mergeable_string_section): Don't fail if the last char is non-zero.
8715 (assemble_variable_contents): Handle merge string sections.
8716 (assemble_variable): Likewise.
8717 (assemble_constant_contents): Likewise.
8718 (output_constant_def_contents): Likewise.
8719 (output_constructor_array_range,
8720 output_constructor_regular_field): Adjust call to output_constant.
8721 (output_object_block): Adjust call to assemble_constant_contents
8722 and assemble_variable_contents.
8723
8724 2018-10-04 Martin Liska <mliska@suse.cz>
8725
8726 PR c/87483
8727 * cgraphunit.c (process_function_and_variable_attributes):
8728 Warn about a function with alias attribute and a body.
8729
8730 2018-10-04 Martin Liska <mliska@suse.cz>
8731
8732 PR ipa/82625
8733 * multiple_target.c (redirect_to_specific_clone): New function.
8734 (ipa_target_clone): Use it.
8735 * tree-inline.c: Fix comment.
8736
8737 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8738
8739 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
8740 fields.
8741 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
8742 (gcc::dump_manager::register_pass): New member function, adapted
8743 from loop body in gcc::pass_manager::register_pass, adding a
8744 call to update_dfi_for_opt_info.
8745 (gcc::dump_manager::opt_info_enable_passes): Store the
8746 -fopt-info options into the new fields. Move the loop
8747 bodies into...
8748 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
8749 function.
8750 * dumpfile.h (struct opt_pass): New forward decl.
8751 (gcc::dump_manager::register_pass): New decl.
8752 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
8753 (class gcc::dump_manager): Add fields "m_optgroup_flags",
8754 "m_optinfo_flags", and "m_optinfo_filename".
8755 * passes.c (gcc::pass_manager::register_pass): Move all of the
8756 dump-handling code to gcc::dump_manager::register_pass.
8757
8758 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
8759
8760 PR rtl-optimization/87466
8761 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
8762 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
8763 * doc/tm.texi: Regenerate.
8764 * ira-lives.c (process_bb_node_lives): Use the new target hook.
8765 * lra-lives.c (process_bb_lives): Likewise.
8766 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
8767 Define.
8768
8769 2018-10-04 Tamar Christina <tamar.christina@arm.com>
8770
8771 * params.c (add_params): Fix initialization.
8772
8773 2018-10-04 Martin Liska <mliska@suse.cz>
8774
8775 PR gcov-profile/84107
8776 * tree-profile.c (init_ic_make_global_vars):
8777 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
8778 Come up with new ic_tuple* variables. Emit
8779 __gcov_indirect_call{,_topn} variables.
8780 (gimple_gen_ic_profiler): Access the variable
8781 and emit gimple.
8782 (gimple_gen_ic_func_profiler): Access
8783 __gcov_indirect_call.callee field.
8784 (gimple_init_gcov_profiler): Use ptr_type_node.
8785 * value-prof.c (gimple_ic): Use ptr_type_node.
8786
8787 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8788
8789 PR tree-optimization/85787
8790 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
8791 malloc_candidate_p into this function and add support for
8792 detecting multiple phis.
8793 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
8794
8795 2018-10-04 Martin Liska <mliska@suse.cz>
8796
8797 PR ipa/87491
8798 * ipa-inline.c (inline_to_all_callers_1):
8799 Call ultimate_alias_target for node being inlined.
8800
8801 2018-10-03 Jeff Law <law@redhat.com>
8802
8803 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
8804 target's wchar_t.
8805 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
8806 * tree.h (get_typenode_from_name): Prototype.
8807
8808 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
8809
8810 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
8811 Change operand 2 predicate to nonimmediate_operand.
8812 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8813
8814 2018-10-03 Martin Sebor <msebor@redhat.com>
8815 Jeff Law <law@redhat.com>
8816
8817 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
8818 initialize it.
8819 (get_string_length): Detect unterminated arrays.
8820 (format_string): Same.
8821 (format_directive): Warn about unterminated arrays.
8822 (handle_gimple_call): Mark statements with no_warning as needed.
8823
8824 2018-10-03 Jim Wilson <jimw@sifive.com>
8825
8826 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
8827 also define __riscv_abi_rve. Delete trailing white space.
8828
8829 2018-10-03 Paul Koning <ni1d@arrl.net>
8830
8831 Enable LRA register allocator for PDP11.
8832 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
8833 (R): Likewise.
8834 (D): Likewise.
8835 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
8836 * config/pdp11/pdp11.opt (-mlra): New option.
8837 * doc/invoke.texi (PDP-11 Options): Document -mlra.
8838
8839 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
8840
8841 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
8842 (*<absneg:code>extend<mode>xf2): Ditto.
8843
8844 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
8845
8846 PR tree-optimization/87415
8847 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
8848 precision fields.
8849
8850 2018-10-02 Jeff Law <law@redhat.com>
8851
8852 * gimple-fold.c (get_range_strlen): Only set *nonstr when
8853 an unterminated string is discovered. Bubble up range
8854 even for unterminated strings.
8855 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
8856 indicates the string was not terminated via NONSTR.
8857
8858 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
8859
8860 * tree-vrp.c (extract_range_from_unary_expr): Special case all
8861 pointer conversions.
8862 Do not do anything special for anti-ranges.
8863
8864 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
8865
8866 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
8867 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
8868
8869 2018-10-03 Martin Liska <mliska@suse.cz>
8870
8871 PR gcov-profile/86109
8872 * coverage.c (coverage_begin_function): Do not
8873 mark lambdas as artificial.
8874 * tree-core.h (struct GTY): Remove tm_clone_flag
8875 and introduce new lambda_function.
8876 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
8877
8878 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
8879
8880 PR target/87474
8881 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
8882 P8_VECTOR and VSX are enabled.
8883
8884 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
8885
8886 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
8887 0x3907 as CPU model number.
8888
8889 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
8890
8891 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
8892 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
8893 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
8894 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
8895 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
8896 * config/s390/s390.md: Likewise. Rename also the cpu attribute
8897 value from arch12 to z14.
8898
8899 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
8900
8901 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
8902 (isinfxf2): Ditto.
8903 (isinf<mode>2): Ditto.
8904
8905 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
8906
8907 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
8908 before emitting fxam. Perform calculations in XFmode.
8909
8910 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
8911
8912 * match.pd (((X /[ex] A) +- B) * A): New transformation.
8913
8914 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
8915
8916 PR middle-end/87319
8917 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
8918 * tree.c (signed_or_unsigned_type_for): Handle complex.
8919
8920 2018-10-02 Jeff Law <law@redhat.com>
8921
8922 * gimple-fold.c (get_range_strlen): Remove dead code.
8923
8924 2018-10-02 Martin Sebor <msebor@redhat.com>
8925 Jeff Law <law@redhat.com>
8926
8927 * builtins.c (unterminated_array): Add new arguments.
8928 If argument is not terminated, bubble up size and exact
8929 state to callers.
8930 (expand_builtin_strnlen): Detect, avoid expanding
8931 and diagnose unterminated arrays.
8932 (c_strlen): Fill in offset of start of unterminated strings.
8933 * builtins.h (unterminated_array): Update prototype.
8934
8935 2018-10-02 Richard Biener <rguenther@suse.de>
8936
8937 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
8938 of haddv4df, first reduce to SSE width and exploit the fact
8939 that we only need element zero with the reduction result.
8940 (reduc_plus_scal_v2df): Likewise.
8941
8942 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
8943
8944 * dojump.h (do_jump): Delete.
8945 (do_jump_1): Likewise.
8946 (split_comparison): Move around.
8947 * dojump.c (do_jump): Make static.
8948 (do_jump_1): Likewise.
8949 (jumpifnot): Move around.
8950 (jumpifnot_1): Likewise.
8951 (jumpif): Likewise.
8952 (jumpif_1): Likewise.
8953 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
8954
8955 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
8956
8957 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
8958 insns in the delay slot and add_insn_after for the jump insn.
8959
8960 2018-10-02 Richard Biener <rguenther@suse.de>
8961
8962 * tree-inline.c (expand_call_inline): Use the location of
8963 the callee declaration for the inline-entry marker.
8964 * final.c (notice_source_line): Remove special-casing of
8965 NOTE_INSN_INLINE_ENTRY.
8966
8967 2018-10-01 Carl Love <cel@us.ibm.com>
8968
8969 PR 69431
8970 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
8971 (__builtin_mtfsb0): New.
8972 (__builtin_mtfsb1): New.
8973 ( __builtin_set_fpscr_rn): New.
8974 (__builtin_set_fpscr_drn): New.
8975 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
8976 (rs6000_expand_set_fpscr_rn_builtin): Add.
8977 (rs6000_expand_set_fpscr_drn_builtin): Add.
8978 (rs6000_expand_builtin): Add case statement entries for
8979 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
8980 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
8981 RS6000_BUILTIN_MFFSL.
8982 (rs6000_init_builtins): Add ftype initialization and def_builtin
8983 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
8984 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
8985 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
8986 rs6000_mffscdrn): Add define_insn.
8987 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
8988 * doc/extend.texi: Add documentation for the builtins.
8989
8990 2018-10-01 Richard Biener <rguenther@suse.de>
8991
8992 PR tree-optimization/87465
8993 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
8994 causing branch miscounts.
8995
8996 2018-10-01 Tamar Christina <tamar.christina@arm.com>
8997
8998 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
8999 aarch64_option_default_param): New.
9000 (params.h): Include.
9001 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
9002 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
9003 stack-clash protection validation code.
9004
9005 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9006
9007 * params.c (validate_param): New.
9008 (add_params): Use it.
9009 (set_param_value): Refactor param validation into validate_param.
9010 (diagnostic.h): Include.
9011 * diagnostic.h (diagnostic_ready_p): New.
9012
9013 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9014
9015 * params.c (set_param_value):
9016 Add index of parameter being validated.
9017 * common/common-target.def (option_validate_param): New.
9018 * common/common-targhooks.h (default_option_validate_param): New.
9019 * common/common-targhooks.c (default_option_validate_param): New.
9020 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
9021 * doc/tm.texi: Regenerate.
9022
9023 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9024
9025 PR target/86486
9026 * config/aarch64/aarch64.c (aarch64_override_options_internal):
9027 Add validation for stack-clash parameters and set defaults.
9028
9029 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9030
9031 PR target/86486
9032 * configure.ac: Add stack-clash-protection-guard-size.
9033 * doc/install.texi: Document it.
9034 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
9035 * params.def: Update comment for guard-size.
9036 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
9037 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
9038 * configure: Regenerate.
9039
9040 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9041
9042 PR target/86486
9043 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
9044 STACK_DYNAMIC_OFFSET): New.
9045 * config/aarch64/aarch64.c (aarch64_layout_frame):
9046 Update outgoing args size.
9047 (aarch64_stack_clash_protection_alloca_probe_range,
9048 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9049
9050 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9051
9052 PR target/86486
9053 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
9054 probe ranges.
9055 * target.def (stack_clash_protection_alloca_probe_range): New.
9056 (stack_clash_protection_final_dynamic_probe): Remove.
9057 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
9058 (default_stack_clash_protection_final_dynamic_probe): Remove.
9059 * targhooks.c: Likewise.
9060 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9061 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
9062 * doc/tm.texi: Regenerate.
9063
9064 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9065
9066 PR target/86486
9067 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
9068 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
9069 aarch64_clamp_to_uimm12_shift): New.
9070 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
9071 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
9072
9073 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9074
9075 PR target/86486
9076 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
9077
9078 2018-10-01 Jeff Law <law@redhat.com>
9079 Richard Sandiford <richard.sandiford@linaro.org>
9080 Tamar Christina <tamar.christina@arm.com>
9081
9082 PR target/86486
9083 * config/aarch64/aarch64.md
9084 (probe_stack_range): Add k (SP) constraint.
9085 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
9086 STACK_CLASH_MAX_UNROLL_PAGES): New.
9087 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
9088 stack probes for stack clash.
9089 (aarch64_allocate_and_probe_stack_space): New.
9090 (aarch64_expand_prologue): Use it.
9091 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
9092 (aarch64_sub_sp): Add emit_move_imm optional param.
9093
9094 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
9095
9096 PR tree-optimization/87261
9097 * match.pd: Remove trailing whitespace.
9098 Add (x & y) | ~(x | y) -> ~(x ^ y),
9099 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
9100
9101 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9102
9103 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
9104 constraints.
9105 (ashlsi3_insn): Update instruction constraints.
9106 (ashrsi3_insn): Likewise.
9107 (rotrsi3): Likewise.
9108 (add_shift): Likewise.
9109 * config/arc/constraints.md (Csz): New 32 bit constraint. It
9110 avoids placing in the limm field small constants which, otherwise,
9111 could end into a small instruction.
9112
9113 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9114
9115 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
9116 destination register is not odd-even.
9117 (umaddsidi4_split): Likewise.
9118
9119 2018-10-01 Richard Biener <rguenther@suse.de>
9120
9121 * tree-inline.c (expand_call_inline): Store origin of fn
9122 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
9123 * tree.c (block_ultimate_origin): Simplify and do some
9124 checking.
9125
9126 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
9127
9128 * config/i386/mmx.md (EMMS): New int iterator.
9129 (emms): New int attribute.
9130 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
9131 EMMS int iterator. Explicitly declare clobbers.
9132 (mmx_emms): Remove expander.
9133 (mmx_femms): Ditto.
9134 * config/i386/predicates.md (emms_operation): Remove predicate.
9135 (vzeroall_pattern): New predicate.
9136 (vzeroupper_pattern): Rename from vzeroupper_operation.
9137 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
9138 vzeroupper_pattern and vzeroall_pattern predicates.
9139
9140 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
9141
9142 PR rtl-optimization/86939
9143 * ira-lives.c (make_hard_regno_born): Rename from this...
9144 (make_hard_regno_live): ... to this. Remove update to conflict
9145 information. Update function comment.
9146 (make_hard_regno_dead): Add conflict information update. Update
9147 function comment.
9148 (make_object_born): Rename from this...
9149 (make_object_live): ... to this. Remove update to conflict information.
9150 Update function comment.
9151 (make_object_dead): Add conflict information update. Update function
9152 comment.
9153 (mark_pseudo_regno_live): Call make_object_live.
9154 (mark_pseudo_regno_subword_live): Likewise.
9155 (mark_hard_reg_dead): Update function comment.
9156 (mark_hard_reg_live): Call make_hard_regno_live.
9157 (process_bb_node_lives): Likewise.
9158 * lra-lives.c (make_hard_regno_born): Rename from this...
9159 (make_hard_regno_live): ... to this. Remove update to conflict
9160 information. Remove now uneeded check_pic_pseudo_p argument.
9161 Update function comment.
9162 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
9163 to conflict information. Update function comment.
9164 (mark_pseudo_live): Remove update to conflict information. Update
9165 function comment.
9166 (mark_pseudo_dead): Add conflict information update.
9167 (mark_regno_live): Call make_hard_regno_live.
9168 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
9169 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
9170
9171 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
9172
9173 PR target/87370
9174 * config/i386/i386.c (construct_container): Use TImode for
9175 BLKmode values in 2 integer registers.
9176
9177 2018-09-29 Jeff Law <law@redhat.com>
9178
9179 * builtins.c (unterminated_array): Pass in c_strlen_data * to
9180 c_strlen rather than just a tree *.
9181 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
9182 Update recursive calls appropriately. If caller did not provide a
9183 suitable data pointer, create a local one. When a non-terminated
9184 string is discovered, bubble up information about the string via the
9185 c_strlen_data object.
9186 * builtins.h (c_strlen): Update prototype.
9187 (c_strlen_data): New structure.
9188 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
9189 For a type 2 call, if c_strlen indicates a non-terminated string
9190 use the length of the non-terminated string.
9191 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
9192
9193 2018-09-29 Jakub Jelinek <jakub@redhat.com>
9194
9195 PR target/87467
9196 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
9197 __m512d type for __A argument rather than __m512.
9198
9199 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
9200
9201 * match.pd (simple_comparison): Don't optimize if either operand is
9202 a function pointer when target needs function pointer canonicalization.
9203
9204 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9205
9206 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
9207 power5 .. power9 to remove indirection.
9208 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
9209 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
9210 ASM_CPU_476_SPEC): Delete.
9211 (ASM_CPU_SPEC): Adjust.
9212 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
9213 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
9214
9215 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9216
9217 * config.in: Delete HAVE_AS_DCI.
9218 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
9219 * config/rs6000/rs6000.h: Ditto.
9220 * configure.ac: Delete HAVE_AS_DCI.
9221 * configure: Regenerate.
9222
9223 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9224
9225 * config.in (HAVE_AS_LWSYNC): Delete.
9226 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9227 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
9228 do it as a .long .
9229 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9230 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
9231 as a .long .
9232 * configure.ac: Delete HAVE_AS_LWSYNC.
9233 * configure: Regenerate.
9234
9235 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9236 Pierre-Marie de Rodat <derodat@adacore.com>
9237
9238 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
9239 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
9240 (cgraph_node::create_thunk): Add indirect_offset parameter.
9241 (thunk_adjust): Likewise.
9242 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
9243 and initialize the corresponding field with it.
9244 (cgraph_node::dump): Dump indirect_offset field.
9245 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
9246 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
9247 (thunk_adjust): Add indirect_offset parameter and deal with it.
9248 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
9249 pass it to thunk_adjust. Do not call the target hook if it's non-zero
9250 or if the thunk is external or local. Fix formatting. Do not chain
9251 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
9252 if any, in the GIMPLE representation.
9253 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
9254 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
9255 (input_node): Read indirect_offset field.
9256 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
9257 call to thunk_adjust.
9258 * tree-nested.c (struct nesting_info): Add thunk_p field.
9259 (create_nesting_tree): Set it.
9260 (convert_all_function_calls): Copy static chain from targets to thunks.
9261 (finalize_nesting_tree_1): Return early for thunks.
9262 (unnest_nesting_tree_1): Do not finalize thunks.
9263 (gimplify_all_functions): Do not gimplify thunks.
9264
9265 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9266
9267 * opt-suggestions.c (option_proposer::build_option_suggestions):
9268 Release "option_values".
9269
9270 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9271
9272 * coverage.c (get_coverage_counts): Convert problem-reporting dump
9273 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
9274 * dumpfile.c (kind_as_string): New function.
9275 (dump_loc): Rather than a hardcoded prefix of "note: ", use
9276 kind_as_string to vary the prefix based on dump_kind.
9277 (selftest::test_capture_of_dump_calls): Update for above.
9278
9279 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9280
9281 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
9282 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
9283
9284 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9285
9286 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
9287 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
9288 INVALID_REGNUM instead of FPSR_REG.
9289 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
9290 * config/i386/i386.md: Update comment of FP compares.
9291 (fldenv): Do not clobber FPSR_REG.
9292
9293 2018-09-28 Richard Biener <rguenther@suse.de>
9294
9295 * tree.h (BLOCK_ORIGIN): New.
9296 * omp-expand.c (grid_expand_target_grid_body): Assign
9297 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
9298 * tree-inline.c (remap_block): Likewise.
9299 * auto-profile.c (get_function_decl_from_block): Simplify
9300 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
9301 * langhooks.c (lhd_print_error_function): Likewise.
9302 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
9303 Likewise.
9304 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9305 * tree.c (block_nonartificial_location): Likewise.
9306 (block_ultimate_origin): Likewise.
9307 * tree-pretty-print.c (percent_K_format): Likewise. Remove
9308 no longer needed LTO case.
9309
9310 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
9311 Jan Hubicka <jh@suse.cz>
9312 Martin Jambor <mjambor@suse.cz>
9313
9314 * simplify-rtx.c (simplify_merge_mask): New function.
9315 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
9316 same masks are used in op1 or op2.
9317 (test_vec_merge): New function.
9318 (test_vector_ops): Call test_vec_merge.
9319
9320 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9321
9322 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
9323 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
9324 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
9325 (cypress_costs): Set it.
9326 (supersparc_costs): Likewise.
9327 (hypersparc_costs): Likewise.
9328 (leon_cost): Likewise.
9329 (leon3_costs): Likewise.
9330 (sparclet_costs): Likewise.
9331 (ultrasparc_costs): Likewise.
9332 (ultrasparc_costs): Likewise.
9333 (niagara_costs): Likewise.
9334 (niagara2_costs): Likewise.
9335 (niagara3_costs): Likewise.
9336 (niagara4_costs): Likewise.
9337 (niagara7_costs): Likewise.
9338 (m8_costs): Likewise.
9339 (TARGET_CAN_FOLLOW_JUMP): Define.
9340 (pass_work_around_errata::gate): Minor tweak.
9341 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
9342 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
9343 Automaitcally clear MASK_FSMULD mask for V7 processors.
9344 (sparc_can_follow_jump): New static function.
9345 (output_ubranch): Deal with CROSSING_JUMP_P.
9346 (sparc_use_sched_lookahead): Rewrite using switch statement.
9347 (sparc_issue_rate): Reorder.
9348 (sparc_branch_cost): New function.
9349
9350 2018-09-27 Martin Sebor <msebor@redhat.com>
9351
9352 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
9353 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
9354 (int_fits_type_p): Same.
9355
9356 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
9357
9358 * config/i386/i386.md (FPCR_REG): Remove.
9359 (UNSPEC_FLDCW): Remove.
9360 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
9361 (x86_fldcw_1): Remove insn pattern.
9362 (fnstenv): Do not clobber FPCR_REG.
9363 (fldenv): Ditto.
9364 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
9365 (CALL_USED_REGISTERS): Ditto.
9366 (REG_ALLOC_ORDER): Ditto.
9367 (REG_CLASS_CONTENTS): Ditto.
9368 (HI_REGISTER_NAMES): Ditto.
9369 (ADDITIONAL_REGISTER_NAMES): Use defines instead
9370 of numerical constants.
9371 * config/i386/i386.c (regclass_map): Remove fpsr register.
9372 (dbx_register_map): Ditto.
9373 (dbx64_register_map): Ditto.
9374 (svr4_dbx_register_map): Ditto.
9375 (print_reg): Do not handle FPCR_REG.
9376
9377 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
9378
9379 PR target/87149
9380 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
9381 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
9382 Delete, always treat as true.
9383 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9384 Ditto. Simplify remaining code.
9385 * config/powerpcspe/powerpcspe.h: Ditto.
9386 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
9387 Simplify remaining code.
9388 (rs6000_expand_builtin): Ditto.
9389 * config/rs6000/rs6000.h: Ditto.
9390 * configure.ac: Ditto.
9391 * configure: Regenerate.
9392
9393 2018-09-27 Martin Liska <mliska@suse.cz>
9394
9395 * coverage.c (get_coverage_counts): Revert the formatting
9396 of missing profile opt info.
9397
9398 2018-09-27 Richard Biener <rguenther@suse.de>
9399
9400 PR debug/37801
9401 PR debug/87440
9402 * dwarf2out.c (set_block_origin_self): Do not mark outermost
9403 block as we do not output that.
9404 (gen_inlined_subroutine_die): Elide the originally outermost
9405 block, matching what we do for concrete instances.
9406 (decls_for_scope): Add parameter specifying whether to recurse
9407 to subblocks.
9408
9409 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
9410 Tom de Vries <tom@codesourcery.com>
9411
9412 PR 82089
9413
9414 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
9415 STORE_FLAG_VALUE == 1.
9416
9417 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
9418
9419 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
9420 constant definitions.
9421 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
9422 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
9423 ("speculation_barrier"): New expander definition.
9424
9425 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
9426
9427 PR gcov-profile/86957
9428 * common.opt: New warning option -Wmissing-profile.
9429 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
9430 * doc/invoke.texi: Document -Wmissing-profile.
9431
9432 2018-09-26 Jim Wilson <jimw@sifive.com>
9433
9434 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
9435 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
9436
9437 2018-09-26 Martin Sebor <msebor@redhat.com>
9438
9439 * tree.c (zerop): Change return type to bool.
9440 (integer_zerop, integer_onep, integer_each_onep): Same.
9441 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9442 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9443 (real_onep, real_minus_onep, chain_index): Same.
9444 (print_type_hash_statistics, type_list_equal): Same.
9445 * tree.h (zerop): Same.
9446 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
9447 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9448 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9449 (real_onep, real_minus_onep, chain_index): Same.
9450 (print_type_hash_statistics, type_list_equal): Same.
9451
9452 2018-09-26 Jim Wilson <jimw@sifive.com>
9453
9454 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
9455
9456 2018-09-26 Jakub Jelinek <jakub@redhat.com>
9457
9458 PR target/87414
9459 * config/i386/i386.c: Include debug.h and dwarf2out.h.
9460 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
9461 call.
9462
9463 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
9464
9465 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
9466
9467 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9468
9469 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
9470 and FP_SECOND_SSE_REGS.
9471 (REG_CLASS_NAMES): Ditto.
9472 (REG_CLASS_CONTENTS): Ditto.
9473 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
9474 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
9475 (ix86_preferred_output_reload_class): Ditto.
9476 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
9477 clobber constraint to "=&f".
9478 (fix_truncdi_i387): Ditto.
9479 (lrintxfdi2): Ditto.
9480 (fistdi2_<rounding>): Ditto.
9481 (fpremxf4_i387): Change "=u" constraint to "=f".
9482 (fprem1xf4_i387): Ditto.
9483 (sincosxf3): Ditto.
9484 (fptanxf4_i387): Ditto.
9485 (fxtractxf3_i387): Ditto.
9486 (fscalexf4_i387): Ditto.
9487 (atan2xf3): Change "u" constraint to "f".
9488 (fyl2xxf3_i387): Ditto.
9489 (fyl2xp1xf3_i387): Ditto.
9490
9491 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9492
9493 PR target/87439
9494 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
9495 for removed I387_MASK_PM entity.
9496
9497
9498 2018-09-26 Jeff Law <law@redhat.com>
9499 Revert
9500 2018-09-26 Alexey Neyman <stilor@att.net>
9501
9502 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9503 headers are no longer pulled in by <isl/val.h>.
9504
9505 2018-09-26 Richard Biener <rguenther@suse.de>
9506
9507 PR debug/87443
9508 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
9509 or concrete instance DIE to the tree. Create abstract origin
9510 attributes also for concrete instances.
9511
9512 2018-09-26 Alexey Neyman <stilor@att.net>
9513
9514 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9515 headers are no longer pulled in by <isl/val.h>.
9516
9517 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
9518
9519 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
9520 Use new helper functions.
9521 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
9522 Use new helper functions.
9523 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
9524 aarch_mm_needs_release): New declarations.
9525 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
9526 aarch_mm_needs_release): New.
9527
9528 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
9529
9530 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
9531 (arm32_output_mi_thunk): Deal with long calls.
9532
9533 2018-09-26 Richard Biener <rguenther@suse.de>
9534
9535 PR debug/87428
9536 PR debug/87362
9537 * tree-inline.c (expand_call_inline): When the location
9538 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
9539 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
9540 the inserted BLOCK to make inlined_function_outer_scope_p
9541 recognize it.
9542 * dwarf2out.c (add_call_src_coords_attributes): Do not add
9543 coords for reserved locations.
9544
9545 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9546
9547 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
9548 (*call_indirect_nonlocal_sysv<mode>): Ditto.
9549 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
9550 (*sibcall_nonlocal_sysv<mode>): Ditto.
9551 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
9552 (<bd>_<mode>): Ditto.
9553 (<bd>tf_<mode>): Ditto.
9554
9555 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9556
9557 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
9558 control string as a list of templates instead of as C code.
9559 (*altivec_movti): Ditto.
9560 * config/rs6000/darwin.md (movdf_low_di): Ditto.
9561
9562 2018-09-25 Jim Wilson <jimw@sifive.com>
9563
9564 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
9565 when target symbol is weak.
9566
9567 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
9568
9569 PR c/87387
9570 * builtins.c (unterminated_array): Simplify.
9571 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
9572 where pointer arithmetic is safe.
9573
9574 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9575
9576 PR target/86987
9577 * config/rs6000/altivec.md (altivec_vspltb): Use
9578 const_0_to_15_operand instead of u5bit_cint_operand.
9579 (*altivec_vspltb_internal): Ditto.
9580 (altivec_vspltb_direct): Ditto.
9581 (altivec_vsplth): Use const_0_to_7_operand instead of
9582 u5bit_cint_operand.
9583 (*altivec_vsplth_internal): Ditto.
9584 (altivec_vsplth_direct): Ditto.
9585 (altivec_vspltw): Use const_0_to_3_operand instead of
9586 u5bit_cint_operand.
9587 (*altivec_vspltw_internal): Ditto.
9588 (altivec_vspltw_direct): Ditto.
9589 (altivec_vspltsf): Ditto.
9590 (*altivec_vspltsf_internal): Ditto.
9591 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
9592 various splats with the proper size immediate. Reorder the various
9593 cases by ascending size of immediate, and put all such together.
9594
9595 2018-09-25 Richard Biener <rguenther@suse.de>
9596
9597 PR debug/83941
9598 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
9599 GC-ification.
9600 (maybe_create_die_with_external_ref): Do not create
9601 DW_TAG_imported_unit here.
9602 (add_abstract_origin_attribute): Handle external BLOCK refs.
9603 (dwarf2out_abstract_function): Simplify LTO case.
9604 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
9605 rather than using maybe_create_die_with_external_ref.
9606
9607 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
9608
9609 PR target/71278
9610 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
9611 (frndintxf2_mask_pm_i387): Ditto.
9612 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
9613 Enable for !flag_trapping_math.
9614 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
9615 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
9616 Change operand 1 predicate to nonimmediate_operand.
9617 (attr "i387_cw"): Remove mask_pm.
9618 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
9619 (enum ix86_entity): Remove I387_MASK_PM.
9620 * config/i386/i386.c (ix86_i387_mode_needed): Do not
9621 handle I387_MASK_PM.
9622 (ix86_mode_needed): Ditto.
9623 (ix86_mode_after): Ditto.
9624 (ix86_mode_entry): Ditto.
9625 (ix86_mode_exit): Ditto.
9626 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
9627
9628 2018-09-25 Jakub Jelinek <jakub@redhat.com>
9629
9630 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
9631 to_update_switch_stmts to vNULL instead of calling create on them
9632 immediately.
9633
9634 2018-09-25 Richard Biener <rguenther@suse.de>
9635
9636 PR tree-optimization/87402
9637 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
9638 (visit_phi): Re-instantiate handling of supposed to be VARYING
9639 but non-VARYING backedge value.
9640
9641 2018-09-25 Richard Biener <rguenther@suse.de>
9642
9643 PR debug/83941
9644 * dwarf2out.c (struct sym_off_pair): New.
9645 (external_die_map): New global.
9646 (lookup_decl_die): When in LTO create DIEs lazily from the
9647 external_die_map.
9648 (lookup_block_die): New function, create DIEs lazily in LTO.
9649 (equate_block_to_die): New function.
9650 (dwarf2out_die_ref_for_decl): During WPA get the association
9651 from the external DIE map.
9652 (dwarf2out_register_external_die): Record mapping into the
9653 external DIE map.
9654 (maybe_create_die_with_external_ref): New function split out from
9655 DIE generation part of old dwarf2out_register_external_die.
9656 (add_abstract_origin_attribute): Do not return the DIE. When
9657 in LTO reference externals directly.
9658 (dwarf2out_abstract_function): When in LTO ignore calls for
9659 decls with external DIEs (already present abstract instances).
9660 (gen_call_site_die): Adjust.
9661 (add_high_low_attributes): Likewise.
9662 (gen_lexical_block_die): Likewise.
9663 (gen_inlined_subroutine_die): Likewie.
9664 (gen_block_die): Likewise.
9665 (dwarf2out_inline_entry): Likewise.
9666 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
9667 DIEs.
9668
9669 2018-09-25 Martin Liska <mliska@suse.cz>
9670
9671 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
9672 integers and not by a float value.
9673
9674 2018-09-25 Martin Liska <mliska@suse.cz>
9675
9676 PR fortran/87394
9677 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
9678 instead of NULL.
9679 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
9680 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
9681 * godump.c (go_format_type): Remove extra parenthesis.
9682
9683 2018-09-25 Martin Liska <mliska@suse.cz>
9684
9685 * alias.c (set_dest_equal_p): Remove unused function.
9686 * config/i386/i386.c (def_builtin_pure2): Likewise.
9687 * diagnostic-show-locus.c (class layout): Remove
9688 unused field.
9689 (layout::layout): Likewise here.
9690 * dump-context.h (class temp_dump_context): Likewise.
9691 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
9692 (add_AT_loclistsptr): Likewise.
9693 (add_AT_offset): Likewise.
9694 (get_AT_hi_pc): Likewise.
9695 (is_comdat_die): Likewise.
9696 (type_is_enum): Likewise.
9697 (ceiling): Likewise.
9698 (add_AT_vms_delta): Likewise.
9699 (is_class_die): Likewise.
9700 * edit-context.c (class line_event): Remove unused field.
9701 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
9702 unused function.
9703 * ipa-cp.c (ipa_get_vr_lat): Likewise.
9704 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
9705 (ok_for_base_p_nonstrict): Likewise.
9706 * tree-chrec.c (is_not_constant_evolution): Likewise.
9707 (chrec_fold_poly_cst): Likewise.
9708 * tree-if-conv.c (has_pred_critical_p): Likewise.
9709 * tree-ssa-coalesce.c (print_exprs): Likewise.
9710 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
9711 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
9712 * tree-vrp.c (value_ranges_intersect_p): Likewise.
9713 (value_range_nonnegative_p): Likewise.
9714
9715 2018-09-25 Martin Liska <mliska@suse.cz>
9716
9717 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
9718 Do not handle "GNU Pascal".
9719 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
9720 Likewise.
9721 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
9722 from documentation. Likewise.
9723 * dbxout.c (dbxout_range_type): Likewise.
9724 * doc/cpp.texi: Likewise.
9725 * doc/extend.texi: Likewise.
9726 * doc/frontends.texi: Likewise.
9727 * doc/invoke.texi: Remove Pascal entry.
9728 * tree.def (CLEANUP_POINT_EXPR): Likewise.
9729 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
9730
9731 2018-09-25 Martin Liska <mliska@suse.cz>
9732
9733 PR middle-end/86078
9734 * doc/invoke.texi: Document all parameters and remove default
9735 of the parameters.
9736
9737 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
9738
9739 PR bootstrap/87417
9740 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
9741 contains HOST_WIDE_INTs when computing its size.
9742
9743 2018-09-24 Jim Wilson <jimw@sifive.com>
9744
9745 PR target/87391
9746 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
9747 not TARGET_RVE.
9748 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
9749
9750 2018-09-24 Andrew Pinski <apinski@marvell.com>
9751
9752 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
9753 access prev before checking it for NULLness in the
9754 AARCH64_FUSE_CMP_BRANCH case.
9755
9756 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
9757
9758 PR target/82699
9759 * config/i386/i386.c (rest_of_insert_endbranch): Set
9760 endbr_queued_at_entrance to true and don't insert ENDBR if
9761 x86_function_profiler will be called.
9762 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
9763 is true.
9764 * config/i386/i386.h (machine_function): Add
9765 endbr_queued_at_entrance.
9766
9767 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9768
9769 * genattrtab.c (mk_attr_alt): Use alternative_mask.
9770 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
9771 types.
9772 (check_attr_test): Use alternative_mask.
9773 (get_attr_value): Likewise.
9774 (compute_alternative_mask): Use alternative_mask and XWINT.
9775 (make_alternative_compare): Use alternative_mask.
9776 (attr_alt_subset_p): Use XWINT.
9777 (attr_alt_subset_of_compl_p): Likewise.
9778 (attr_alt_intersection): Use alternative_mask and XWINT.
9779 (attr_alt_union): Likewise.
9780 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
9781 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
9782 (simplify_test_exp): Use alternative_mask and XWINT.
9783 (write_test_expr): Use alternative_mask and XWINT, adjust bit
9784 number calculation to support 64 bits. Generate code that
9785 checks 64-bit masks.
9786 (main): Use alternative_mask.
9787 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
9788
9789 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9790
9791 PR target/80080
9792 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
9793 RETURN+USE when returning via %r14.
9794
9795 2018-09-24 Martin Liska <mliska@suse.cz>
9796
9797 * gcov.c (output_lines): Print colorization legend
9798 for both flag_use_colors and flag_use_hotness_colors.
9799 Reword the help.
9800
9801 2018-09-24 Martin Liska <mliska@suse.cz>
9802
9803 * coverage.c (get_coverage_counts): Use warning_at
9804 with current_function_decl location. Use %qD in warning
9805 message.
9806
9807 2018-09-24 Martin Liska <mliska@suse.cz>
9808
9809 * memory-block.h (memory_block_pool::release): Annotate with
9810 valgrind that the memory is not accessible.
9811
9812 2018-09-24 Martin Liska <mliska@suse.cz>
9813
9814 PR sanitizer/85774
9815 * asan.c: Make asan_handled_variables extern.
9816 * asan.h: Likewise.
9817 * cfgexpand.c (expand_stack_vars): Make sure
9818 a representative is unpoison if another
9819 variable in the partition is handled by
9820 use-after-scope sanitization.
9821
9822 2018-09-24 Richard Biener <rguenther@suse.de>
9823
9824 PR tree-optimization/63155
9825 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
9826 the worklist when the edge of the respective argument isn't
9827 executable.
9828
9829 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9830
9831 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
9832 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
9833 (MASK_CLASS_P): Update for rename.
9834 (MAYBE_MASK_CLASS_P): Ditto.
9835 (REG_CLASS_NAMES): Update.
9836 (REG_CLASS_CONTENT): Update.
9837 * config/i386/i386.c (regclass_map): Update for MASK_REG
9838 and ALL_MASK_REGS rename.
9839 * config/i386/constraints.md (Yk): Update for rename.
9840 (k): Ditto.
9841
9842 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9843
9844 * config/i386/i386.h (enum reg_class): Remove
9845 EVEX_SSE_REGS and MOD4_SSE_REGS.
9846 (REG_CLASS_NAMES): Update.
9847 (REG_CLASS_CONTENT): Update.
9848 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
9849 registers as ALL_SSE_REGS.
9850 (ix86_additional_allocno_class_p): Remove.
9851 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
9852 (ix86_register_priority): Lower priority of EVEX SSE registers.
9853 Use IN_RANGE macro where appropriate.
9854 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
9855 AVX-5124VNNIW checks.
9856 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
9857 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
9858 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
9859 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
9860 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
9861 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
9862 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
9863 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
9864 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
9865 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
9866 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
9867 * config/i386/constraints.md (Yh): Remove.
9868
9869 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9870
9871 * config/i386/i386.c (regclass_map): Declare integer REX registers
9872 as GENERAL_REGS.
9873
9874 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
9875
9876 * doc/service.texi (Service): Switch the fsf.org link to https.
9877
9878 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
9879
9880 PR target/86798
9881 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9882 Define to speculation_safe_value_not_needed.
9883
9884 2018-09-21 Florian Weimer <fweimer@redhat.com>
9885
9886 PR middle-end/81035
9887 * doc/extend.texi (Common Function Attributes): Mention that
9888 noreturn suppresses tail call optimization.
9889
9890 2018-09-21 Jeff Law <law@redhat.com>
9891
9892 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
9893 vr_values::cleanup_edges_and_switches.
9894 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
9895 vr_values class.
9896 (identify_jump_threads): Remove EDGE_IGNORE handling.
9897 (execute_vrp): Move handling of to_remove_edges and
9898 to_update_switch_stmts into vr_values class member functions.
9899 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
9900 (to_update_switch_stmts): Likewise.
9901 * vr-values.c: Include cfghooks.h.
9902 (vr_values::vr_values): Initialize to_remove_edges and
9903 to_update_switch_stmts.
9904 (vr_values::~vr_values): Verify to_remove_edges and
9905 to_update_switch_stmts are empty.
9906 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
9907 (vr_values::cleanup_edges_and_switches): New member function.
9908 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
9909 function. Add new data members.
9910
9911 2018-09-21 David Malcolm <dmalcolm@redhat.com>
9912
9913 PR tree-optimization/87309
9914 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
9915 calls with pflags and alt_flags.
9916 (selftest::test_capture_of_dump_calls): Add test of interaction of
9917 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
9918
9919 2018-09-21 Olivier Hainque <hainque@adacore.com>
9920
9921 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
9922
9923 2018-09-21 Olivier Hainque <hainque@adacore.com>
9924
9925 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
9926
9927 2018-09-21 Olivier Hainque <hainque@adacore.com>
9928
9929 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
9930 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
9931 (VXWORKS_LIBS_RTP): Minor reordering.
9932
9933 2018-09-21 Olivier Hainque <hainque@adacore.com>
9934
9935 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
9936 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
9937
9938 2018-09-21 Olivier Hainque <hainque@adacore.com>
9939
9940 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
9941 (PTRDIFF_TYPE): Likewise.
9942
9943 2018-09-21 Olivier Hainque <hainque@adacore.com>
9944
9945 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
9946 triplet, similar to support for VxWorks7.
9947 * config/vxworks-dummy.h: Provide a default definition
9948 of TARGET_VXWORKS64 to 0.
9949
9950 2018-09-21 Olivier Hainque <hainque@adacore.com>
9951
9952 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
9953 * config/vxworks-dummy.h: here.
9954
9955 2018-09-21 Olivier Hainque <hainque@adacore.com>
9956
9957 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
9958
9959 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
9960 Bo Zhou <zbo.zhou@hisilicon.com>
9961
9962 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
9963 * config/aarch64/aarch64-tune.md: Regenerated.
9964 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
9965 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
9966 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
9967
9968 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
9969 Julian Brown <julian@codesourcery.com>
9970
9971 * builtins.c (get_builtin_sync_mem): Handle address spaces.
9972
9973 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
9974
9975 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
9976 if the call takes a static chain.
9977
9978 2018-09-21 Martin Liska <mliska@suse.cz>
9979
9980 * auto-profile.c (autofdo_source_profile::read): Do not
9981 set sum_all.
9982 (read_profile): Do not add working sets.
9983 (read_autofdo_file): Remove sum_all.
9984 (afdo_callsite_hot_enough_for_early_inline): Remove const
9985 qualifier.
9986 * coverage.c (struct counts_entry): Remove gcov_summary.
9987 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
9988 do not support GCOV_TAG_PROGRAM_SUMMARY.
9989 (get_coverage_counts): Remove summary and expected
9990 arguments.
9991 * coverage.h (get_coverage_counts): Likewise.
9992 * doc/gcov-dump.texi: Remove -w option.
9993 * gcov-dump.c (dump_working_sets): Remove.
9994 (main): Do not support '-w' option.
9995 (print_usage): Likewise.
9996 (tag_summary): Likewise.
9997 * gcov-io.c (gcov_write_summary): Do not dump
9998 histogram.
9999 (gcov_read_summary): Likewise.
10000 (gcov_histo_index): Remove.
10001 (gcov_histogram_merge): Likewise.
10002 (compute_working_sets): Likewise.
10003 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
10004 it not obsolete.
10005 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
10006 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
10007 (GCOV_HISTOGRAM_SIZE): Remove.
10008 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
10009 (struct gcov_summary): Simplify rapidly just
10010 to runs and sum_max fields.
10011 (gcov_histo_index): Remove.
10012 (NUM_GCOV_WORKING_SETS): Likewise.
10013 (compute_working_sets): Likewise.
10014 * gcov-tool.c (print_overlap_usage_message): Remove
10015 trailing empty line.
10016 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
10017 (output_lines): Remove program related line.
10018 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
10019 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
10020 histogram.
10021 (input_profile_summary): Do not read it.
10022 (merge_profile_summaries): And do not merge it.
10023 (input_symtab): Do not call removed function.
10024 * modulo-sched.c (sms_schedule): Do not print sum_max.
10025 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
10026 removed when histogram method was invented.
10027 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
10028 mode.
10029 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
10030 GCOV coding style.
10031 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
10032 and dump selected value.
10033 * profile.c (add_working_set): Remove.
10034 (get_working_sets): Likewise.
10035 (find_working_set): Likewise.
10036 (get_exec_counts): Do not work with working sets.
10037 (read_profile_edge_counts): Do not inform as sum_max is removed.
10038 (compute_branch_probabilities): Likewise.
10039 (compute_value_histograms): Remove argument for call of
10040 get_coverage_counts.
10041 * profile.h: Do not make gcov_summary const.
10042
10043 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
10044
10045 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
10046
10047 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
10048
10049 PR tree-optimization/86990
10050 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
10051 Check that the entire merged store group is made of constants only for
10052 overlapping stores.
10053
10054 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
10055
10056 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
10057 (VTABLE_VERIFICATION_SPEC): Likewise.
10058 (SANITIZER_EARLY_SPEC): Likewise.
10059 (SANITIZER_SPEC): Likewise.
10060 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
10061 * doc/invoke.texi (Link Options): Document -r.
10062
10063 2018-09-20 Richard Biener <rguenther@suse.de>
10064
10065 PR middle-end/87054
10066 * gimplify.c (gimplify_expr): Retain alignment of
10067 addressable lvalue in dereference.
10068
10069 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
10070
10071 PR bootstrap/87013
10072 * configure.ac: Check for .loc is_stmt support.
10073 * configure, config.in: Rebuilt.
10074 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
10075 if not supported.
10076
10077 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10078
10079 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
10080 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
10081 -misel=no.
10082
10083 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10084
10085 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10086 VECTOR_OTHER.
10087 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
10088 case VECTOR_OTHER.
10089
10090 2018-09-20 Marek Polacek <polacek@redhat.com>
10091
10092 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
10093
10094 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10095
10096 PR tree-optimization/87288
10097 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
10098 into account when determining PEELING_FOR_NITERS.
10099
10100 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10101
10102 PR tree-optimization/86877
10103 * tree-vect-loop.c (vect_analyze_loop_2): Call
10104 vect_verify_datarefs_alignment.
10105
10106 2018-09-19 Marek Polacek <polacek@redhat.com>
10107
10108 * doc/invoke.texi: Document -Wclass-conversion.
10109
10110 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
10111
10112 * config/pa/pa.c (pa_adjust_priority): Delete.
10113 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
10114
10115 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
10116 (atomic_storehi): Likewise.
10117 (atomic_storesi): Likewise.
10118 (atomic_loaddi): Restore compare and swap exchange loop code.
10119
10120 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
10121
10122 PR rtl-optimization/86902
10123 * combine.c (try_combine): When changing the CC mode used, don't change
10124 an unrelated mode in other_insn to that new CC mode.
10125
10126 2018-09-19 David Malcolm <dmalcolm@redhat.com>
10127
10128 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
10129 with %T in place of calls to dump_generic_expr.
10130 (prune_runtime_alias_test_list): Likewise.
10131 (create_runtime_alias_checks): Likewise.
10132 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
10133 (vect_analyze_data_ref_dependence): Likewise.
10134 (vect_slp_analyze_data_ref_dependence): Likewise.
10135 (vect_record_base_alignment): Likewise. Use %G in place of call
10136 to dump_gimple_stmt.
10137 (vect_compute_data_ref_alignment): Likewise.
10138 (verify_data_ref_alignment): Likewise.
10139 (vect_find_same_alignment_drs): Likewise.
10140 (vect_analyze_group_access_1): Likewise.
10141 (vect_analyze_data_ref_accesses): Likewise.
10142 (dependence_distance_ge_vf): Likewise.
10143 (dump_lower_bound): Likewise.
10144 (vect_prune_runtime_alias_test_list): Likewise.
10145 (vect_find_stmt_data_reference): Likewise.
10146 (vect_analyze_data_refs): Likewise.
10147 (vect_create_addr_base_for_vector_ref): Likewise.
10148 (vect_create_data_ref_ptr): Likewise.
10149 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
10150 (vect_can_advance_ivs_p): Likewise.
10151 (vect_update_ivs_after_vectorizer): Likewise.
10152 (vect_gen_prolog_loop_niters): Likewise.
10153 (vect_prepare_for_masked_peels): Likewise.
10154 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10155 (vect_determine_vectorization_factor): Likewise.
10156 (vect_is_simple_iv_evolution): Likewise.
10157 (vect_analyze_scalar_cycles_1): Likewise.
10158 (vect_analyze_loop_operations): Likewise.
10159 (report_vect_op): Likewise.
10160 (vect_is_slp_reduction): Likewise.
10161 (check_reduction_path): Likewise.
10162 (vect_is_simple_reduction): Likewise.
10163 (vect_create_epilog_for_reduction): Likewise.
10164 (vect_finalize_reduction:): Likewise.
10165 (vectorizable_induction): Likewise.
10166 (vect_transform_loop_stmt): Likewise.
10167 (vect_transform_loop): Likewise.
10168 (optimize_mask_stores): Likewise.
10169 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
10170 (vect_split_statement): Likewise.
10171 (vect_recog_over_widening_pattern): Likewise.
10172 (vect_recog_average_pattern): Likewise.
10173 (vect_determine_min_output_precision_1): Likewise.
10174 (vect_determine_precisions_from_range): Likewise.
10175 (vect_determine_precisions_from_users): Likewise.
10176 (vect_mark_pattern_stmts): Likewise.
10177 (vect_pattern_recog_1): Likewise.
10178 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10179 (vect_record_max_nunits): Likewise.
10180 (vect_build_slp_tree_1): Likewise.
10181 (vect_build_slp_tree_2): Likewise.
10182 (vect_print_slp_tree): Likewise.
10183 (vect_analyze_slp_instance): Likewise.
10184 (vect_detect_hybrid_slp_stmts): Likewise.
10185 (vect_detect_hybrid_slp_1): Likewise.
10186 (vect_slp_analyze_operations): Likewise.
10187 (vect_slp_analyze_bb_1): Likewise.
10188 (vect_transform_slp_perm_load): Likewise.
10189 (vect_schedule_slp_instance): Likewise.
10190 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10191 (vect_mark_stmts_to_be_vectorized): Likewise.
10192 (vect_init_vector_1): Likewise.
10193 (vect_get_vec_def_for_operand): Likewise.
10194 (vect_finish_stmt_generation_1): Likewise.
10195 (vect_check_load_store_mask): Likewise.
10196 (vectorizable_call): Likewise.
10197 (vectorizable_conversion): Likewise.
10198 (vectorizable_operation): Likewise.
10199 (vectorizable_load): Likewise.
10200 (vect_analyze_stmt): Likewise.
10201 (vect_is_simple_use): Likewise.
10202 (vect_get_vector_types_for_stmt): Likewise.
10203 (vect_get_mask_type_for_stmt): Likewise.
10204 * tree-vectorizer.c (increase_alignment): Likewise.
10205
10206 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
10207
10208 * doc/rtl.texi: Adjust vec_select description.
10209 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
10210 non-constant selectors.
10211
10212 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
10213
10214 * config/aarch64/aarch64-protos.h
10215 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
10216 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
10217 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
10218 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
10219 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
10220 (AARCH64_FL_PROFILE): Move index so flags are ordered.
10221 (AARCH64_ISA_RCPC8_4): New flag.
10222 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
10223 to aarch64_offset_9bit_signed_unscaled_p.
10224 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
10225 and use stlur.
10226 * config/aarch64/constraints.md (Ust): New constraint.
10227 * config/aarch64/predicates.md.
10228 (aarch64_9bit_offset_memory_operand): New predicate.
10229 (aarch64_rcpc_memory_operand): New predicate.
10230
10231 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
10232
10233 PR rtl-optimization/87361
10234 * rtlanal.c (nonzero_bits1): Revert accidental change.
10235
10236 2018-09-19 Richard Biener <rguenther@suse.de>
10237
10238 PR tree-optimization/87349
10239 PR tree-optimization/87342
10240 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
10241
10242 2018-09-18 Marek Polacek <polacek@redhat.com>
10243
10244 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
10245 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
10246
10247 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10248
10249 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
10250
10251 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10252
10253 PR rtl-optimization/86882
10254 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
10255
10256 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
10257
10258 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
10259 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
10260
10261 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
10262
10263 PR other/87353
10264 * doc/invoke.texi (Link Options): Fix formatting and grammar.
10265
10266 2018-09-18 Richard Biener <rguenther@suse.de>
10267
10268 PR middle-end/63155
10269 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
10270 (compute_samebase_partition_bases): Likewise.
10271 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
10272 (gimple_can_coalesce_p): Simplify.
10273
10274 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
10275
10276 Handle a library implementation of ffs calling __builtin_ffs.
10277 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
10278 (mmix_init_libfuncs): New function: make __builtin_ffs expand
10279 to __ffsdi2.
10280
10281 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10282
10283 * diagnostic-show-locus.c (class layout_range): Add field
10284 "m_original_idx".
10285 (layout_range::layout_range): Add "original_idx" param and use it
10286 to initialize new field.
10287 (make_range): Use 0 for original_idx.
10288 (layout::layout): Pass in index to calls to
10289 maybe_add_location_range.
10290 (layout::maybe_add_location_range): Add param "original_idx" and
10291 pass it on to layout_range.
10292 (layout::print_any_labels): Pass on range->m_original_idx to
10293 get_text call.
10294 (gcc_rich_location::add_location_if_nearby): Use 0 for
10295 original_idx.
10296 * gcc-rich-location.h (text_range_label::get_text): Update for new
10297 param.
10298 (range_label_for_type_mismatch::get_text): Likewise.
10299
10300 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10301
10302 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
10303
10304 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10305
10306 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
10307 format_string_diagnostic_t.
10308 (fmtwarn_n): Likewise.
10309 * substring-locations.c
10310 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
10311 (format_warning_n_va): Convert to...
10312 (format_string_diagnostic_t::emit_warning_n_va): ...this.
10313 (format_warning_va): Convert to...
10314 (format_string_diagnostic_t::emit_warning_va): ...this.
10315 (format_warning_at_substring): Convert to...
10316 (format_string_diagnostic_t::emit_warning): ...this.
10317 (format_warning_at_substring_n): Convert to...
10318 (format_string_diagnostic_t::emit_warning_n): ...this.
10319 * substring-locations.h (class format_string_diagnostic_t): New
10320 class.
10321 (format_warning_va): Convert to
10322 format_string_diagnostic_t::emit_warning_va.
10323 (format_warning_n_va): Convert to
10324 format_string_diagnostic_t::emit_warning_n_va.
10325 (format_warning_at_substring): Convert to
10326 format_string_diagnostic_t::emit_warning.
10327 (format_warning_at_substring_n): Convert to
10328 format_string_diagnostic_t::emit_warning_n.
10329
10330 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
10331 Bernd Schmidt <bernds_cb1@t-online.de>
10332
10333 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
10334 SImode args.
10335
10336 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10337
10338 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
10339 operand 0 predicate to nonimmediate operand.
10340 (rint<mode>2_frndint): Remove insn pattern.
10341 (rint<mode>2): Change operand 1 predicate to general_operand.
10342 Extend operand 1 to XFmode and generate rintxf2 insn.
10343 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
10344 Do not use X87MODEF mode macro.
10345 (frndintxf2_<rounding>_i387): Rename from
10346 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
10347 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
10348 to XFmode and generate significandxf3 insn.
10349
10350 2018-09-17 Richard Biener <rguenther@suse.de>
10351
10352 PR tree-optimization/87328
10353 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
10354 visiting unexecutable backedges when not iterating.
10355 (do_rpo_vn): Mark all edges not executable even when not
10356 iterating.
10357
10358 2018-09-17 Martin Jambor <mjambor@suse.cz>
10359
10360 PR c/63886
10361 * doc/invoke.texi (Warning Options): Likewise.
10362
10363 2018-09-17 Richard Biener <rguenther@suse.de>
10364
10365 PR tree-optimization/87301
10366 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
10367 clean EH info from leftover copy assignments.
10368
10369 2018-09-17 Martin Liska <mliska@suse.cz>
10370
10371 PR gcov-profile/85871
10372 * gcov.c (output_intermediate_file): Fix out of bounds
10373 access.
10374
10375 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
10376
10377 * config/arc/arc.c: Object attributes for core4 not reflected
10378 correctly.
10379 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
10380 core3).
10381
10382 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
10383
10384 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
10385
10386 2018-09-17 Martin Liska <mliska@suse.cz>
10387
10388 * doc/gcov.texi: Document new option --use-hotness-colors.
10389 * gcov.c (struct source_info): Declare new field.
10390 (source_info::source_info): Set default for maximum_count.
10391 (print_usage): Add new -q option.
10392 (process_args): Process it.
10393 (accumulate_line_info): Save src->maximum_count.
10394 (output_line_beginning): Make color line number if
10395 flag_use_hotness_colors is set.
10396 (output_line_details): Pass default argument value.
10397 (output_lines): Pass src->maximum_count.
10398
10399 2018-09-17 Martin Liska <mliska@suse.cz>
10400
10401 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
10402 Use processor_names table.
10403 * config/i386/i386.c (ix86_default_align): Use
10404 processor_cost_table for alignment values.
10405 (ix86_option_override_internal): Use processor_names.
10406 (ix86_function_specific_print): Likewise.
10407 * config/i386/i386.h (struct processor_costs):
10408 Add alignment values.
10409 (struct ptt): Remove and replace with const char *.
10410 * config/i386/x86-tune-costs.h (struct processor_costs):
10411 Declare default alignments for all costs.
10412
10413 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
10414
10415 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
10416 symbolics or VR_VARYING ranges for ABS_EXPR.
10417 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
10418 when range will wrap.
10419
10420 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
10421
10422 PR middle-end/86864
10423 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
10424 before and after a JUMP_TABLE_DATA.
10425
10426 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
10427
10428 PR middle-end/87188
10429 * dojump.c (do_compare_and_jump): Canonicalize function pointers
10430 when one operand is a function pointer. Use POINTER_TYPE_P and
10431 FUNC_OR_METHOD_TYPE_P.
10432 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
10433 * fold-const.c (build_range_check): Likewise.
10434 * match.pd (simple_comparison): Likewise.
10435
10436 2018-09-14 David Malcolm <dmalcolm@redhat.com>
10437
10438 PR c/82967
10439 * spellcheck.c (get_edit_distance_cutoff): New function.
10440 (selftest::test_edit_distance_unit_test_oneway): Rename to...
10441 (selftest::test_get_edit_distance_one_way): ...this.
10442 (selftest::test_get_edit_distance_unit): Rename to...
10443 (selftest::test_get_edit_distance_both_ways): ...this.
10444 (selftest::test_edit_distances): Move tests to this new function,
10445 and test some more pairs of strings. Update for above renaming.
10446 (selftest::get_old_cutoff): New function.
10447 (selftest::test_get_edit_distance_cutoff): New function.
10448 (selftest::assert_suggested_for): New function.
10449 (ASSERT_SUGGESTED_FOR): New macro.
10450 (selftest::assert_not_suggested_for): New function.
10451 (ASSERT_NOT_SUGGESTED_FOR): New macro.
10452 (selftest::test_suggestions): New function.
10453 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
10454 tests to selftest::test_edit_distances and call it. Add calls to
10455 selftest::test_get_edit_distance_cutoff and
10456 selftest::test_suggestions.
10457 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
10458 (best_match::consider): Replace hard-coded cutoff calculation with
10459 a call to...
10460 (best_match::get_cutoff): New declaration.
10461 (best_match::get_best_meaningful_candidate): Likewise.
10462
10463 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10464
10465 * builtins.c (fold_builtin_strlen): Remove TODO comment.
10466
10467 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10468
10469 revert:
10470 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10471
10472 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10473 terminated string literal.
10474
10475 2018-09-14 Martin Sebor <msebor@redhat.com>
10476
10477 * builtins.c (unterminated_array): Handle ARRAY_REF.
10478 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
10479 * builtins.h (unterminated_array): Declare extern.
10480 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
10481 arrays.
10482 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
10483 calls.
10484
10485 2018-09-14 Martin Sebor <msebor@redhat.com>
10486 Jeff Law <law@redhat.com>
10487
10488 * builtins.c (unterminated_array): New.
10489 (expand_builtin_strcpy): Adjust.
10490 (expand_builtin_strcpy_args): Detect unterminated arrays.
10491 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
10492 unterminated arrays.
10493 * gimple-fold.h (get_maxval_strlen): Add argument.
10494 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
10495
10496 * gimple-fold.c (get_range_strlen): Add argument.
10497 (get_maxval_strlen): Adjust.
10498 * gimple-fold.h (get_range_strlen): Add argument.
10499
10500 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
10501
10502 * config/i386/movdirintrin.h: Fix copyright year.
10503
10504 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
10505
10506 * reg-stack.c: Include regs.h.
10507 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
10508 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
10509 FIRST_STACK_REG, not DFmode.
10510 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
10511 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
10512 (change stack): Default register mode to the reg_raw_mode of
10513 FIRST_STACK_REG, not DFmode.
10514 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
10515 (*swapxf): Rename from swapxf.
10516
10517 2018-09-14 Carl Love <cel@us.ibm.com>
10518
10519 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
10520 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
10521
10522 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
10523
10524 PR target/87224
10525 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
10526 alternatives.
10527
10528 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
10529
10530 PR target/85628
10531 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
10532
10533 2018-09-14 Jason Merrill <jason@redhat.com>
10534
10535 Fix --enable-gather-detailed-mem-stats.
10536 * hash-table.c (hash_table_usage): Change from variable to function.
10537 * hash-table.h: Adjust.
10538 * Makefile.in: Add missing dependencies on hash-table.h.
10539
10540 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10541
10542 PR tree-optimization/87259
10543 PR lto/87283
10544 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
10545 execute_cse_reciprocals_1 has tried transforming.
10546
10547 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
10548
10549 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
10550 VR_VARYING for PLUS/MINUS_EXPR.
10551
10552 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
10553
10554 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
10555 formatting.
10556
10557 2018-09-14 Richard Biener <rguenther@suse.de>
10558
10559 PR middle-end/63155
10560 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
10561 bits for the merged partition.
10562
10563 2018-09-13 Martin Sebor <msebor@redhat.com>
10564 Bernd Edlinger <bernd.edlinger@hotmail.de>
10565
10566 * builtins.h (c_srlen): Add argument.
10567 * builtins.c (warn_string_no_nul): New function.
10568 (c_strlen): Add argument and use it. Update recursive calls.
10569 Pass DECL argument to string_constant to get info on non
10570 terminated strings. Update *NONSTR as needed.
10571 (fold_builtin_strlen): Add argument to calls to c_strlen.
10572 Warn for unterminated arrays.
10573 (warn_string_no_null): Add prototype.
10574 * expr.c (string_constant): Update arguments. Update recursive
10575 calls appropriately. Detect missing NUL terminator and outermost
10576 declaration its missing in.
10577 Improve checks for arrays with nonzero lower bound or elements
10578 that are not a single byte. Simplify offset computation.
10579 Simplify checks for non-NUL terminated strings.
10580 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
10581 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
10582
10583 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
10584
10585 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
10586 correctly.
10587 * fold-const.c (c_getstr): Fix function comment. Remove unused third
10588 argument. Fix range checks.
10589 * fold-const.h (c_getstr): Adjust protoype.
10590 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
10591 string is constant but contains no NUL byte.
10592
10593 * expr.c (string_constant): Adjust function comment.
10594 Remove bogus check for zero termination.
10595
10596 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
10597
10598 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
10599 (get_constant_size): Don't make STRING_CSTs larger than they are.
10600 (check_string_literal): New check function for STRING_CSTs.
10601 (output_constant): Use it.
10602
10603 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
10604
10605 PR target/86812
10606 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
10607
10608 2018-09-13 Richard Biener <rguenther@suse.de>
10609
10610 PR tree-optimization/87263
10611 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
10612 (struct unwind_state): Add max_rpo field.
10613 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
10614 Compute max_rpo, the max RPO number a block can be backwards reached
10615 from. Re-write non-iterating mode to a RPO ordered worklist approach,
10616 separating it from the iterating mode.
10617
10618 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10619
10620 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
10621 (rfs_decision): New scheduling decision.
10622
10623 2018-09-13 Richard Biener <rguenther@suse.de>
10624
10625 PR bootstrap/87134
10626 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
10627 (vn_nary_op_insert_pieces_predicated): Do not write useless
10628 valid_dominated_by_p entry outside of the allocated storage.
10629
10630 2018-09-13 Omar Sandoval <osandov@osandov.com>
10631 Tom de Vries <tdevries@suse.de>
10632
10633 PR debug/86985
10634 * dwarf2out.c (is_c): New function.
10635 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
10636
10637 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
10638
10639 PR target/85628
10640 * config/aarch64/aarch64.md (*aarch64_bfxil):
10641 Define.
10642 * config/aarch64/constraints.md (Ulc): Define.
10643 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
10644 Define.
10645 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
10646 New function.
10647
10648 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10649
10650 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
10651 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
10652 aarch64_layout_frame call.
10653 (aarch64_expand_epilogue): Likewise.
10654 (aarch64_initial_elimination_offset): Likewise.
10655 (aarch64_get_separate_components): Likewise.
10656 (aarch64_use_return_insn_p): Likewise.
10657 (aarch64_layout_frame): Remove unneeded check.
10658
10659 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10660
10661 * configure.ac: Only append
10662 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
10663 gcc_config_arguments if it was never reconfigured or last reconfigure
10664 was with different arguments.
10665 * configure: Regenerated.
10666
10667 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10668 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10669
10670 PR middle-end/87290
10671 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
10672 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
10673
10674 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10675
10676 PR tree-optimization/87287
10677 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
10678 X % C == 0 to X % (unsigned) C == 0 optimization to ...
10679 * match.pd (X % C == 0): ... here. New optimization.
10680
10681 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10682
10683 PR middle-end/82853
10684 * expr.h (maybe_optimize_mod_cmp): Declare.
10685 * expr.c (mod_inv): New function.
10686 (maybe_optimize_mod_cmp): New function.
10687 (do_store_flag): Use it.
10688 * cfgexpand.c (expand_gimple_cond): Likewise.
10689
10690 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
10691 Julian Brown <julian@codesourcery.com>
10692
10693 PR middle-end/86336
10694 * gimplify.c (gimplify_scan_omp_clauses): Set
10695 target_firstprivatize_array_bases in OpenACC parallel and kernels
10696 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
10697 OpenACC data regions.
10698
10699 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
10700
10701 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
10702 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
10703
10704 2018-09-12 Richard Biener <rguenther@suse.de>
10705
10706 PR tree-optimization/87280
10707 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
10708 edge but unreachable target.
10709 (do_rpo_vn): For conservatively handling a PHI only mark
10710 the backedge executable but not the block reachable.
10711
10712 2018-09-12 Richard Biener <rguenther@suse.de>
10713
10714 PR tree-optimization/87266
10715 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
10716 visited blocks.
10717
10718 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
10719
10720 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
10721 constants.
10722 ("trunc<BFP:mode><DFP_ALL:mode>2")
10723 ("trunc<DFP_ALL:mode><BFP:mode>2")
10724 ("extend<BFP:mode><DFP_ALL:mode>2")
10725 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
10726 according to the target operand type.
10727
10728 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10729 Andreas Krebbel <krebbel@linux.ibm.com>
10730
10731 PR tree-optimization/86844
10732 * gimple-ssa-store-merging.c
10733 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
10734 there are any overlapping stores in between them, make sure they are
10735 also coalesced or we give up completely.
10736
10737 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10738
10739 PR middle-end/87248
10740 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
10741 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
10742
10743 2018-09-12 Tom de Vries <tdevries@suse.de>
10744
10745 * common.opt (gdescribe-dies): Add option.
10746 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
10747 attribute for artifical and nameless decls.
10748 (dwarf2out_register_external_die): Add description attribute to
10749 external reference die.
10750 (add_desc_attribute): New functions.
10751 (gen_subprogram_die): Add description attribute to
10752 DW_TAG_call_site_parameter.
10753 * tree-pretty-print.c (print_generic_expr_to_str): New function.
10754 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
10755 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
10756 -gno-describe-dies.
10757 (@item -gdescribe-dies): Add.
10758
10759 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10760
10761 * tree-vrp.c (vrp_shift_undefined_p): Remove.
10762 (extract_range_from_binary_expr_1: Call
10763 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
10764 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
10765 depend on sign.
10766
10767 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10768
10769 * gimple-ssa-warn-alloca.c
10770 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
10771 field for ALLOCA_BOUND_*_LARGE.
10772
10773 2018-09-11 Nathan Sidwell <nathan@acm.org>
10774
10775 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
10776
10777 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10778
10779 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
10780 for clobbers. Remove obsolete comment.
10781
10782 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10783
10784 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
10785 mpxchk, mpxld and mpxst types.
10786 (define_attr length_immediate): Remove all processing of mpx types.
10787 (define_attr prefix_0f): Ditto.
10788 (define_attr memory): Ditto.
10789
10790 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10791
10792 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
10793 (log<mode>2): Change operand 1 predicate to general_operand.
10794 Extend operand 1 to XFmode and generate logxf3 insn.
10795 (log10<mode>2): Change operand 1 predicate to general_operand.
10796 Extend operand 1 to XFmode and generate log10xf3 insn.
10797 (log2<mode>2): Change operand 1 predicate to general_operand.
10798 Extend operand 1 to XFmode and generate log2xf3 insn.
10799 (fyl2xp1_extend<mode>xf3_i387): Remove.
10800 (log1p<mode>2): Change operand 1 predicate to general_operand.
10801 Extend operand 1 to XFmode and generate log1pxf3 insn.
10802 (fxtract_extend<mode>xf3_i387): Remove.
10803 (logb<mode>2): Change operand 1 predicate to general_operand.
10804 Extend operand 1 to XFmode and generate logbxf3 insn.
10805 (ilogb<mode>2): Change operand 1 predicate to general_operand.
10806 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
10807 (significand<mode>2): Change operand 1 predicate to general_operand.
10808 Extend operand 1 to XFmode and generate significandxf3 insn.
10809
10810 2018-09-11 Nathan Sidwell <nathan@acm.org>
10811
10812 * gcc.c (perror_with_name, pfatal_with_name): Delete.
10813 (load_specs): Use fatal_error.
10814 (DELETE_IF_ORDINARY, process_command): Use error.
10815 (execute, run_attempt): Use fatal_error.
10816
10817 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
10818
10819 * diagnostic-core.h (sorry_at): New prototype.
10820 * diagnostic.c (sorry_at): New function.
10821
10822 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
10823
10824 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
10825 by zero as VR_UNDEFINED.
10826
10827 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
10828
10829 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
10830 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
10831 (<sincos>mode2): New expander.
10832 (sincos_extend<mode>xf3_i387): Remove insn pattern.
10833 (sincos -> sin, cos splitters): Remove splitter patterns.
10834 (sincos<mode>3): Change operand 2 predicate to general_operand.
10835 Extend operand 2 to XFmode and generate sincosxf3 insn.
10836 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
10837 Change operand 3 predicate to const1_operand.
10838 (fptan_extend<mode>xf4_i387): Remove insn pattern.
10839 (tanxf2): Update operands in the call to fptanxf4_i387.
10840 (tan<mode>2): Change operand 1 predicate to general_operand.
10841 Extend operand 1 to XFmode and generate tanxf3 insn.
10842 (atan2xf3): Rename from *fpatanxf3_i387.
10843 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
10844 (atan2xf3): Remove expander.
10845 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
10846 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
10847 (atan<mode>2): Change operand 1 predicate to general_operand.
10848 Extend operand 1 to XFmode and generate atanxf3 insn.
10849
10850 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
10851
10852 * config/i386/i386.md (x87/SSE constant load splitter): Use
10853 memory_operand instead of nonimmediate_operand for input operand
10854 predicate.
10855
10856 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
10857
10858 * config/i386/i386.md (float partial SSE register stall splitter): Move
10859 splitter near its instruction pattern.
10860 (float_extend partial SSE register stall splitter): Ditto.
10861 (float_truncate partial SSE register stall splitter): Ditto.
10862
10863 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
10864
10865 PR target/86794
10866 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10867 to speculation_safe_value_not_needed.
10868
10869 PR target/85666
10870 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
10871 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
10872 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
10873 leaf_function_p, instead use has_hard_reg_initial_val.
10874
10875 2018-09-09 Nathan Sidwell <nathan@acm.org>
10876
10877 * gcc.h (pfatal_with_name): Don't declare here.
10878 * gcc.c (pfatal_with_name): Make static.
10879
10880 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
10881
10882 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
10883 earlyclobber.
10884
10885 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
10886
10887 PR rtl-optimization/85458
10888 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
10889 priority hook to reduce the priority of EXPR.
10890
10891 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
10892
10893 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
10894 DImode for x87 on 32bit targets. Conditionally disable x87 modes
10895 with X87_ENABLE_FLOAT. Remove preparation code.
10896 (*float<SWI48:mode><MODEF:mode>2): Rename from
10897 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
10898 math using "enabled" attribute.
10899 (*floatdi<MODEF:mode>2_i387): Rename from
10900 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
10901 enable for 32bit targets only.
10902 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
10903 splitter.
10904 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
10905 as operand 1 predicate. Rewrite as define_insn_and_split.
10906 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
10907
10908 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
10909
10910 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
10911 to fallthru to FLOAT case.
10912
10913 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
10914
10915 PR target/86731
10916 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
10917 around folding of vec_sl to handle out of range shift values.
10918
10919 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
10920
10921 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
10922 Update callers to gen_fix_trunc<mode>_i387_fisttp
10923 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
10924 nonimmediate_operand.
10925 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
10926 and corresponding splitters.
10927 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
10928 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
10929 (fix_truncdi_i387_with_temp): Remove insn pattern
10930 and corresponding splitters.
10931 (fix_trunc<mode>_i387): Change operand 0 predicate to
10932 nonimmediate_operand.
10933 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
10934 and corresponding splitters.
10935 (*fistdi2_1): Remove.
10936 (fistdi2): Ditto.
10937 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
10938 (lrintxfdi2): Remove expander. Reimplement as define_insn.
10939 (*fist<mode>2_1): Remove.
10940 (fist<mode>2): Ditto.
10941 (fist<mode>2_with_temp): Remove insn pattern and corresponding
10942 splitters.
10943 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
10944 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
10945 (fistdi2_<rounding>): Change operand 0 predicate to
10946 nonimmediate_operand.
10947 (fistdi2_<rounding>_with_temp): Remove insn pattern
10948 and corresponding splitters.
10949 (fist<mode>2_<rounding>): Change operand 0 predicate to
10950 nonimmediate_operand.
10951 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
10952 and corresponding splitters.
10953
10954 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
10955
10956 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
10957
10958 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
10959 the init value.
10960
10961 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
10962
10963 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
10964 early gimple folding of vec_splat().
10965 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
10966 * gimple-fold.h: Add an extern define for tree_vec_extract().
10967
10968 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
10969
10970 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
10971 wrappers around TREE_TYPE comparisons.
10972
10973 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
10974
10975 PR target/80080
10976 * config/s390/predicates.md: Add nonsym_memory_operand.
10977 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
10978 contains a SYMBOL_REF, load it into an intermediate pseudo.
10979 (s390_emit_compare_and_swap): Legitimize operand.
10980 * config/s390/s390.md: Use the new nonsym_memory_operand
10981 with UNSPECV_CAS patterns.
10982
10983 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
10984
10985 PR target/80080
10986 * config/s390/s390-passes.def: New file.
10987 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
10988 declaration.
10989 (make_pass_s390_early_mach): Add declaration.
10990 * config/s390/s390.c (make_pass_s390_early_mach):
10991 (s390_option_override): Remove dynamic registration.
10992 * config/s390/t-s390: Add s390-passes.def.
10993
10994 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
10995
10996 * config/s390/s390.c (s390_decompose_constant_pool_ref):
10997 Remove UNSPEC_LTREL_BASE check.
10998 (annotate_constant_pool_refs): Likewise.
10999 (find_constant_pool_ref): Likewise.
11000 (find_ltrel_base): Removed.
11001 (replace_ltrel_base): Removed.
11002 (s390_mainpool_finish): Remove replace_ltrel_base call.
11003 (s390_chunkify_start): Remove pending LTREL_BASE logic.
11004 (s390_chunkify_finish): Remove replace_ltrel_base call.
11005 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
11006
11007 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
11008
11009 PR target/86779
11010 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11011 to speculation_safe_value_not_needed.
11012
11013 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
11014 Bernd Schmidt <bernds_cb1@t-online.de>
11015
11016 * config/nvptx/nvptx-opts.h: New file.
11017 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
11018 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
11019 (ASM_SPEC): Define.
11020 (TARGET_SM35): New macro.
11021 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
11022 correct predicate.
11023 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
11024 values.
11025 (misa=): New option.
11026 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
11027
11028 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
11029
11030 * config/i386/i386.md (truncdfsf2): Remove expander.
11031 (truncdfsf2_with_temp): Ditto.
11032 (truncxf<mode>2): Ditto.
11033 (*truncdfsf_fast_mixed): Remove insn pattern.
11034 (*truncdfsf_fast_i387): Ditto.
11035 (*truncdfsf_mixed): Ditto.
11036 (*truncdfsf_i387): Ditto.
11037 (*truncdfsf2_i387_1): Ditto.
11038 (*truncxfsf2_mixed): Ditto.
11039 (*truncxfdf2_mixed): Ditto.
11040 (*truncxf<mode>2_i387_noop): Ditto. Update callers
11041 to call gen_truncxf<mode>2 instead.
11042 (*truncxf<mode>2_i387): Remove.
11043 (reg->reg splitters): Remove splitter pattern.
11044 (reg->mem splitters): Ditto.
11045
11046 (truncdfsf2): New insn pattern.
11047 (truncxf<mode>2): Ditto.
11048
11049 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11050
11051 * tree-ssa-math-opts.c (is_mult_by): New function.
11052 (is_square_of): Use the above.
11053 (optimize_recip_sqrt): New function.
11054 (pass_cse_reciprocals::execute): Use the above.
11055
11056 2018-09-05 Richard Biener <rguenther@suse.de>
11057
11058 PR bootstrap/87134
11059 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
11060 to zero-init the emplaced vec.
11061
11062 2018-09-05 Martin Liska <mliska@suse.cz>
11063
11064 PR tree-optimization/87205
11065 * tree-switch-conversion.c (pass_lower_switch::execute):
11066 Group cases for switch statements.
11067
11068 2018-09-05 Richard Biener <rguenther@suse.de>
11069
11070 PR tree-optimization/87217
11071 * tree-ssa-sccvn.c (vuse_valueize): New.
11072 (vn_reference_lookup_pieces): Use it.
11073 (vn_reference_lookup): Likewise.
11074
11075 2018-09-05 Nathan Sidwell <nathan@acm.org>
11076
11077 PR c++/87137
11078 * stor-layout.c (place_field): Scan forwards to check last
11079 bitfield when ms_bitfield_placement is in effect.
11080
11081 2018-09-05 Richard Biener <rguenther@suse.de>
11082
11083 PR bootstrap/87225
11084 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
11085 return.
11086
11087 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
11088 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11089
11090 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
11091 * config.gcc (extra_objs): Build it.
11092 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
11093 Likewise.
11094 * config/aarch64/aarch64-passes.def
11095 (pass_tag_collision_avoidance): New pass.
11096 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
11097 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
11098 (aarch64_classify_address): Remove static qualifier.
11099 (aarch64_address_info, aarch64_address_type): Move to...
11100 * config/aarch64/aarch64-protos.h: ... here.
11101 (make_pass_tag_collision_avoidance): New function.
11102 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
11103 New tuning flag.
11104
11105 2018-09-05 Martin Liska <mliska@suse.cz>
11106
11107 * doc/gcov.texi: Update documentation of humar
11108 readable mode.
11109 * gcov.c (format_count): Print one decimal place, it provides
11110 more fine number of situations like '1G' vs. '1.4G'.
11111
11112 2018-09-05 Martin Liska <mliska@suse.cz>
11113
11114 PR target/87164
11115 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
11116 * optc-gen.awk: Allow 'Var' for Deprecated options in order
11117 to generate a MASK value.
11118
11119 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
11120
11121 PR debug/86593
11122 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
11123 if frame pointer isn't used.
11124 (compute_frame_pointer_to_fb_displacement): Likewise.
11125
11126 2018-09-04 Jakub Jelinek <jakub@redhat.com>
11127
11128 PR target/87198
11129 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
11130 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
11131 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
11132 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
11133 and OPTION_MASK_ISA_XSAVEC_UNSET.
11134
11135 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
11136
11137 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
11138 XOR operations in NAND case.
11139
11140 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11141
11142 * wide-int-range.cc (wide_int_range_convert): New.
11143 * wide-int-range.h (wide_int_range_convert): New.
11144 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
11145 code into wide_int_range_convert.
11146 (extract_range_into_wide_ints): Do not munge anti range constants
11147 into the entire domain. Just return the range back.
11148
11149 2018-09-04 Martin Liska <mliska@suse.cz>
11150
11151 * genmatch.c (output_line_directive): Add new argument
11152 fnargs.
11153 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
11154
11155 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11156
11157 * doc/invoke.texi (Option Summary): Add whitespace.
11158
11159 * doc/invoke.texi (Option Summary): Add -Waligned-new.
11160
11161 2018-09-04 Richard Biener <rguenther@suse.de>
11162
11163 PR tree-optimization/87211
11164 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
11165 backedge value we're supposed to treat as VARYING also number
11166 the PHI to VARYING in case it got a different value-number already.
11167
11168 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11169
11170 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
11171 (extract_range_from_binary_expr_1): Do not call
11172 vrp_can_optimize_bit_op.
11173 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
11174 static.
11175 (wide_int_range_get_mask_and_bounds): New.
11176 (wide_int_range_optimize_bit_op): New.
11177 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
11178 (wide_int_range_bit_and): Same.
11179 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
11180 (wide_int_range_optimize_bit_op): New.
11181 (wide_int_range_get_mask_and_bounds): New.
11182
11183 2018-09-04 Richard Biener <rguenther@suse.de>
11184
11185 PR tree-optimization/87176
11186 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
11187 variable. When value-numbering a virtual PHI node make sure
11188 to not value-number to the backedge value.
11189
11190 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11191
11192 * doc/extend.texi (Long Long, Hex Floats): Document support for
11193 long long and hex floats in more recent versions of ISO C++.
11194
11195 2018-09-03 Richard Biener <rguenther@suse.de>
11196
11197 PR tree-optimization/87177
11198 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
11199 cleanup.
11200
11201 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11202
11203 * bb-reorder.c (edge_order): Convert to C-qsort-style
11204 tri-state comparator.
11205 (reorder_basic_blocks_simple): Change std::stable_sort to
11206 gcc_stablesort.
11207
11208 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11209
11210 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
11211 tri-state comparator.
11212 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
11213
11214 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11215
11216 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
11217 (mergesort): ... here as maximum count for using netsort.
11218 (gcc_qsort): Set nlim to 3 if stable sort is requested.
11219 (gcc_stablesort): New.
11220 * system.h (gcc_stablesort): Declare.
11221
11222 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11223
11224 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
11225 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
11226 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
11227
11228 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
11229
11230 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
11231 lxsdx and stxsdx alternatives.
11232 (*mov<mode>_hardfloat64): Ditto.
11233 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
11234
11235 2018-09-03 Richard Biener <rguenther@suse.de>
11236
11237 PR tree-optimization/87200
11238 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
11239 simplify result.
11240
11241 2018-09-03 Martin Liska <mliska@suse.cz>
11242
11243 PR tree-optimization/87201
11244 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11245 Fix parenthesis in an expression.
11246
11247 2018-09-03 Richard Biener <rguenther@suse.de>
11248
11249 PR tree-optimization/87197
11250 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
11251 visited. CSE the VN_INFO hashtable lookup.
11252
11253 PR tree-optimization/87169
11254 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
11255 iterating make sure there's no extra backedges from irreducible
11256 regions feeding the header. Mark the destination block
11257 executable.
11258
11259 2018-09-03 Martin Liska <mliska@suse.cz>
11260
11261 PR driver/83193
11262 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
11263 * common/common-targhooks.c (default_get_valid_option_values):
11264 New function.
11265 * common/common-targhooks.h (default_get_valid_option_values):
11266 Likewise.
11267 * common/config/i386/i386-common.c: Move processor_target_table
11268 from i386.c.
11269 (ix86_get_valid_option_values): New function.
11270 (TARGET_GET_VALID_OPTION_VALUES): New macro.
11271 * config/i386/i386.c (struct ptt): Move to i386-common.c.
11272 (PTA_*): Move all defined masks into i386-common.c.
11273 (ix86_function_specific_restore): Use new processor_cost_table.
11274 * config/i386/i386.h (struct ptt): Moved from i386.c.
11275 (struct pta): Likewise.
11276 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
11277 * doc/tm.texi.in: Likewise.
11278 * opt-suggestions.c (option_proposer::suggest_option):
11279 Pass prefix to build_option_suggestions.
11280 (option_proposer::get_completions): Likewise.
11281 (option_proposer::build_option_suggestions): Use the new target
11282 hook.
11283 * opts.c (struct option_help_tuple): New struct.
11284 (print_filtered_help): Use the new target hook.
11285
11286 2018-09-03 Martin Liska <mliska@suse.cz>
11287
11288 PR middle-end/59521
11289 * predict.c (set_even_probabilities): Add likely_edges
11290 argument and handle cases where we have precisely one
11291 likely edge.
11292 (combine_predictions_for_bb): Catch also likely_edges.
11293 (tree_predict_by_opcode): Handle gswitch statements.
11294 * tree-cfg.h (find_case_label_for_value): New declaration.
11295 (find_taken_edge_switch_expr): Likewise.
11296 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11297 Find pivot in decision tree based on probabily, not by number of
11298 nodes.
11299
11300 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
11301
11302 * doc/standards.texi (Standards): Update Objective-C reference.
11303
11304 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11305
11306 * doc/install.texi (Prerequisites): Update link for MPC.
11307
11308 2018-09-01 Michael Matz <matz@suse.de>
11309
11310 PR tree-optimization/87074
11311 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
11312 PHIs for outer-loop uses.
11313
11314 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11315
11316 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
11317 * doc/invoke.texi (C Dialect Options): Ditto.
11318
11319 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11320
11321 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
11322
11323 2018-08-31 Richard Biener <rguenther@suse.de>
11324
11325 PR tree-optimization/87168
11326 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
11327 (rpo_elim::eliminate_avail): When OP was not visited it must
11328 be available.
11329
11330 2018-08-31 David Malcolm <dmalcolm@redhat.com>
11331
11332 * tree-vrp.c (copy_value_range): Convert param "from" from
11333 "value_range *" to "const value_range *".
11334 (range_is_null): Likewise for param "vr".
11335 (range_int_cst_p): Likewise.
11336 (range_int_cst_singleton_p): Likewise.
11337 (symbolic_range_p): Likewise.
11338 (value_ranges_intersect_p): Likewise for both params.
11339 (value_range_nonnegative_p): Likewise for param "vr".
11340 (value_range_constant_singleton): Likewise.
11341 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
11342 (extract_range_into_wide_ints): Likewise for param "vr".
11343 (extract_range_from_multiplicative_op): Likewise for params "vr0"
11344 and "vr1".
11345 (vrp_can_optimize_bit_op): Likewise.
11346 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
11347 "vr1_".
11348 (extract_range_from_unary_expr): Likewise.
11349 (debug_value_range): Likewise for param "vr".
11350 (value_range::dump): Add "const" qualifier.
11351 (vrp_prop::check_array_ref): Convert local "vr" from
11352 "value_range *" to "const value_range *".
11353 (vrp_prop::check_mem_ref): Likewise.
11354 (vrp_prop::visit_stmt): Likewise for local "old_vr".
11355 (vrp_intersect_ranges_1): Likewise for param "vr_1".
11356 (vrp_intersect_ranges): Likewise.
11357 (simplify_stmt_for_jump_threading): Likewise for local "vr".
11358 (vrp_prop::vrp_finalize): Likewise.
11359 * tree-vrp.h (value_range::dump): Add "const" qualifier.
11360 (vrp_intersect_ranges): Add "const" qualifier to params as above.
11361 (extract_range_from_unary_expr): Likewise.
11362 (value_range_constant_singleton): Likewise.
11363 (symbolic_range_p): Likewise.
11364 (copy_value_range): Likewise.
11365 (extract_range_from_binary_expr_1): Likewise.
11366 (range_int_cst_p): Likewise.
11367 (vrp_set_zero_nonzero_bits): Likewise.
11368 (range_int_cst_singleton_p): Likewise.
11369
11370 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
11371
11372 * config/aarch64/arm_neon.h (vabsd_s64): New.
11373 (vnegd_s64): Likewise.
11374
11375 2018-08-31 Martin Jambor <mjambor@suse.cz>
11376
11377 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
11378
11379 2018-08-31 Martin Liska <mliska@suse.cz>
11380
11381 * ipa-icf.c (sem_item::add_type): Use
11382 sem_item::m_type_hash_cache.
11383 * ipa-icf.h: Move the cache from sem_item_optimizer
11384 to sem_item.
11385
11386 2018-08-31 Nathan Sidwell <nathan@acm.org>
11387
11388 * doc/extend.texi (Backwards Compatibility): Remove implicit
11389 extern C leeway of () being (...).
11390
11391 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11392
11393 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
11394
11395 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
11396
11397 PR target/86684
11398 PR target/87149
11399 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
11400
11401 2018-08-31 Jakub Jelinek <jakub@redhat.com>
11402
11403 PR middle-end/87138
11404 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
11405 gen_int_mode. Formatting fixes.
11406
11407 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
11408
11409 * target.def (custom_function_descriptors): Improve documentation.
11410 * doc/tm.texi.in (Trampolines): Expand discussion of function
11411 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
11412 beginning of the section.
11413 * doc/tm.texi: Regenerated.
11414
11415 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
11416
11417 * cfg.h (class auto_edge_flag): Spell out the template-id of the
11418 base class in the initializer list. This is a workaround for
11419 building with older GCC.
11420 (class auto_bb_flag): Likewise.
11421
11422 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
11423
11424 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
11425 (altivec_vcmpequ<VI_char>_p): Remove star.
11426 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
11427 vector load modes.
11428 (expand_strncmp_vec_sequence): New function.
11429 (emit_final_str_compare_vec): New function.
11430 (expand_strn_compare): Add support for vector strncmp.
11431 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
11432 length specification to bytes.
11433 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
11434 (vcmpnezb_p): New pattern.
11435 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
11436 for option -mstring-compare-inline-limit.
11437
11438 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
11439
11440 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
11441 (PTA_SKYLAKE): Add PTA_AES.
11442 (PTA_GOLDMONT): Likewise.
11443
11444 2018-08-29 Jan Hubicka <jh@suse.cz>
11445
11446 PR lto/86517
11447 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
11448 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
11449
11450 2018-08-29 Jan Hubicka <jh@suse.cz>
11451
11452 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
11453 TYPE_STUB_DECL.
11454 (hash_tree): Do not visit TYPE_STUB_DECL.
11455 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
11456 stream TYPE_STUB_DECL.
11457 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
11458 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
11459 after free_lang_data.
11460 (type_in_anonymous_namespace_p): Likewise.
11461
11462 2018-08-29 Jan Hubicka <jh@suse.cz>
11463
11464 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11465 comment that it has to be even number.
11466 (class sreal): Change m_sig type to int32_t.
11467 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11468 int64_t for temporary calculations.
11469 (sreal_verify_basics): Drop one bit from minimum and maximum.
11470
11471 2018-08-30 Richard Biener <rguenther@suse.de>
11472
11473 PR tree-optimization/87147
11474 * tree-ssa-sccvn.c (SSA_VISITED): New function.
11475 (visit_phi): When the degenerate result is from the backedge and
11476 we didn't visit its definition yet drop to VARYING.
11477 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
11478
11479 2018-08-29 Jan Hubicka <jh@suse.cz>
11480
11481 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
11482 DECL_VINDEX.
11483 (hash_tree): Likewise.
11484
11485 2018-08-29 Jan Hubicka <jh@suse.cz>
11486
11487 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
11488 and TYPE_NEXT_REF_TO.
11489
11490 2018-08-29 Jan Hubicka <jh@suse.cz>
11491
11492 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11493 comment that it has to be even number.
11494 (class sreal): Change m_sig type to int32_t.
11495 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11496 int64_t for temporary calculations.
11497 (sreal_verify_basics): Drop one bit from minimum and maximum.
11498
11499 2018-08-30 Tamar Christina <tamar.christina@arm.com>
11500
11501 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
11502
11503 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
11504
11505 PR middle-end/86995
11506 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
11507 if to_add is negative.
11508
11509 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
11510
11511 PR middle-end/87053
11512 * builtins.c (c_strlen): Improve range checks.
11513
11514 2018-08-29 Martin Sebor <msebor@redhat.com>
11515 Jeff Law <law@redhat.com>
11516
11517 PR tree-optimization/86714
11518 PR tree-optimization/86711
11519 * builtins.c (c_strlen): Add arguments to call to string_constant.
11520 * expr.c (string_constant): Add argument. Detect missing nul
11521 terminator and outermost declaration it's missing in.
11522 * expr.h (string_constant): Add argument.
11523 * fold-const.c (read_from_constant_string): Add arguments to call to
11524 string_constant.
11525 (c_getstr): Likewise.
11526 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
11527 to string_constant.
11528 * tree-ssa-strlen.c (get_stridx): Likewise.
11529
11530 2018-08-29 Jan Hubicka <jh@suse.cz>
11531
11532 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
11533 Do not stream DECL_VINDEX.
11534 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
11535 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
11536 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
11537
11538 2018-08-29 Richard Biener <rguenther@suse.de>
11539
11540 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
11541 virtual operands that are not default defs to honor region
11542 boundaries.
11543 (rpo_vn_valueize): Remove ineffective code here.
11544
11545 2018-08-29 Richard Biener <rguenther@suse.de>
11546
11547 PR tree-optimization/87132
11548 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
11549 when skipping defs reachable over backedges.
11550
11551 2018-08-29 Richard Biener <rguenther@suse.de>
11552
11553 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
11554 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
11555 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
11556 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
11557 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
11558 (vn_reference_lookup_3): Remove use of const_parms.
11559 (free_rpo_vn): Do not free const_parms.
11560 (do_rpo_vn): Do not call init_const_parms.
11561 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
11562 SSA_NAME_POINTS_TO_READONLY_MEMORY.
11563 (call_may_clobber_ref_p_1): Likewise.
11564
11565 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
11566
11567 PR other/86726
11568 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
11569 (-O): Ditto.
11570 (-ftree-scev-cprop): Document.
11571
11572 2018-08-29 Jan Hubicka <jh@suse.cz>
11573
11574 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
11575 parameters.
11576 (sreal constructor): Update.
11577 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
11578 sreal:operator/): Update.
11579
11580 2018-08-29 Martin Liska <mliska@suse.cz>
11581
11582 * tree-switch-conversion.c (switch_conversion::expand):
11583 Strenghten assumption about gswitch statements.
11584
11585 2018-08-29 Richard Biener <rguenther@suse.de>
11586
11587 PR tree-optimization/87117
11588 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
11589 re-value-number released SSA VDEFs.
11590
11591 2018-08-29 Richard Biener <rguenther@suse.de>
11592
11593 PR tree-optimization/87126
11594 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
11595
11596 2018-08-28 Jim Wilson <jimw@sifive.com>
11597
11598 * config/riscv/pic.md: Rewrite.
11599 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
11600 invalid address.
11601 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
11602 (SOFTF, default_load, softload, softstore): New.
11603
11604 2018-08-28 Jeff Law <law@redhat.com>
11605
11606 * fold-const.c (fold_binary_loc): Remove recently added assert.
11607
11608 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
11609
11610 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
11611 to OP parmeter of generated function.
11612
11613 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
11614
11615 PR tree-optimization/87009
11616 * match.pd: Add boolean optimizations.
11617
11618 2018-08-28 Martin Sebor <msebor@redhat.com>
11619
11620 PR middle-end/86631
11621 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
11622 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
11623 (pass_walloca::gate): Use it.
11624 (alloca_call_type): Same.
11625 (pass_walloca::execute): Same.
11626 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
11627
11628 2018-08-28 David Malcolm <dmalcolm@redhat.com>
11629
11630 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
11631 GCC_VERSION for usage of "__gcc_dump_printf__" format from
11632 >= 3005 to >= 9000.
11633
11634 2018-08-28 Richard Biener <rguenther@suse.de>
11635
11636 PR tree-optimization/87124
11637 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
11638 constants before looking up avail.
11639
11640 2018-08-28 Jakub Jelinek <jakub@redhat.com>
11641
11642 PR middle-end/87099
11643 * calls.c (maybe_warn_nonstring_arg): Punt early if
11644 warn_stringop_overflow is zero. Don't call get_range_strlen
11645 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
11646 Swap comparison operands to have constants on rhs. Only use
11647 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
11648 increment lenrng[0].
11649
11650 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
11651
11652 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
11653 use of tree_to_shwi. Remove duplicated test for the size being
11654 a whole number of bytes.
11655
11656 2018-08-28 Richard Biener <rguenther@suse.de>
11657
11658 PR tree-optimization/87117
11659 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
11660 Handle removed stmt without LHS (GIMPLE_NOP).
11661
11662 2018-08-28 Richard Biener <rguenther@suse.de>
11663
11664 PR tree-optimization/87117
11665 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
11666 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
11667
11668 2018-08-28 Richard Biener <rguenther@suse.de>
11669
11670 PR tree-optimization/87117
11671 * tree-ssa-pre.c (compute_avail): Do not make expressions
11672 with predicated values available.
11673 (get_expr_value_id): Assert we do not run into predicated value
11674 expressions.
11675
11676 2018-08-28 Richard Biener <rguenther@suse.de>
11677
11678 PR tree-optimization/87117
11679 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
11680 get virtual operands.
11681 (get_expr_operands): Handle STRING_CST like other decls.
11682
11683 2018-08-28 Martin Liska <mliska@suse.cz>
11684
11685 * tree.h: Update documentation of fndecl_built_in_p
11686 functions.
11687
11688
11689 2018-08-27 Jeff Law <law@redhat.com>
11690 PR tree-optimization/87110
11691 * tree-ssa-dse.c (compute_trims): Handle non-constant
11692 TYPE_SIZE_UNIT.
11693
11694 2018-08-27 Martin Sebor <msebor@redhat.com>
11695
11696 PR tree-optimization/86914
11697 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
11698
11699 2018-08-27 Martin Sebor <msebor@redhat.com>
11700
11701 PR tree-optimization/87112
11702 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
11703 the type of the bound argument.
11704
11705 2018-08-27 Jeff Law <law@redhat.com>
11706
11707 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
11708 type does not have a TYPE_SIZE_UNIT.
11709
11710 2018-08-27 Steve Ellcey <sellcey@cavium.com>
11711
11712 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
11713 with include of backend.h.
11714
11715 2018-08-27 Richard Biener <rguenther@suse.de>
11716
11717 PR tree-optimization/86927
11718 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
11719 use const cond reduction code.
11720
11721 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
11722
11723 PR tree-optimization/85758
11724 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
11725
11726 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11727
11728 PR c++/87091
11729 * diagnostic-show-locus.c (class layout_range): Update for
11730 conversion of show_caret_p to a tri-state.
11731 (layout_range::layout_range): Likewise.
11732 (make_range): Likewise.
11733 (layout::maybe_add_location_range): Likewise.
11734 (layout::should_print_annotation_line_p): Don't show annotation
11735 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
11736 (layout::get_state_at_point): Update for conversion of
11737 show_caret_p to a tri-state. Bail out early for
11738 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
11739 underlining or source colorization.
11740 (gcc_rich_location::add_location_if_nearby): Update for conversion
11741 of show_caret_p to a tri-state.
11742 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
11743 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
11744 Likewise.
11745 (selftest::test_one_liner_labels): Likewise.
11746 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
11747 conversion of show_caret_p to a tri-state.
11748 * pretty-print.c (text_info::set_location): Likewise.
11749 * pretty-print.h (text_info::set_location): Likewise.
11750 * substring-locations.c (format_warning_n_va): Likewise.
11751 * tree-diagnostic.c (default_tree_printer): Likewise.
11752 * tree-pretty-print.c (newline_and_indent): Likewise.
11753
11754 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11755
11756 PR c++/87091
11757 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
11758 line above for line-insertion fix-it hints.
11759 (selftest::test_fixit_insert_containing_newline): Update the
11760 expected results, and add a test with line-numbering enabled.
11761
11762 2018-08-27 Martin Liska <mliska@suse.cz>
11763
11764 PR sanitizer/86962
11765 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
11766 params with DECL_HAS_VALUE_EXPR_P.
11767
11768 2018-08-27 Martin Liska <mliska@suse.cz>
11769
11770 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
11771 selected expansion strategy.
11772
11773 2018-08-27 Martin Liska <mliska@suse.cz>
11774
11775 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
11776 * builtins.c (is_builtin_fn): Likewise.
11777 * attribs.c (diag_attr_exclusions): Use new function
11778 fndecl_built_in_p and remove check for FUNCTION_DECL if
11779 possible.
11780 (builtin_mathfn_code): Likewise.
11781 (fold_builtin_expect): Likewise.
11782 (fold_call_expr): Likewise.
11783 (fold_builtin_call_array): Likewise.
11784 (fold_call_stmt): Likewise.
11785 (set_builtin_user_assembler_name): Likewise.
11786 (is_simple_builtin): Likewise.
11787 * calls.c (gimple_alloca_call_p): Likewise.
11788 (maybe_warn_nonstring_arg): Likewise.
11789 * cfgexpand.c (expand_call_stmt): Likewise.
11790 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
11791 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
11792 (cgraph_node::verify_node): Likewise.
11793 * cgraphclones.c (build_function_decl_skip_args): Likewise.
11794 (cgraph_node::create_clone): Likewise.
11795 * config/arm/arm.c (arm_insert_attributes): Likewise.
11796 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
11797 * dse.c (scan_insn): Likewise.
11798 * expr.c (expand_expr_real_1): Likewise.
11799 * fold-const.c (operand_equal_p): Likewise.
11800 (fold_binary_loc): Likewise.
11801 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
11802 * gimple-low.c (lower_stmt): Likewise.
11803 * gimple-pretty-print.c (dump_gimple_call): Likewise.
11804 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
11805 Likewise.
11806 * gimple.c (gimple_build_call_from_tree): Likewise.
11807 (gimple_call_builtin_p): Likewise.
11808 (gimple_call_combined_fn): Likewise.
11809 * gimplify.c (gimplify_call_expr): Likewise.
11810 (gimple_boolify): Likewise.
11811 (gimplify_modify_expr): Likewise.
11812 (gimplify_addr_expr): Likewise.
11813 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
11814 * ipa-cp.c (determine_versionability): Likewise.
11815 * ipa-fnsummary.c (compute_fn_summary): Likewise.
11816 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
11817 * ipa-split.c (visit_bb): Likewise.
11818 (split_function): Likewise.
11819 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
11820 * lto-cgraph.c (input_node): Likewise.
11821 * lto-streamer-out.c (write_symbol): Likewise.
11822 * omp-low.c (setjmp_or_longjmp_p): Likewise.
11823 (lower_omp_1): Likewise.
11824 * predict.c (strip_predict_hints): Likewise.
11825 * print-tree.c (print_node): Likewise.
11826 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
11827 * trans-mem.c (is_tm_irrevocable): Likewise.
11828 (is_tm_load): Likewise.
11829 (is_tm_simple_load): Likewise.
11830 (is_tm_store): Likewise.
11831 (is_tm_simple_store): Likewise.
11832 (is_tm_abort): Likewise.
11833 (tm_region_init_1): Likewise.
11834 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
11835 * tree-cfg.c (verify_gimple_call): Likewise.
11836 (move_stmt_r): Likewise.
11837 (stmt_can_terminate_bb_p): Likewise.
11838 * tree-eh.c (lower_eh_constructs_2): Likewise.
11839 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
11840 * tree-inline.c (remap_gimple_stmt): Likewise.
11841 (copy_bb): Likewise.
11842 (estimate_num_insns): Likewise.
11843 (fold_marked_statements): Likewise.
11844 * tree-sra.c (scan_function): Likewise.
11845 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
11846 (optimize_stack_restore): Likewise.
11847 (pass_fold_builtins::execute): Likewise.
11848 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
11849 (mark_all_reaching_defs_necessary_1): Likewise.
11850 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
11851 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
11852 (pass_forwprop::execute): Likewise.
11853 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11854 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
11855 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
11856 * tree-ssa-strlen.c (get_string_length): Likewise.
11857 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
11858 (find_func_aliases_for_call): Likewise.
11859 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
11860 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
11861 * tree-tailcall.c (find_tail_calls): Likewise.
11862 * tree.c (need_assembler_name_p): Likewise.
11863 (free_lang_data_in_decl): Likewise.
11864 (get_call_combined_fn): Likewise.
11865 * ubsan.c (is_ubsan_builtin_p): Likewise.
11866 * varasm.c (incorporeal_function_p): Likewise.
11867 * tree.h (DECL_BUILT_IN): Remove and replace with
11868 fndecl_built_in_p.
11869 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
11870 (fndecl_built_in_p): New.
11871
11872 2018-08-27 Martin Liska <mliska@suse.cz>
11873
11874 PR tree-optimization/86847
11875 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
11876 Dump also subtree probability.
11877 (switch_decision_tree::do_jump_if_equal): New function.
11878 (switch_decision_tree::emit_case_nodes): Handle special
11879 situations in balanced tree that can be emitted much simpler.
11880 Fix calculation of probabilities that happen in tree expansion.
11881 * tree-switch-conversion.h (struct cluster): Add
11882 is_single_value_p.
11883 (struct simple_cluster): Likewise.
11884 (struct case_tree_node): Add new function has_child.
11885 (do_jump_if_equal): New.
11886
11887 2018-08-27 Martin Liska <mliska@suse.cz>
11888
11889 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
11890 Add new argument to bit_test_cluster constructor.
11891 (bit_test_cluster::emit): Set bits really number of values
11892 handlel by a test.
11893 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
11894 probability argument.
11895 * tree-switch-conversion.h (struct bit_test_cluster):
11896 Add m_handles_entire_switch.
11897
11898 2018-08-27 Martin Liska <mliska@suse.cz>
11899
11900 PR tree-optimization/86702
11901 * tree-switch-conversion.c (jump_table_cluster::emit):
11902 Make probabilities even for values in jump table
11903 according to number of cases handled.
11904 (switch_decision_tree::compute_cases_per_edge): Pass
11905 argument to reset_out_edges_aux function.
11906 (switch_decision_tree::analyze_switch_statement): Likewise.
11907 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
11908 Make it static.
11909
11910 2018-08-27 Martin Liska <mliska@suse.cz>
11911
11912 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
11913 cfun argument explicitly.
11914 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
11915 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
11916 function gimple_switch_default_bb.
11917 (convert_switch_statements):
11918 (expand_builtins):
11919 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
11920 * stmt.c (label_to_block_fn): Use label_to_block and pass
11921 cfun argument explicitly and use gimple_switch_label_bb.
11922 (expand_case): Likewise.
11923 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
11924 cfun argument explicitly. Likewise.
11925 (make_edges_bb): Likewise.
11926 (make_cond_expr_edges): Likewise.
11927 (get_cases_for_edge): Likewise.
11928 (make_gimple_switch_edges): Likewise.
11929 (label_to_block_fn): Likewise.
11930 (label_to_block): Likewise.
11931 (make_goto_expr_edges): Likewise.
11932 (make_gimple_asm_edges): Likewise.
11933 (main_block_label): Likewise.
11934 (group_case_labels_stmt): Likewise.
11935 (find_taken_edge_computed_goto): Likewise.
11936 (find_taken_edge_switch_expr): Likewise.
11937 (gimple_verify_flow_info): Likewise.
11938 (gimple_redirect_edge_and_branch): Likewise.
11939 (gimple_switch_label_bb): New function.
11940 (gimple_switch_default_bb): Likewise.
11941 (gimple_switch_edge): Likewise.
11942 (gimple_switch_default_edge): Likewise.
11943 * tree-cfg.h (label_to_block_fn): Remove and replace ...
11944 (label_to_block): ... with this.
11945 (gimple_switch_label_bb): New.
11946 (gimple_switch_default_bb): Likewise.
11947 (gimple_switch_edge): Likewise.
11948 (gimple_switch_default_edge): Likewise.
11949 * tree-cfgcleanup.c (convert_single_case_switch): Use
11950 new gimple functions and pass new argument to label_to_block.
11951 (cleanup_control_flow_bb):
11952 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
11953 cfun argument explicitly.
11954 (make_eh_edges): Likewise.
11955 (redirect_eh_dispatch_edge): Likewise.
11956 (lower_resx): Likewise.
11957 (lower_eh_dispatch): Likewise.
11958 (maybe_remove_unreachable_handlers): Likewise.
11959 (unsplit_eh): Likewise.
11960 (cleanup_empty_eh): Likewise.
11961 (verify_eh_edges): Likewise.
11962 (verify_eh_dispatch_edge): Likewise.
11963 * tree-ssa-dom.c (record_edge_info): Likewise.
11964 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
11965 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
11966 (thread_through_normal_block): Likewise.
11967 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
11968 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
11969 * tree-switch-conversion.c (switch_conversion::collect): Use new
11970 gimple functions.
11971 (switch_conversion::check_final_bb): Likewise.
11972 (switch_conversion::gather_default_values): Pass new argument
11973 to label_to_block.
11974 (switch_conversion::build_constructors): Likewise.
11975 (switch_decision_tree::compute_cases_per_edge): Use new
11976 gimple_switch_edge function.
11977 (switch_decision_tree::analyze_switch_statement): Pass new argument
11978 to label_to_block.
11979 (switch_decision_tree::try_switch_expansion): Use
11980 gimple_switch_default_edge.
11981 * tree-vrp.c (find_switch_asserts): Pass new argument
11982 to label_to_block.
11983 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
11984 (vr_values::simplify_switch_using_ranges): Likewise.
11985
11986 2018-08-27 Richard Biener <rguenther@suse.de>
11987
11988 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
11989 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
11990
11991 * tree-ssa-sccvn.h (struct vn_pval): New structure.
11992 (struct vn_nary_op_s): Add unwind_to member. Add
11993 predicated_values flag and put result into a union together
11994 with a linked list of vn_pval.
11995 (struct vn_ssa_aux): Add name member to make maintaining
11996 a map of SSA name to vn_ssa_aux possible. Remove no longer
11997 needed info, dfsnum, low, visited, on_sccstack, use_processed
11998 and range_info_anti_range_p members.
11999 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
12000 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
12001 New functions.
12002 (vn_valueize): New global.
12003 (vn_context_bb): Likewise.
12004 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
12005 VN_INFO_PTR_INFO): Remove.
12006 * tree-ssa-sccvn.c: ... (rewrite)
12007 (pass_fre::execute): For -O2+ initialize loops and run
12008 RPO VN in optimistic mode (iterating). For -O1 and -Og
12009 run RPO VN in non-optimistic mode.
12010 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
12011 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
12012 * doc/invoke.texi (sccvn-max-scc-size): Remove.
12013 (rpo-vn-max-loop-depth): Document.
12014 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
12015 when valuezing the VUSE signals we walked out of the region.
12016 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
12017 (phi_translate): Set VN context block to use for availability
12018 lookup.
12019 (compute_avail): Likewise.
12020 (pre_valueize): New function.
12021 (pass_pre::execute): Adjust to the RPO VN API.
12022
12023 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
12024 (propagate_constants_for_unrolling): Remove.
12025 (tree_unroll_loops_completely): Perform value-numbering
12026 on the unrolled bodies loop parent.
12027
12028 2018-08-27 Richard Biener <rguenther@suse.de>
12029
12030 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
12031 for partial antic compute.
12032
12033 2018-08-27 Jakub Jelinek <jakub@redhat.com>
12034
12035 PR rtl-optimization/87065
12036 * combine.c (simplify_if_then_else): Formatting fix.
12037 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
12038 check.
12039 (known_cond): Don't return const_true_rtx for vector modes. Use
12040 CONST0_RTX instead of const0_rtx. Formatting fixes.
12041
12042 2018-08-27 Martin Liska <mliska@suse.cz>
12043
12044 PR gcov-profile/87069
12045 * gcov.c (process_file): Record files already processed
12046 and warn about a file being processed multiple times.
12047
12048 2018-08-27 Martin Liska <mliska@suse.cz>
12049
12050 PR driver/83193
12051 * config/aarch64/aarch64.c (aarch64_override_options_internal):
12052 Set default values for x_aarch64_*_string strings.
12053 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
12054 prefix. For -mabi do not print '=ABI' in help and use
12055 <option_value> format for -msve-vector-bits and -moverride
12056 options.
12057
12058 2018-08-26 Jeff Law <law@redhat.com>
12059
12060 * config/mips/frame-header-opt.c: Include "backend.h" rather than
12061 "cfg.h"
12062
12063 2018-08-26 Marek Polacek <polacek@redhat.com>
12064
12065 PR c++/87029, Implement -Wredundant-move.
12066 * doc/invoke.texi: Document -Wredundant-move.
12067
12068 2018-08-25 Martin Sebor <msebor@redhat.com>
12069
12070 PR tree-optimization/87059
12071 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
12072 to the same type as the other.
12073 * fold-const.c (fold_binary_loc): Assert expectation.
12074
12075 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
12076
12077 * config/darwin.c (machopic_legitimize_pic_address): Clean up
12078 extraneous parentheses, dead code section and formatting.
12079
12080 2018-08-24 David Malcolm <dmalcolm@redhat.com>
12081
12082 PR c++/87091
12083 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
12084 wide enough for jumps in the line-numbering to be visible.
12085 (layout::print_gap_in_line_numbering): New member function.
12086 (layout::calculate_line_spans): When using line numbering, merge
12087 line spans that are only 1 line apart.
12088 (diagnostic_show_locus): When printing line numbers, show gaps in
12089 line numbering directly, rather than printing headers.
12090 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
12091 line-numbering with multiple line spans.
12092 (selftest::test_fixit_insert_containing_newline_2): Add test of
12093 line-numbering, in which the spans are close enough to be merged.
12094
12095 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12096
12097 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
12098 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
12099 * tree-vrp.c (range_is_nonnull): Remove.
12100 (range_includes_zero_p): Accept value_range instead of min/max.
12101 (extract_range_from_binary_expr_1): Do not early bail on
12102 POINTER_PLUS_EXPR.
12103 Use range_includes_zero_p instead of range_is_nonnull.
12104 (extract_range_from_unary_expr): Use range_includes_zero_p instead
12105 of range_is_nonnull.
12106 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
12107 special case VR_ANTI_RANGE.
12108 (vrp_finalize): Same.
12109 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
12110 instead of min/max.
12111 (range_is_nonnull): Remove.
12112 * vr-values.c (vrp_stmt_computes_nonzero): Use
12113 range_includes_zero_p instead of range_is_nonnull.
12114 (extract_range_basic): Pass value_range to range_includes_zero_p
12115 instead of range_is_nonnull.
12116
12117 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
12118
12119 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
12120 * emit-rtl.h (rtl_data): Remove return_bnd.
12121 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
12122 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
12123 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
12124 (POINTER_BOUNDS_MODE): Remove definition.
12125 (make_pointer_bounds_mode): Remove.
12126 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
12127 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
12128 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
12129 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
12130 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
12131 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
12132 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
12133
12134 * config/i386/i386-modes.def (BND32, BND64): Remove.
12135 * config/i386/i386.c (dbx_register_map): Remove bound registers.
12136 (dbx64_register_map): Ditto.
12137 (svr4_dbx_register_map): Ditto.
12138 (indirect_thunk_bnd_needed): Remove.
12139 (indirect_thunks_bnd_used): Ditto.
12140 (indirect_return_bnd_needed): Ditto.
12141 (indirect_return_via_cx_bnd): Ditto.
12142 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
12143 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
12144 (output_indirect_thunk): Ditto. Remove need_prefix argument.
12145 (output_indirect_thunk_function): Remove handling of
12146 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
12147 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
12148 (ix86_save_reg): Remove handling of crtl->return_bnd.
12149 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
12150 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
12151 and UNSPEC_BNDLX_ADDR.
12152 (ix86_output_indirect_branch_via_reg): Remove handling of
12153 indirect_thunk_prefix_bnd.
12154 (ix86_output_indirect_branch_via_push): Ditto.
12155 (ix86_output_function_return): Ditto.
12156 (ix86_output_indirect_function_return): Ditto.
12157 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
12158 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
12159 (CALL_USED_REGISTERS): Ditto.
12160 (REG_ALLOC_ORDER): Update for removal of bound registers.
12161 (HI_REGISTER_NAMES): Ditto.
12162 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
12163 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
12164 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
12165 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
12166 (FIRST_PSEUDO_REG): Update.
12167 (BND): Remove mode iterator.
12168 * config/i386/predicates.md (bnd_mem_operator): Remove.
12169
12170 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12171
12172 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
12173 vectors.
12174
12175 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12176
12177 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
12178 the case in which the permute needs only a single element and
12179 repeats for every vector of the result. Extend that case to
12180 handle variable-length vectors.
12181 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12182
12183 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
12184
12185 PR debug/79342
12186 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
12187 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
12188
12189 2018-08-24 Richard Biener <rguenther@suse.de>
12190
12191 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
12192 bb_flags_allocated members.
12193 (auto_flag): New RAII class for allocating flags.
12194 (auto_edge_flag): New RAII class for allocating edge flags.
12195 (auto_bb_flag): New RAII class for allocating bb flags.
12196 * cfgloop.c (verify_loop_structure): Allocate temporary edge
12197 flag dynamically.
12198 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
12199 in favor of temporarily allocated BB flag.
12200 * hsa-brig.c: Re-order includes.
12201 * hsa-dump.c: Likewise.
12202 * hsa-regalloc.c: Likewise.
12203 * print-rtl.c: Likewise.
12204 * profile-count.c: Likewise.
12205
12206 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
12207
12208 PR target/86989
12209 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
12210 the TOC register.
12211
12212 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12213
12214 PR 87073/bootstrap
12215 * wide-int-range.cc (wide_int_range_div): Do not ignore result
12216 from wide_int_range_multiplicative_op.
12217
12218 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12219
12220 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
12221 "permutaion".
12222
12223 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
12224
12225 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
12226 to 'expanded'.
12227
12228 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
12229
12230 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
12231 full GENERIC expression used for replacement.
12232
12233 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
12234
12235 * tree-vrp.c (abs_extent_range): Remove.
12236 (extract_range_into_wide_ints): Pass wide ints by reference.
12237 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
12238 Pass wide ints by reference in all calls to
12239 extract_range_into_wide_ints.
12240 * wide-int-range.cc (wide_int_range_div): New.
12241 * wide-int-range.h (wide_int_range_div): New.
12242 (wide_int_range_includes_zero_p): New.
12243 (wide_int_range_zero_p): New.
12244
12245 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
12246
12247 * config/aarch64/aarch64.md (arches): New enum.
12248 (arch): New enum attr.
12249 (arch_enabled): New attr.
12250 (enabled): Now uses arch_enabled only.
12251 (simd, sve, fp16): Removed attribute.
12252 (fp): Attr now defined in terms of 'arch'.
12253 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
12254 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
12255 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
12256 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
12257 attributes into 'arch'.
12258 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
12259 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
12260 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
12261 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
12262 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
12263 'simd' attribute into 'arch'.
12264 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
12265 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
12266 Convert use of 'fp' attribute to 'arch'.
12267 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
12268 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
12269 into 'arch'.
12270 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
12271 (different modes) Merge 'fp' and 'simd' into 'arch'.
12272 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
12273 'simd' into 'arch'.
12274
12275 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
12276
12277 PR rtl-optimization/87026
12278 * expmed.c (canonicalize_comparison): If we can no longer create
12279 pseudoregisters, don't.
12280
12281 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
12282
12283 PR target/86951
12284 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
12285 prototype.
12286 * config/arm/arm.c (speculation_barrier_libfunc): New static
12287 variable.
12288 (arm_init_libfuncs): Initialize it.
12289 (arm_emit_speculation_barrier): New function.
12290 * config/arm/arm.md (speculation_barrier): Call
12291 arm_emit_speculation_barrier for architectures that do not have
12292 DSB or ISB.
12293 (speculation_barrier_insn): Only match on Armv7 or later.
12294
12295 2018-08-23 Richard Biener <rguenther@suse.de>
12296
12297 PR middle-end/87024
12298 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
12299 calls.
12300
12301 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12302
12303 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
12304 of single-vector TBLs.
12305 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
12306 one input is given.
12307
12308 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12309
12310 PR target/85910
12311 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
12312 aarch64_evpc_tbl guard.
12313
12314 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
12315
12316 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
12317 behaviour.
12318
12319 2018-08-22 Martin Sebor <msebor@redhat.com>
12320
12321 PR middle-end/87052
12322 * tree-pretty-print.c (pretty_print_string): Add argument.
12323 (dump_generic_node): Call to pretty_print_string with string size.
12324
12325 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
12326
12327 PR rtl-optimization/86771
12328 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
12329 of two SETs into those two SETs, one to be placed at i2, if that SETs
12330 destination is modified between i2 and i3.
12331
12332 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12333
12334 PR tree-optimization/86725
12335 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
12336 function.
12337 (vect_analyze_scalar_cycles_1): Check it.
12338
12339 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12340
12341 PR tree-optimization/86725
12342 * tree-vect-loop.c (vect_is_simple_reduction): When treating
12343 an outer loop phi as a double reduction, make sure that the
12344 single user of the phi result is an inner loop phi.
12345
12346 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12347
12348 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
12349 grouped stores with gaps to a strided group.
12350
12351 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12352
12353 * tree-vect-stmts.c (get_group_load_store_type)
12354 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
12355 first statement in a group.
12356
12357 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12358
12359 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
12360 the sequence used in gcc/gcc.c.
12361
12362 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12363
12364 PR other/704
12365 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
12366 building it.
12367
12368 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12369
12370 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
12371 Darwin10-specific unwinder-shim.
12372 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
12373 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
12374 New to cater for Darwin10 Rosetta.
12375
12376 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12377
12378 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
12379 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
12380
12381 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12382
12383 PR bootstrap/81033
12384 PR target/81733
12385 PR target/52795
12386 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
12387 (dwarf2out_switch_text_section): Generate a local label for the
12388 second function sub-section and apply it as the second FDE start
12389 label.
12390 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
12391 second sub-section start.
12392
12393 2018-08-22 Richard Biener <rguenther@suse.de>
12394
12395 PR tree-optimization/86988
12396 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
12397
12398 2018-08-22 Richard Biener <rguenther@suse.de>
12399
12400 PR tree-optimization/86945
12401 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
12402
12403 2018-08-22 Alexandre Oliva <oliva@adacore.com>
12404
12405 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
12406 a comment about how uses of r2 for .sdata2 come about.
12407
12408 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
12409
12410 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
12411
12412 2018-08-21 Marek Polacek <polacek@redhat.com>
12413
12414 PR c++/86981, Implement -Wpessimizing-move.
12415 * doc/invoke.texi: Document -Wpessimizing-move.
12416
12417 2018-08-21 Jan Hubicka <jh@suse.cz>
12418
12419 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
12420 * tree.h (is_redundant_typedef): Remove.
12421 * dwarf2out.c (is_redundant_typedef): Turn into static function.
12422
12423 2018-08-21 Jan Hubicka <jh@suse.cz>
12424
12425 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
12426 when possible.
12427
12428 2018-08-21 Tamar Christina <tamar.christina@arm.com>
12429
12430 * expmed.c (extract_low_bits): Reject invalid subregs early.
12431
12432 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12433
12434 PR middle-end/86121
12435 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
12436 behaviour.
12437
12438 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12439
12440 * config/vxworks.h: Guard vxworks_asm_out_constructor and
12441 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
12442 * config/vxworks.c: Likewise.
12443
12444 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12445
12446 * config/vxworks.c: Set targetm.have_ctors_dtors
12447 if HAVE_INITFINI_ARRAY_SUPPORT.
12448 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
12449 if HAVE_INITFINI_ARRAY_SUPPORT.
12450
12451 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12452
12453 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
12454 default search path for VxWorks < 7.
12455
12456 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12457
12458 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
12459 (get_format_string): Refer to c_getstr.
12460
12461 2018-08-21 Tom de Vries <tdevries@suse.de>
12462
12463 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12464 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12465 (debuginfo_early_stop): Declare.
12466 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12467 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12468 (debuginfo_early_stop): New function.
12469 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
12470 and debuginfo_early_stop.
12471 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
12472 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
12473 (general_init): Call debuginfo_early_init.
12474 (finalize): Call debuginfo_fini.
12475 (do_compile): Call debuginfo_init.
12476 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
12477 -fdump-early-debug.
12478 (@item -fdump-debug, @item -fdump-earlydebug): Add.
12479
12480 2018-08-21 Tom de Vries <tdevries@suse.de>
12481
12482 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
12483 flag_dump_noaddr and flag_dump_unnumbered.
12484
12485 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
12486
12487 * wide-int-range.cc (wide_int_range_abs): New.
12488 (wide_int_range_order_set): Rename from wide_int_range_min_max.
12489 * wide-int-range.h (wide_int_range_abs): New.
12490 (wide_int_range_min_max): New.
12491 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
12492 case to call wide_int_range_abs.
12493 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
12494 (extract_range_from_abs_expr): Delete.
12495
12496 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
12497
12498 PR target/87033
12499 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
12500 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
12501 for indexed loads.
12502
12503 2018-08-20 Nathan Sidwell <nathan@acm.org>
12504 Jeff Law <law@redhat.com>
12505
12506 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
12507 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
12508
12509 2018-08-20 David Malcolm <dmalcolm@redhat.com>
12510
12511 PR other/84889
12512 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
12513 (decl_attributes): Likewise.
12514 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
12515 instance.
12516 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12517 * diagnostic-core.h (class auto_diagnostic_group): New class.
12518 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
12519 (diagnostic_report_diagnostic): Handle the first diagnostics within
12520 a group.
12521 (emit_diagnostic): Add auto_diagnostic_group instance.
12522 (inform): Likewise.
12523 (inform_n): Likewise.
12524 (warning): Likewise.
12525 (warning_at): Likewise.
12526 (warning_n): Likewise.
12527 (pedwarn): Likewise.
12528 (permerror): Likewise.
12529 (error): Likewise.
12530 (error_n): Likewise.
12531 (error_at): Likewise.
12532 (sorry): Likewise.
12533 (fatal_error): Likewise.
12534 (internal_error): Likewise.
12535 (internal_error_no_backtrace): Likewise.
12536 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
12537 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
12538 * diagnostic.h (struct diagnostic_context): Add fields
12539 "diagnostic_group_nesting_depth",
12540 "diagnostic_group_emission_count", "begin_group_cb",
12541 "end_group_cb".
12542 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
12543 Add auto_diagnostic_group instance(s).
12544 (find_explicit_erroneous_behavior): Likewise.
12545 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
12546 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
12547 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
12548 (gimplify_va_arg_expr): Likewise.
12549 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
12550 (HSA_SORRY_AT): Likewise.
12551 * ipa-devirt.c (compare_virtual_tables): Likewise.
12552 (warn_odr): Likewise.
12553 * multiple_target.c (expand_target_clones): Likewise.
12554 * opts-common.c (cmdline_handle_error): Likewise.
12555 * reginfo.c (globalize_reg): Likewise.
12556 * substring-locations.c (format_warning_n_va): Likewise.
12557 * tree-inline.c (expand_call_inline): Likewise.
12558 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
12559 * tree-ssa-loop-niter.c
12560 (do_warn_aggressive_loop_optimizations): Likewise.
12561 * tree-ssa-uninit.c (warn_uninit): Likewise.
12562 * tree.c (warn_deprecated_use): Likewise.
12563
12564 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
12565
12566 PR target/87014
12567 * config/i386/i386.md (eh_return): Always update EH return
12568 address in word_mode.
12569
12570 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
12571
12572 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
12573 TARGET_SPLIT_COMPLEX_ARG is defined.
12574
12575 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12576
12577 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
12578
12579 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12580
12581 PR target/86984
12582 * expr.c (expand_assignment): Assert that bitpos is positive.
12583 (store_field): Likewise
12584 (expand_expr_real_1): Make sure that bitpos is positive.
12585 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
12586 integer overflow.
12587
12588 2018-08-20 Nathan Sidwell <nathan@acm.org>
12589
12590 * Makefile.in (CPP_ID_DATA_H): Delete.
12591 (CPP_INTERNAL_H): Don't add it.
12592 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
12593 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
12594
12595 2018-08-20 Richard Biener <rguenther@suse.de>
12596
12597 PR tree-optimization/78655
12598 * tree-vrp.c (extract_range_from_binary_expr_1): Make
12599 pointer + offset nonnull if either operand is nonnull work.
12600
12601 2018-08-20 Tom de Vries <tdevries@suse.de>
12602
12603 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
12604 unless the referenced die describes the added property using
12605 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
12606 Otherwise, add a DW_AT_location to the referenced die.
12607
12608 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
12609
12610 PR target/86994
12611 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
12612 register_operand when calling ix86_set_reg_reg_cost.
12613 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
12614 Set *total to 0 for operands that satisfy x86_64_immediate_operand
12615 predicate and to 1 otherwise.
12616
12617 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
12618
12619 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
12620 emit a diagnostic that it is not supported and reset the option.
12621 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
12622 supported and consume the option. (ASM_FINAL_SPEC): New.
12623
12624 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12625
12626 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
12627 a sentence.
12628
12629 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
12630
12631 C-SKY port: Documentation
12632
12633 * doc/extend.texi (C-SKY Function Attributes): New section.
12634 * doc/invoke.texi (Option Summary): Add C-SKY options.
12635 (C-SKY Options): New section.
12636 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
12637
12638 2018-08-17 Jojo <jijie_rong@c-sky.com>
12639 Huibin Wang <huibin_wang@c-sky.com>
12640 Sandra Loosemore <sandra@codesourcery.com>
12641 Chung-Lin Tang <cltang@codesourcery.com>
12642
12643 C-SKY port: Backend implementation
12644
12645 * config/csky/*: New.
12646 * common/config/csky/*: New.
12647
12648 2018-08-17 Jojo <jijie_rong@c-sky.com>
12649 Huibin Wang <huibin_wang@c-sky.com>
12650 Sandra Loosemore <sandra@codesourcery.com>
12651 Chung-Lin Tang <cltang@codesourcery.com>
12652 Andrew Jenner <andrew@codesourcery.com>
12653
12654 C-SKY port: Configury
12655
12656 * config.gcc (csky-*-*): New.
12657 * configure.ac: Add csky to targets for dwarf2 debug_line support.
12658 * configure: Regenerated.
12659
12660 2018-08-17 David Malcolm <dmalcolm@redhat.com>
12661
12662 * dump-context.h: Include "dumpfile.h".
12663 (dump_context::dump_printf_va): Convert final param from va_list
12664 to va_list *. Convert from ATTRIBUTE_PRINTF to
12665 ATTRIBUTE_GCC_DUMP_PRINTF.
12666 (dump_context::dump_printf_loc_va): Likewise.
12667 * dumpfile.c: Include "stringpool.h".
12668 (make_item_for_dump_printf_va): Delete.
12669 (make_item_for_dump_printf): Delete.
12670 (class dump_pretty_printer): New class.
12671 (dump_pretty_printer::dump_pretty_printer): New ctor.
12672 (dump_pretty_printer::emit_items): New member function.
12673 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
12674 function.
12675 (dump_pretty_printer::emit_item): New member function.
12676 (dump_pretty_printer::stash_item): New member function.
12677 (dump_pretty_printer::format_decoder_cb): New member function.
12678 (dump_pretty_printer::decode_format): New member function.
12679 (dump_context::dump_printf_va): Reimplement in terms of
12680 dump_pretty_printer.
12681 (dump_context::dump_printf_loc_va): Convert final param from va_list
12682 to va_list *.
12683 (dump_context::begin_scope): Reimplement call to
12684 make_item_for_dump_printf.
12685 (dump_printf): Update for change to dump_printf_va.
12686 (dump_printf_loc): Likewise.
12687 (selftest::test_capture_of_dump_calls): Convert "stmt" from
12688 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
12689 with %T, %E, and %G.
12690 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
12691 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
12692 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
12693 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
12694 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
12695 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
12696 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
12697 within a dump_printf_loc call to "%wu".
12698 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
12699 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
12700 missing space after "=".
12701 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
12702 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
12703 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
12704 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
12705 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
12706 duplicate "vectorized" from message.
12707
12708 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
12709
12710 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
12711 polyNxK_t element's TYPE_STRING_FLAG.
12712
12713 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12714
12715 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
12716 (they were unnamed before). Fix comments.
12717
12718 2018-08-17 Nathan Sidwell <nathan@acm.org>
12719
12720 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
12721
12722 2018-08-17 Richard Biener <rguenther@suse.de>
12723
12724 PR tree-optimization/86841
12725 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
12726
12727 2018-08-17 Martin Liska <mliska@suse.cz>
12728
12729 * common.opt: Remove Warn, Init and Report for options with
12730 Ignore/Deprecated flag. Warning is done automatically for
12731 Deprecated flags.
12732 * config/i386/i386.opt: Likewise.
12733 * config/ia64/ia64.opt: Likewise.
12734 * config/rs6000/rs6000.opt: Likewise.
12735 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
12736 Remove usage of flag_check_pointer_bounds.
12737 * lto-wrapper.c (merge_and_complain): Do not handle
12738 OPT_fcheck_pointer_bounds.
12739 (append_compiler_options): Likewise.
12740 * opt-functions.awk: Do not handle Deprecated.
12741 * optc-gen.awk: Check that Var, Report and Init are not
12742 used for an option with Ignore/Deprecated flag.
12743 * opts-common.c (decode_cmdline_option): Do not report
12744 CL_ERR_DEPRECATED.
12745 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
12746 options.
12747 * opts.h (struct cl_option): Remove cl_deprecated flag.
12748 (CL_ERR_DEPRECATED): Remove error enum value.
12749
12750 2018-08-17 Richard Biener <rguenther@suse.de>
12751
12752 PR middle-end/86505
12753 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
12754 across a va-arg-pack using call adjust its return value accordingly.
12755
12756 2018-08-16 Martin Sebor <msebor@redhat.com>
12757
12758 PR tree-optimization/86853
12759 * gimple-ssa-sprintf.c (struct format_result): Rename member.
12760 (struct fmtresult): Add member and initialize it in ctors.
12761 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
12762 (format_string): Handle %S the same as %ls. Set MAYFAIL.
12763 (format_directive): Set POSUNDER4K when MAYFAIL is set.
12764 (parse_directive): Handle %C same as %c.
12765 (sprintf_dom_walker::compute_format_length): Adjust.
12766 (is_call_safe): Adjust.
12767
12768 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12769
12770 * builtins.c (c_strlen): Add new parameter eltsize. Use it
12771 for determining how to count the elements.
12772 * builtins.h (c_strlen): Adjust prototype.
12773 * expr.c (string_constant): Add new parameter mem_size.
12774 Set *mem_size appropriately.
12775 * expr.h (string_constant): Adjust protoype.
12776 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
12777 * gimple-fold.h (get_range_strlen): Adjust prototype.
12778 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
12779 (format_string): Call get_string_length with eltsize.
12780
12781 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12782
12783 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
12784 to emit the span, rather than setting it as the prefix.
12785
12786 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12787
12788 * diagnostic-show-locus.c (layout::start_annotation_line): Add
12789 "margin_char" parameter, defaulting to space. Use it in place
12790 of pp_space for the initial part of the margin.
12791 (layout::print_leading_fixits): Use '+' when filling the margin
12792 of line-insertion fix-it hints.
12793
12794 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12795
12796 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
12797 Delete.
12798
12799 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12800
12801 * config/rs6000/altivec.md: Don't set length attribute to the default
12802 value.
12803 * config/rs6000/darwin.md: Ditto.
12804 * config/rs6000/dfp.md: Ditto.
12805 * config/rs6000/htm.md: Ditto.
12806 * config/rs6000/rs6000.md: Ditto.
12807 * config/rs6000/sync.md: Ditto.
12808 * config/rs6000/vsx.md: Ditto.
12809
12810 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12811
12812 * config/rs6000/altivec.md: Don't set length attribute to the default
12813 value, for branch instructions.
12814 * config/rs6000/darwin.md: Ditto.
12815 * config/rs6000/rs6000.md: Ditto.
12816
12817 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12818
12819 * config/rs6000/rs6000.md (length): Always define as const_int 4.
12820 (unnamed conditional branch define_insn): Set length to 4 or 8
12821 depending on offset.
12822 (<bd>_<mode>): Similar, for alternative 0.
12823 (<bd>tf_<mode>): Ditto.
12824
12825 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12826
12827 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
12828
12829 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
12830
12831 * doc/rtl.texi: Replace old RTX class names with new names.
12832
12833
12834 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
12835
12836 * expmed.h (canonicalize_comparison): New declaration.
12837 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
12838 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
12839 * optabs.c (prepare_cmp_insn): Likewise.
12840 * rtl.h (unsigned_condition_p): New function which checks if a
12841 comparison operator is unsigned.
12842
12843 2018-08-16 Nathan Sidwell <nathan@acm.org>
12844
12845 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
12846 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
12847
12848 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12849
12850 PR target/84711
12851 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
12852 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
12853 (mov<mov>): ..this and enable unconditionally.
12854
12855 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12856
12857 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
12858
12859 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
12860
12861 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
12862 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
12863 "Common" with "Target".
12864
12865 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
12866
12867 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
12868 * doc/invoke.texi (mmitigate-rop): Remove.
12869 * config/i386/i386.c: Do not include "regrename.h".
12870 (ix86_rop_should_change_byte_p, reg_encoded_number)
12871 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
12872 Remove.
12873 (ix86_reorg): Remove call to ix86_mitigate_rop.
12874 * config/i386/i386.md (attr "modrm_class"): Remove.
12875 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
12876 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
12877 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
12878
12879 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
12880
12881 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
12882 allow folding of mergeh() and mergel() for the float and double types.
12883 (fold_mergehl_helper): Rework to handle building a permute tree
12884 for float vectors.
12885
12886 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
12887
12888 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
12889 for TARGET_SSE.
12890
12891 2018-08-15 David Malcolm <dmalcolm@redhat.com>
12892
12893 * common.opt (fdiagnostics-show-labels): New option.
12894 * diagnostic-show-locus.c (class layout_range): Add field
12895 "m_label".
12896 (class layout): Add field "m_show_labels_p".
12897 (layout_range::layout_range): Add param "label" and use it to
12898 initialize m_label.
12899 (make_range): Pass in NULL for new "label" param of layout_range's
12900 ctor.
12901 (layout::layout): Initialize m_show_labels_p.
12902 (layout::maybe_add_location_range): Pass in loc_range->m_label
12903 when constructing layout_range instances.
12904 (struct line_label): New struct.
12905 (layout::print_any_labels): New member function.
12906 (layout::print_line): Call it if label-printing is enabled.
12907 (selftest::test_one_liner_labels): New test.
12908 (selftest::test_diagnostic_show_locus_one_liner): Call it.
12909 * diagnostic.c (diagnostic_initialize): Initialize
12910 context->show_labels_p.
12911 * diagnostic.h (struct diagnostic_context): Add field
12912 "show_labels_p".
12913 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
12914 -fno-diagnostics-show-labels.
12915 * dwarf2out.c (gen_producer_string): Add
12916 OPT_fdiagnostics_show_labels to the ignored options.
12917 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
12918 param.
12919 (gcc_rich_location::maybe_add_expr): Likewise.
12920 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
12921 label" param, defaulting to NULL.
12922 (gcc_rich_location::add_expr): Add "label" param.
12923 (gcc_rich_location::maybe_add_expr): Likewise.
12924 (class text_range_label): New class.
12925 (class range_label_for_type_mismatch): New class.
12926 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
12927 of format_warning_va.
12928 (fmtwarn_n): Likewise for new params of format_warning_n_va.
12929 * lto-wrapper.c (merge_and_complain): Add
12930 OPT_fdiagnostics_show_labels to the "pick one setting" options.
12931 (append_compiler_options): Likewise to the dropped options.
12932 (append_diag_options): Likewise to the passed-on options.
12933 * opts.c (common_handle_option): Handle the new option.
12934 * selftest-diagnostic.c
12935 (test_diagnostic_context::test_diagnostic_context): Enable
12936 show_labels_p.
12937 * substring-locations.c: Include "gcc-rich-location.h".
12938 (format_warning_n_va): Add "fmt_label" and "param_label" params
12939 and use them as appropriate.
12940 (format_warning_va): Add "fmt_label" and "param_label" params,
12941 passing them on to format_warning_n_va.
12942 (format_warning_at_substring): Likewise.
12943 (format_warning_at_substring_n): Likewise.
12944 * substring-locations.h (format_warning_va): Add "fmt_label" and
12945 "param_label" params.
12946 (format_warning_n_va): Likewise.
12947 (format_warning_at_substring): Likewise.
12948 (format_warning_at_substring_n): Likewise.
12949 * toplev.c (general_init): Initialize global_dc->show_labels_p.
12950
12951 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
12952
12953 PR testsuite/86519
12954 * builtins.c (expand_builtin_memcmp): Do not expand the call
12955 when overflow is detected.
12956
12957 2018-08-15 Martin Sebor <msebor@redhat.com>
12958
12959 PR tree-optimization/71625
12960 * config/aarch64/aarch64-builtins.c
12961 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
12962
12963 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
12964
12965 * config/s390/s390.c (s390_reorg): Remove loop.
12966
12967 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
12968
12969 * config/darwin.c
12970 (darwin_function_switched_text_sections): Delete.
12971 * gcc/config/darwin.h
12972 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
12973
12974 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
12975
12976 PR target/81685
12977 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
12978 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
12979 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
12980
12981 2018-08-15 Martin Liska <mliska@suse.cz>
12982
12983 PR tree-optimization/86925
12984 * predict.c (expr_expected_value_1): When taking
12985 later predictor, assign also probability.
12986 Use fold_build2_initializer_loc in order to fold
12987 the expression in -frounding-math.
12988
12989 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
12990
12991 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
12992 patterns.
12993 (expand_vec_perm_1): Try the new method.
12994
12995 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
12996
12997 PR target/86547
12998 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
12999 Check whether lra_live_max_point is 0 before dividing.
13000
13001 2018-08-14 Martin Sebor <msebor@redhat.com>
13002
13003 PR tree-optimization/86650
13004 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
13005 (vrp_prop::check_mem_ref): Same.
13006
13007 2018-08-13 Liu Hao <lh_mouse@126.com>
13008
13009 * pretty-print.c (eat_esc_sequence): Swap the foreground and
13010 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
13011 and clear it thereafter, as it only works for DBCS.
13012
13013 2018-08-13 Liu Hao <lh_mouse@126.com>
13014
13015 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
13016 handle returned by _get_osf_handle().
13017
13018 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13019
13020 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
13021 for folding vec_perm.
13022
13023 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13024
13025 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
13026 Add support for gimple-folding of vec_pack() and vec_unpack()
13027 intrinsics.
13028
13029 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13030
13031 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
13032 vec_xst variants to the list.
13033 (rs6000_gimple_fold_builtin): Add support for folding unaligned
13034 vector loads and stores.
13035
13036 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
13037
13038 * config.gcc (rs6000-ibm-aix4.x): Delete.
13039 (rs6000-ibm-aix5.1): Delete.
13040 (rs6000-ibm-aix5.2): Delete.
13041 (rs6000-ibm-aix5.3): Delete.
13042 * config/rs6000/aix43.h: Delete.
13043 * config/rs6000/aix51.h: Delete.
13044 * config/rs6000/aix52.h: Delete.
13045 * config/rs6000/t-aix43: Delete.
13046
13047 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
13048
13049 * config/s390/s390.c (s390_decompose_constant_pool_ref):
13050 New function.
13051 (s390_decompose_address): Factor out constant pool ref
13052 decomposition.
13053
13054 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13055
13056 * config/nds32/nds32-predicates.c
13057 (nds32_can_use_bclr_p): Change return type as bool.
13058 (nds32_can_use_bset_p): Ditto.
13059 (nds32_can_use_btgl_p): Ditto.
13060 (nds32_can_use_bitci_p): Ditto.
13061 * config/nds32/nds32-protos.h
13062 (nds32_can_use_bclr_p): Change declaration.
13063 (nds32_can_use_bset_p): Ditto.
13064 (nds32_can_use_btgl_p): Ditto.
13065 (nds32_can_use_bitci_p): Ditto.
13066
13067 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13068
13069 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
13070 Support -msched-prolog-epilog option.
13071 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
13072
13073 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13074
13075 * common/config/nds32/nds32-common.c
13076 (nds32_option_optimization_table): Enalbe -malways-align.
13077
13078 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13079
13080 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
13081 extra_headers.
13082 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
13083 OPT_misr_secure_ case.
13084 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
13085 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
13086 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
13087 secure attribute.
13088 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
13089 (nds32_isr_info): New field security_level.
13090 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
13091 * config/nds32/nds32.md (return_internal): Consider critical attribute.
13092 * config/nds32/nds32.opt (misr-secure): New option.
13093 * config/nds32/nds32_init.inc: New file.
13094 * config/nds32/nds32_isr.h: New file.
13095
13096 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
13097
13098 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
13099 Update comment for atomic instructions.
13100 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
13101 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
13102 Remove.
13103 (atomic_loaddi): Revise fence expansion to only emit fence prior to
13104 load for __ATOMIC_SEQ_CST model.
13105 (atomic_loaddi_1): Remove float register target.
13106 (atomic_storedi): Handle CONST_INT values.
13107 (atomic_storedi_1): Remove float register source. Add special case
13108 for zero value.
13109 (memory_barrier): New expander and insn.
13110
13111 2018-08-11 Jakub Jelinek <jakub@redhat.com>
13112
13113 PR tree-optimization/86835
13114 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
13115 new_stmt after def_gsi, make sure to insert new_square_stmt after
13116 that stmt, not 2 stmts before it.
13117
13118 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
13119
13120 PR target/82418
13121 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
13122 instead of SWI48.
13123
13124 2018-08-10 Martin Liska <mliska@suse.cz>
13125
13126 PR target/83610
13127 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
13128 function type.
13129 * builtins.c (expand_builtin_expect_with_probability):
13130 New function.
13131 (expand_builtin_expect_with_probability): New function.
13132 (build_builtin_expect_predicate): Add new argumnet probability
13133 for BUILT_IN_EXPECT_WITH_PROBABILITY.
13134 (fold_builtin_expect):
13135 (fold_builtin_2):
13136 (fold_builtin_3):
13137 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
13138 * builtins.h (fold_builtin_expect): Set new argument.
13139 * doc/extend.texi: Document __builtin_expect_with_probability.
13140 * doc/invoke.texi: Likewise.
13141 * gimple-fold.c (gimple_fold_call): Pass new argument.
13142 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
13143 also BUILT_IN_EXPECT_WITH_PROBABILITY.
13144 * predict.c (get_predictor_value): New function.
13145 (expr_expected_value): Add new argument probability. Assume
13146 that predictor and probability are always non-null.
13147 (expr_expected_value_1): Likewise. For __builtin_expect and
13148 __builtin_expect_with_probability set probability. Handle
13149 combination in binary expressions.
13150 (tree_predict_by_opcode): Simplify code by simply calling
13151 get_predictor_value.
13152 (pass_strip_predict_hints::execute): Add handling of
13153 BUILT_IN_EXPECT_WITH_PROBABILITY.
13154 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
13155 new predictor.
13156 * tree.h (DECL_BUILT_IN_P): New function.
13157
13158 2018-08-10 Martin Liska <mliska@suse.cz>
13159
13160 PR tree-optimization/85799
13161 * passes.def: Add argument for pass_strip_predict_hints.
13162 * predict.c (class pass_strip_predict_hints): Add new argument
13163 early_p.
13164 (strip_predictor_early): New function.
13165 (pass_strip_predict_hints::execute): Call the function to
13166 strip predictors.
13167 (strip_predict_hints): New function.
13168 * predict.def: Fix comment.
13169
13170 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
13171
13172 * Makefile.in: Clarify which tm.texi to copy over to assert the
13173 right to grant a GFDL license for all.
13174
13175 2018-08-09 Jeff Law <law@redhat.com>
13176
13177 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
13178 unused variable.
13179
13180 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
13181
13182 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
13183 prototype.
13184
13185 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13186
13187 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
13188 reductions for variable-length vectors.
13189
13190 2018-08-09 David Malcolm <dmalcolm@redhat.com>
13191
13192 PR other/84889
13193 * common.opt (fdiagnostics-show-line-numbers): New option.
13194 * diagnostic-show-locus.c (class layout): Add fields
13195 "m_show_line_numbers_p" and "m_linenum_width";
13196 (num_digits): New function.
13197 (test_num_digits): New function.
13198 (layout::layout): Initialize new fields. Update m_x_offset
13199 logic to handle any left margin.
13200 (layout::print_source_line): Print line number when requested.
13201 (layout::start_annotation_line): New member function.
13202 (layout::print_annotation_line): Call it.
13203 (layout::print_leading_fixits): Likewise.
13204 (layout::print_trailing_fixits): Likewise. Update calls to
13205 move_to_column for new parameter.
13206 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
13207 it to potentially call start_annotation_line.
13208 (layout::show_ruler): Call start_annotation_line.
13209 (selftest::test_line_numbers_multiline_range): New selftest.
13210 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
13211 and selftest::test_line_numbers_multiline_range.
13212 * diagnostic.c (diagnostic_initialize): Initialize
13213 show_line_numbers_p.
13214 * diagnostic.h (struct diagnostic_context): Add field
13215 "show_line_numbers_p".
13216 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
13217 -fno-diagnostics-show-line-numbers.
13218 * dwarf2out.c (gen_producer_string): Add
13219 OPT_fdiagnostics_show_line_numbers to the ignored options.
13220 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
13221 one setting" options.
13222 (append_compiler_options): Likewise to the dropped options.
13223 (append_diag_options): Likewise to the passed-on options.
13224 * opts.c (common_handle_option): Handle the new option.
13225 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
13226
13227 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
13228
13229 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
13230 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
13231 third argument of type "const signed char" to descriptions of
13232 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
13233 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
13234 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
13235 __builtin_bcdsub_ov functions.
13236
13237 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13238
13239 PR tree-optimization/86858
13240 * tree-vect-loop.c (vect_is_simple_reduction): Restore
13241 flow_bb_inside_loop_p calls.
13242
13243 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13244
13245 PR tree-optimization/86871
13246 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
13247 instead of gimple_assign_lhs.
13248
13249 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
13250
13251 PR target/86887
13252 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
13253 register constraint to operand 0.
13254 (add<mode>3_carryinC): Likewise.
13255 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
13256
13257 2018-08-09 Martin Liska <mliska@suse.cz>
13258
13259 PR c/86895
13260 * common.opt: Remove extra line.
13261
13262 2018-08-09 Martin Liska <mliska@suse.cz>
13263
13264 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
13265 at the end of a line, make first letter capital and end up
13266 a sentence with a dot.
13267 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
13268 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
13269 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
13270 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
13271 (PARAM_MAX_ISL_OPERATIONS): Likewise.
13272 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
13273 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
13274 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
13275 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
13276 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
13277 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
13278 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
13279 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
13280 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
13281 (PARAM_TREE_REASSOC_WIDTH): Likewise.
13282 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
13283 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
13284 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
13285
13286 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
13287
13288 PR target/84332
13289 * config/s390/s390.c (s390_option_override_internal): Reduce the
13290 stack-clash-protection-probe-interval param if it would be too big
13291 for z900.
13292
13293 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
13294
13295 PR target/46179
13296 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
13297 * config/m68k/m68k.c (handle_move_double): Don't call
13298 m68k_final_prescan_insn.
13299 (m68k_adjust_decorated_operand): Renamed from
13300 m68k_final_prescan_insn, remove first and third operand and
13301 simplify.
13302 (print_operand): Call it.
13303 (print_operand_address): Call it.
13304
13305 2018-08-08 Nathan Sidwell <nathan@acm.org>
13306
13307 * diagnostic.c (diagnostic_report_current_module): Use
13308 linemap_included_from & linemap_included_from_linemap.
13309
13310 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
13311
13312 * config/aarch64/aarch64-cores.def: Add phecda core.
13313 * config/aarch64/aarch64-tune.md: Regenerate.
13314 * doc/invoke.texi: Add phecda core.
13315
13316 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13317
13318 PR target/85295
13319 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
13320 definitions.
13321 * config/s390/s390.md ("movti"): Add more alternatives for
13322 constant to GPR copies.
13323
13324 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13325
13326 * config/s390/s390.c: Fix whitespace damage throughout the file.
13327 * config/s390/s390.h: Likewise.
13328 * config/s390/tpf.h: Likewise.
13329
13330 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13331
13332 * config/s390/s390.c (s390_loadrelative_operand_p):
13333 Remove TARGET_CPU_ZARCH usages.
13334 (s390_rtx_costs): Likewise.
13335 (s390_legitimate_constant_p): Likewise.
13336 (s390_cannot_force_const_mem): Likewise.
13337 (legitimate_reload_constant_p): Likewise.
13338 (s390_preferred_reload_class): Likewise.
13339 (legitimize_pic_address): Likewise.
13340 (legitimize_tls_address): Likewise.
13341 (s390_split_branches): Removed.
13342 (s390_add_execute): Removed.
13343 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
13344 (s390_mainpool_start): Likewise.
13345 (s390_mainpool_finish): Likewise.
13346 (s390_mainpool_cancel): Removed.
13347 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
13348 (s390_chunkify_cancel): Likewise.
13349 (s390_return_addr_rtx): Likewise.
13350 (s390_register_info): Remove split_branches_pending_p uages.
13351 (s390_optimize_register_info): Likewise.
13352 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
13353 split_branches_pending_p usages.
13354 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
13355 (s390_load_got): Likewise.
13356 (s390_expand_split_stack_prologue): Likewise.
13357 (output_asm_nops): Likewise.
13358 (s390_function_profiler): Likewise.
13359 (s390_emit_call): Likewise.
13360 (s390_conditional_register_usage): Likewise.
13361 (s390_optimize_prologue): Likewise.
13362 (s390_reorg): Remove TARGET_CPU_ZARCH and
13363 split_branches_pending_p usages.
13364 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
13365 usages.
13366 (s390_output_indirect_thunk_function): Likewise.
13367 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
13368 (TARGET_CPU_ZARCH_P): Removed.
13369 (struct machine_function): Remove split_branches_pending_p.
13370 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
13371
13372 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13373
13374 * common/config/s390/s390-common.c (processor_flags_table):
13375 Remove flags.
13376 * config.gcc: Remove with_arch/with_tune support.
13377 * config/s390/2064.md: Remove cpu attribute comparisons.
13378 * config/s390/driver-native.c (s390_host_detect_local_cpu):
13379 Remove MTN.
13380 * config/s390/linux.h (ASM_SPEC):
13381 Remove -march support.
13382 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
13383 Use a table to get an arch level.
13384 * config/s390/s390-opts.h (enum processor_type):
13385 Remove enum values.
13386 * config/s390/s390.c
13387 (processor_table): Remove entries, add arch_level values.
13388 (s390_issue_rate): Remove cases.
13389 (s390_option_override): Adjust
13390 s390_option_override_internal() call.
13391 (s390_option_override_internal): Remove deprecation warning.
13392 (s390_valid_target_attribute_tree): Adjust
13393 s390_option_override_internal() call.
13394 * config/s390/s390.h (struct s390_processor):
13395 Share with s390-c.c, add arch_level field.
13396 * config/s390/s390.md:
13397 Remove occurrences in cpu attribute.
13398 * config/s390/s390.opt: Remove -march/-mtune support.
13399 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
13400 * doc/invoke.texi: Remove deprecation warning.
13401
13402 2018-08-08 Luis Machado <luis.machado@linaro.org>
13403
13404 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
13405 global.
13406 (qdf24xx_tunings): Set vector cost structure to
13407 qdf24xx_vector_cost.
13408
13409 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
13410 <register_sextend>: Set to 3.
13411
13412 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
13413
13414 PR target/86838
13415 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
13416 * config/aarch64/aarch64-simd.md
13417 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
13418 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
13419 (aarch64_frecpx<mode>): ...this new pattern.
13420 * config/aarch64/aarch64-simd-builtins.def: Remove comment
13421 about aarch64_frecp<FRECP:frecp_suffix><mode>.
13422
13423 2018-08-07 Martin Liska <mliska@suse.cz>
13424
13425 PR middle-end/83023
13426 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
13427 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
13428 * predict.def (PRED_MALLOC_NONNULL): New predictor.
13429 * doc/extend.texi: Document that malloc attribute adds
13430 hit to compiler.
13431
13432 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
13433
13434 PR target/86785
13435 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13436 Define to speculation_safe_value_not_needed.
13437
13438 2018-08-06 Jeff Law <law@redhat.com>
13439
13440 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
13441 the vr_values instance to cprop_into_stmt.
13442 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
13443 (cprop_operand): Also query EVRP to determine if OP is a constant.
13444
13445 2018-08-06 Nathan Sidwell <nathan@acm.org>
13446
13447 * diagnostic.c (diagnostic_report_current_module): Reroll
13448 included-at loop. Translate text.
13449
13450 2018-08-06 David Malcolm <dmalcolm@redhat.com>
13451
13452 * function-tests.c (selftest::test_expansion_to_rtl): Call
13453 free_after_compilation.
13454
13455 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13456
13457 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
13458
13459 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
13460
13461 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
13462 loops with memory block operations from getting unrolled.
13463
13464 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
13465
13466 PR target/86807
13467 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13468 Define to speculation_safe_value_not_needed.
13469
13470 2018-08-06 Jeff Law <law@redhat.com>
13471
13472 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
13473 assert.
13474
13475 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13476
13477 PR target/86662
13478 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
13479 with all enabled __intN types.
13480
13481 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
13482
13483 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13484
13485 * alias.c (record_set): Check for clobber high.
13486 * cfgexpand.c (expand_gimple_stmt): Likewise.
13487 * combine-stack-adj.c (single_set_for_csa): Likewise.
13488 * combine.c (find_single_use_1): Likewise.
13489 (set_nonzero_bits_and_sign_copies): Likewise.
13490 (get_combine_src_dest): Likewise.
13491 (is_parallel_of_n_reg_sets): Likewise.
13492 (try_combine): Likewise.
13493 (record_dead_and_set_regs_1): Likewise.
13494 (reg_dead_at_p_1): Likewise.
13495 (reg_dead_at_p): Likewise.
13496 * dce.c (deletable_insn_p): Likewise.
13497 (mark_nonreg_stores_1): Likewise.
13498 (mark_nonreg_stores_2): Likewise.
13499 * df-scan.c (df_find_hard_reg_defs): Likewise.
13500 (df_uses_record): Likewise.
13501 (df_get_call_refs): Likewise.
13502 * dwarf2out.c (mem_loc_descriptor): Likewise.
13503 * haifa-sched.c (haifa_classify_rtx): Likewise.
13504 * ira-build.c (create_insn_allocnos): Likewise.
13505 * ira-costs.c (scan_one_insn): Likewise.
13506 * ira.c (equiv_init_movable_p): Likewise.
13507 (rtx_moveable_p): Likewise.
13508 (interesting_dest_for_shprep): Likewise.
13509 * jump.c (mark_jump_label_1): Likewise.
13510 * postreload-gcse.c (record_opr_changes): Likewise.
13511 * postreload.c (reload_cse_simplify): Likewise.
13512 (struct reg_use): Add source expr.
13513 (reload_combine): Check for clobber high.
13514 (reload_combine_note_use): Likewise.
13515 (reload_cse_move2add): Likewise.
13516 (move2add_note_store): Likewise.
13517 * print-rtl.c (print_pattern): Likewise.
13518 * recog.c (decode_asm_operands): Likewise.
13519 (store_data_bypass_p): Likewise.
13520 (if_test_bypass_p): Likewise.
13521 * regcprop.c (kill_clobbered_value): Likewise.
13522 (kill_set_value): Likewise.
13523 * reginfo.c (reg_scan_mark_refs): Likewise.
13524 * reload1.c (maybe_fix_stack_asms): Likewise.
13525 (eliminate_regs_1): Likewise.
13526 (elimination_effects): Likewise.
13527 (mark_not_eliminable): Likewise.
13528 (scan_paradoxical_subregs): Likewise.
13529 (forget_old_reloads_1): Likewise.
13530 * reorg.c (find_end_label): Likewise.
13531 (try_merge_delay_insns): Likewise.
13532 (redundant_insn): Likewise.
13533 (own_thread_p): Likewise.
13534 (fill_simple_delay_slots): Likewise.
13535 (fill_slots_from_thread): Likewise.
13536 (dbr_schedule): Likewise.
13537 * resource.c (update_live_status): Likewise.
13538 (mark_referenced_resources): Likewise.
13539 (mark_set_resources): Likewise.
13540 * rtl.c (copy_rtx): Likewise.
13541 * rtlanal.c (reg_referenced_p): Likewise.
13542 (single_set_2): Likewise.
13543 (noop_move_p): Likewise.
13544 (note_stores): Likewise.
13545 * sched-deps.c (sched_analyze_reg): Likewise.
13546 (sched_analyze_insn): Likewise.
13547
13548 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13549
13550 * cse.c (invalidate_reg): New function extracted from...
13551 (invalidate): ...here.
13552 (canonicalize_insn): Check for clobber high.
13553 (invalidate_from_clobbers): invalidate clobber highs.
13554 (invalidate_from_sets_and_clobbers): Likewise.
13555 (count_reg_usage): Check for clobber high.
13556 (insn_live_p): Likewise.
13557 * cselib.c (cselib_expand_value_rtx_1):Likewise.
13558 (cselib_invalidate_regno): Check for clobber in setter.
13559 (cselib_invalidate_rtx): Pass through setter.
13560 (cselib_invalidate_rtx_note_stores):
13561 (cselib_process_insn): Check for clobber high.
13562 * cselib.h (cselib_invalidate_rtx): Add operand.
13563
13564 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13565
13566 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
13567 (mark_not_eliminable): Likewise.
13568 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
13569 * lra-lives.c (process_bb_lives): Check for clobber high.
13570 * lra.c (new_insn_reg): Remember clobber highs.
13571 (collect_non_operand_hard_regs): Check for clobber high.
13572 (lra_set_insn_recog_data): Likewise.
13573 (add_regs_to_insn_regno_info): Likewise.
13574 (lra_update_insn_regno_info): Likewise.
13575
13576 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13577
13578 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
13579 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
13580
13581 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13582
13583 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
13584 (copy_insn_1): Likewise.
13585 (gen_hard_reg_clobber_high): New gen function.
13586 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
13587 * genemit.c (gen_exp): Likewise.
13588 (gen_emit_seq): Pass through info.
13589 (gen_insn): Check for CLOBBER_HIGH.
13590 (gen_expand): Pass through info.
13591 (gen_split): Likewise.
13592 (output_add_clobbers): Likewise.
13593 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
13594 (remove_clobbers): Likewise.
13595 * rtl.h (gen_hard_reg_clobber_high): New declaration.
13596
13597 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13598
13599 * doc/rtl.texi (clobber_high): Add.
13600 (parallel): Add in clobber high
13601 * rtl.c (rtl_check_failed_code3): Add function.
13602 * rtl.def (CLOBBER_HIGH): Add expression.
13603 * rtl.h (RTL_CHECKC3): Add macro.
13604 (rtl_check_failed_code3): Add declaration.
13605 (XC3EXP): Add macro.
13606
13607 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
13608
13609 PR target/86386
13610 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
13611 cfun->machine->max_used_stack_alignment if needed.
13612
13613 2018-08-04 Martin Sebor <msebor@redhat.com>
13614
13615 PR tree-optimization/86571
13616 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
13617 NaN output to 4.
13618
13619 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
13620
13621 PR target/86799
13622 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13623 Define.
13624
13625 2018-08-03 Jeff Law <law@redhat.com>
13626
13627 PR target/86795
13628 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13629 Define to speculation_safe_value_not_needed.
13630
13631 2018-08-03 David Malcolm <dmalcolm@redhat.com>
13632
13633 * doc/gcov.texi (-x): Remove duplicate "to".
13634 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
13635 (-Wif-not-aligned): Remove duplicate "is".
13636 (-flto): Remove duplicate "the".
13637 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
13638 duplicate "v5.00.b".
13639 (MSP430 Options): Remove duplicate "and" from the description
13640 of "-mgprel-sec=regexp".
13641 (x86 Options): Remove duplicate copies of "vmldLog102" and
13642 vmlsLog104 from description of "-mveclibabi=type".
13643
13644 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
13645
13646 * internal-fn.h (first_commutative_argument): Declare.
13647 * internal-fn.c (first_commutative_argument): New function.
13648 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
13649 restrictions for pattern statements. Use first_commutative_argument
13650 to look for commutative operands in calls to internal functions.
13651
13652 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
13653
13654 * Makefile.in (wide-int-range.o): New.
13655 * tree-vrp.c: Move all the wide_int_* functions to...
13656 * wide-int-range.cc: ...here.
13657 * tree-vrp.h: Move all the wide_int_* prototypes to...
13658 * wide-int-range.h: ...here.
13659
13660 2018-08-03 Tom de Vries <tdevries@suse.de>
13661
13662 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
13663 UI_NONE.
13664 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
13665 * except.c (output_function_exception_table): Do early exit if
13666 targetm_common.except_unwind_info (&global_options) == UI_NONE.
13667
13668 2018-08-03 Martin Liska <mliska@suse.cz>
13669
13670 * predict.c (dump_prediction): Change to 2 digits
13671 in fraction part.
13672
13673 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
13674
13675 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
13676 neon_dup_q to...
13677 (falkor_am_1_gtov_gtov): ... a new insn reservation.
13678
13679 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
13680
13681 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
13682 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
13683 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
13684 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
13685 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
13686
13687 2018-08-02 David Malcolm <dmalcolm@redhat.com>
13688
13689 * diagnostic-show-locus.c (diagnostic_show_locus): Use
13690 pp_take_prefix when saving the existing prefix.
13691 * diagnostic.c (diagnostic_append_note): Likewise.
13692 * langhooks.c (lhd_print_error_function): Likewise.
13693 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
13694 param's type. Free the existing prefix.
13695 (pp_take_prefix): New function.
13696 (pretty_printer::pretty_printer): Drop the prefix parameter.
13697 Rename the length parameter to match the comment.
13698 (pretty_printer::~pretty_printer): Free the prefix.
13699 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
13700 parameter.
13701 (struct pretty_printer): Drop the "const" from "prefix" field's
13702 type and clarify memory management.
13703 (pp_set_prefix): Drop the "const" from the 2nd param.
13704 (pp_take_prefix): New decl.
13705
13706 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
13707
13708 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
13709 for word_mode_ok here instead of passing as argument.
13710 (expand_block_compare): Change select_block_compare_mode() call.
13711 (expand_strncmp_gpr_sequence): New function.
13712 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
13713
13714 2018-08-02 Jeff Law <law@redhat.com>
13715
13716 PR target/86790
13717 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13718 Define to speculation_safe_value_not_needed.
13719
13720 PR target/86784
13721 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13722 Define to speculation_safe_value_not_needed.
13723
13724 2018-08-02 Tom de Vries <tdevries@suse.de>
13725
13726 PR target/86660
13727 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
13728 function. Return UI_TARGET unconditionally.
13729 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
13730 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
13731
13732 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13733
13734 * genemit.c (print_overload_test): Fix typo.
13735
13736 2018-08-02 Richard Biener <rguenther@suse.de>
13737
13738 PR tree-optimization/86816
13739 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
13740 which checks for value availability before querying it.
13741 (gvn_uses_equal): Use it.
13742 (same_succ_hash): Likewise.
13743 (gimple_equal_p): Likewise.
13744
13745 2018-08-02 Nick Clifton <nickc@redhat.com>
13746
13747 PR target/86813
13748 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13749 Define to speculation_safe_value_not_needed.
13750
13751 PR target/86810
13752 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13753 Define to speculation_safe_value_not_needed.
13754
13755 PR target/86810
13756 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13757 Define to speculation_safe_value_not_needed.
13758
13759 PR target/86803
13760 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13761 Define to speculation_safe_value_not_needed.
13762
13763 PR target/86797
13764 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13765 Define to speculation_safe_value_not_needed.
13766
13767 PR target/86791
13768 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13769 Define to speculation_safe_value_not_needed.
13770
13771 PR target/86789
13772 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13773 Define to speculation_safe_value_not_needed.
13774
13775 PR target/86787
13776 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13777 Define to speculation_safe_value_not_needed.
13778
13779 PR target/86782
13780 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
13781 speculation_safe_value_not_needed.
13782
13783 PR target/86781
13784 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
13785 to speculation_safe_value_not_needed.
13786
13787 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13788
13789 * doc/md.texi: Expand the documentation of instruction names
13790 to mention port-local uses. Document '@' in pattern names.
13791 * read-md.h (overloaded_instance, overloaded_name): New structs.
13792 (mapping): Declare.
13793 (md_reader::handle_overloaded_name): New member function.
13794 (md_reader::get_overloads): Likewise.
13795 (md_reader::m_first_overload): New member variable.
13796 (md_reader::m_next_overload_ptr): Likewise.
13797 (md_reader::m_overloads_htab): Likewise.
13798 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
13799 m_next_overload_ptr and m_overloads_htab.
13800 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
13801 (get_mode_token, get_code_token, get_int_token): New functions.
13802 (map_attr_string): Add an optional argument that passes back
13803 the associated iterator.
13804 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
13805 (md_reader::handle_overloaded_name, add_overload_instance): New
13806 functions.
13807 (apply_iterators): Handle '@' names. Report an error if '@'
13808 is used without iterators.
13809 (initialize_iterators): Initialize the new iterator_group fields.
13810 * genopinit.c (handle_overloaded_code_for)
13811 (handle_overloaded_gen): New functions.
13812 (main): Use them to print declarations of maybe_code_for_* and
13813 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
13814 * genemit.c (print_overload_arguments, print_overload_test)
13815 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
13816 (main): Use it to print definitions of maybe_code_for_* and
13817 maybe_gen_* functions.
13818 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
13819 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
13820 instead of explicit mode checks.
13821 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
13822 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
13823 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
13824 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
13825 (aarch64_expand_compare_and_swap): Likewise
13826 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
13827 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
13828 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
13829 (aarch64_constant_pool_reload_icode): Delete.
13830 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
13831 instead of aarch64_constant_pool_reload_icode. Use
13832 code_for_aarch64_reload_mov instead of explicit mode checks.
13833 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
13834 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
13835 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
13836 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
13837 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
13838 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
13839 (aarch64_atomic_load_op_code): Delete.
13840 (aarch64_emit_atomic_load_op): Likewise.
13841 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
13842 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
13843 instead of aarch64_emit_atomic_load_op.
13844 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
13845 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
13846 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
13847 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
13848 character before the pattern name.
13849 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
13850 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
13851 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
13852 (aarch64_frecps<mode>): Likewise.
13853 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
13854 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
13855 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
13856 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
13857 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
13858
13859 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13860
13861 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
13862 Allow HFmode constants if TARGET_FP_F16INST.
13863
13864 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
13865
13866 PR target/86014
13867 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
13868 No longer check last store for clobber of address register.
13869
13870 2018-08-02 Martin Liska <mliska@suse.cz>
13871
13872 PR gcov-profile/86817
13873 * gcov.c (process_all_functions): New function.
13874 (main): Call it.
13875 (process_file): Move functions processing to
13876 process_all_functions.
13877
13878 2018-08-02 David Malcolm <dmalcolm@redhat.com>
13879
13880 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
13881 "const" to the "gimple *" and "rtx_insn *" parameters.
13882 * dumpfile.h (dump_user_location_t::dump_user_location_t):
13883 Likewise.
13884 (dump_location_t::dump_location_t): Likewise.
13885
13886 2018-08-01 Martin Sebor <msebor@redhat.com>
13887
13888 PR tree-optimization/86650
13889 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
13890 rather than a "gcall *". Directly pass the data of interest
13891 to percent_K_format, rather than building a temporary CALL_EXPR
13892 to hold it.
13893 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
13894 (gimple_fold_builtin_strncat): Adjust.
13895 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
13896 gcall* argument with gimple*.
13897 * gimple-ssa-warn-restrict.c (check_call): Same.
13898 (wrestrict_dom_walker::before_dom_children): Same.
13899 (builtin_access::builtin_access): Same.
13900 (check_bounds_or_overlap): Same
13901 (maybe_diag_overlap): Same.
13902 (maybe_diag_offset_bounds): Same.
13903 * tree-diagnostic.c (default_tree_printer): Move usage of
13904 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
13905 to this callsite.
13906 * tree-pretty-print.c (percent_K_format): Add argument.
13907 * tree-pretty-print.h: Add argument.
13908 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
13909 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
13910 (maybe_diag_stxncpy_trunc): Same.
13911 (handle_builtin_stxncpy): Same.
13912 (handle_builtin_strcat): Same.
13913
13914 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13915
13916 * match.pd: Optimise pointer range checks.
13917
13918 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13919
13920 PR tree-optimization/86758
13921 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
13922 to remove pattern statements.
13923
13924 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13925
13926 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
13927 result of dfs_enumerate_from when constructing stmt_vec_infos,
13928 instead of additionally calling get_loop_body.
13929
13930 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13931
13932 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
13933 parameter.
13934 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
13935 When creating an iv, assert that the step is not known to be zero.
13936 (vect_setup_realignment): Update call accordingly.
13937 * tree-vect-stmts.c (vectorizable_store): Likewise.
13938 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
13939
13940 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13941
13942 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
13943 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
13944 (vectorizable_reduction): Likewise.
13945 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13946 (vect_detect_hybrid_slp_stmts): Likewise.
13947 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13948
13949 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
13950
13951 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
13952 (wide_int_set_zero_nonzero_bits): ...this.
13953 (zero_nonzero_bits_from_vr): Rename to...
13954 (vrp_set_zero_nonzero_bits): ...this.
13955 (extract_range_from_multiplicative_op_1): Abstract wide int
13956 code...
13957 (wide_int_range_multiplicative_op): ...here.
13958 (extract_range_from_binary_expr_1): Extract wide int binary
13959 operations into their own functions.
13960 (wide_int_range_lshift): New.
13961 (wide_int_range_can_optimize_bit_op): New.
13962 (wide_int_range_shift_undefined_p): New.
13963 (wide_int_range_bit_xor): New.
13964 (wide_int_range_bit_ior): New.
13965 (wide_int_range_bit_and): New.
13966 (wide_int_range_trunc_mod): New.
13967 (extract_range_into_wide_ints): New.
13968 (vrp_shift_undefined_p): New.
13969 (extract_range_from_multiplicative_op): New.
13970 (vrp_can_optimize_bit_op): New.
13971 * tree-vrp.h (value_range::dump): New.
13972 (wide_int_range_multiplicative_op): New.
13973 (wide_int_range_lshift):New.
13974 (wide_int_range_shift_undefined_p): New.
13975 (wide_int_range_bit_xor): New.
13976 (wide_int_range_bit_ior): New.
13977 (wide_int_range_bit_and): New.
13978 (wide_int_range_trunc_mod): New.
13979 (zero_nonzero_bits_from_bounds): Rename to...
13980 (wide_int_set_zero_nonzero_bits): ...this.
13981 (zero_nonzero_bits_from_vr): Rename to...
13982 (vrp_set_zero_nonzero_bits): ...this.
13983 (range_easy_mask_min_max): Rename to...
13984 (wide_int_range_can_optimize_bit_op): this.
13985 * vr-values.c (simplify_bit_ops_using_ranges): Rename
13986 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
13987
13988 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13989
13990 * tree-vectorizer.h (vect_orig_stmt): New function.
13991 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
13992 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
13993 (vect_create_epilog_for_reduction): Likewise.
13994 (vectorizable_live_operation): Likewise.
13995 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
13996 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
13997 * tree-vect-stmts.c (vectorizable_call): Likewise.
13998 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
13999
14000 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14001
14002 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
14003 argument.
14004 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
14005 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
14006 (vect_transform_loop): Likewise.
14007 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14008
14009 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14010
14011 * tree-vectorizer.h (vect_schedule_slp): Return void.
14012 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14013 (vect_schedule_slp): Likewise.
14014
14015 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14016
14017 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
14018 argument.
14019 (vect_transform_loop): Update calls accordingly. Schedule SLP
14020 instances before the main loop, if any exist.
14021
14022 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14023
14024 PR tree-optimization/86749
14025 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
14026 If the lhs is used in a COND_EXPR, check that it is being used
14027 as the "then" or "else" value.
14028
14029 2018-08-01 Tom de Vries <tdevries@suse.de>
14030
14031 PR target/86800
14032 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
14033 speculation_safe_value_not_needed.
14034
14035 2018-08-01 Richard Biener <rguenther@suse.de>
14036
14037 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
14038 as base and offset.
14039
14040 2018-08-01 Martin Liska <mliska@suse.cz>
14041
14042 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
14043 format how successful transformation is dumped.
14044 (gimple_mod_pow2_value_transform): Likewise.
14045 (gimple_mod_subtract_transform): Likewise.
14046 (gimple_stringops_transform): Likewise.
14047
14048 2018-08-01 Martin Liska <mliska@suse.cz>
14049
14050 PR value-prof/35543
14051 * value-prof.c (interesting_stringop_to_profile_p):
14052 Simplify the code and add BUILT_IN_MEMMOVE.
14053 (gimple_stringops_transform): Likewise.
14054
14055 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
14056
14057 * config/aarch64/aarch64-simd.md
14058 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
14059 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
14060 use GPI iterator instead of SI mode.
14061
14062 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14063
14064 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
14065 rs6000_speculation_barrier.
14066 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
14067 new barrier pattern name.
14068
14069 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14070
14071 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
14072 (speculation_barrier): New insn.
14073
14074 2018-08-01 Richard Biener <rguenther@suse.de>
14075
14076 PR bootstrap/86724
14077 * graphite.h: Include isl/id.h and isl/space.h to allow build
14078 with ISL 0.20.
14079
14080 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
14081
14082 PR target/86651
14083 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14084 mode for COFF targets.
14085 * defaults.h (TARGET_COFF): Define.
14086 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
14087 TARGET_COFF): Define.
14088 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
14089 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
14090 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
14091
14092 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14093
14094 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
14095 * gimple-streamer-out.c (output_bb): Save it.
14096 * lto-streamer-in.c (input_struct_function_base): Restore
14097 instance discriminator if available. Create map on demand.
14098 * lto-streamer-out.c (output_struct_function_base): Save it if
14099 available.
14100 * final.c (decl_to_instance_map): Document LTO strategy.
14101
14102 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14103 Olivier Hainque <hainque@adacore.com>
14104
14105 * debug.h (decl_to_instance_map_t): New type.
14106 (decl_to_instance_map): Declare.
14107 (maybe_create_decl_to_instance_map): New inline function.
14108 * final.c (bb_discriminator, last_bb_discriminator): New statics,
14109 to track basic block discriminators.
14110 (final_start_function_1): Initialize them.
14111 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
14112 bb_discriminator.
14113 (decl_to_instance_map): New variable.
14114 (map_decl_to_instance, maybe_set_discriminator): New functions.
14115 (notice_source_line): Set discriminator.
14116
14117 2018-07-31 Ian Lance Taylor <iant@golang.org>
14118
14119 * targhooks.c (default_have_speculation_safe_value): Add
14120 ATTRIBUTE_UNUSED.
14121
14122 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14123
14124 * dump-context.h: Include "pretty-print.h".
14125 (dump_context::refresh_dumps_are_enabled): New decl.
14126 (dump_context::emit_item): New decl.
14127 (class dump_context): Add fields "m_test_pp" and
14128 "m_test_pp_flags".
14129 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14130 (temp_dump_context::get_dumped_text): New decl.
14131 (class temp_dump_context): Add field "m_pp".
14132 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
14133 (dump_context::refresh_dumps_are_enabled): ...and add a test for
14134 m_test_pp.
14135 (set_dump_file): Update for above change.
14136 (set_alt_dump_file): Likewise.
14137 (dump_loc): New overload, taking a pretty_printer *.
14138 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
14139 to any test pretty-printer.
14140 (make_item_for_dump_gimple_stmt): New function, adapted from
14141 optinfo::add_gimple_stmt.
14142 (dump_context::dump_gimple_stmt): Call it, and use the result,
14143 eliminating the direct usage of dump_file and alt_dump_file in
14144 favor of indirectly using them via emit_item.
14145 (make_item_for_dump_gimple_expr): New function, adapted from
14146 optinfo::add_gimple_expr.
14147 (dump_context::dump_gimple_expr): Call it, and use the result,
14148 eliminating the direct usage of dump_file and alt_dump_file in
14149 favor of indirectly using them via emit_item.
14150 (make_item_for_dump_generic_expr): New function, adapted from
14151 optinfo::add_tree.
14152 (dump_context::dump_generic_expr): Call it, and use the result,
14153 eliminating the direct usage of dump_file and alt_dump_file in
14154 favor of indirectly using them via emit_item.
14155 (make_item_for_dump_printf_va): New function, adapted from
14156 optinfo::add_printf_va.
14157 (make_item_for_dump_printf): New function.
14158 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
14159 and use the result, eliminating the direct usage of dump_file and
14160 alt_dump_file in favor of indirectly using them via emit_item.
14161 (make_item_for_dump_dec): New function.
14162 (dump_context::dump_dec): Call it, and use the result,
14163 eliminating the direct usage of dump_file and alt_dump_file in
14164 favor of indirectly using them via emit_item.
14165 (make_item_for_dump_symtab_node): New function, adapted from
14166 optinfo::add_symtab_node.
14167 (dump_context::dump_symtab_node): Call it, and use the result,
14168 eliminating the direct usage of dump_file and alt_dump_file in
14169 favor of indirectly using them via emit_item.
14170 (dump_context::begin_scope): Reimplement, avoiding direct usage
14171 of dump_file and alt_dump_file in favor of indirectly using them
14172 via emit_item.
14173 (dump_context::emit_item): New member function.
14174 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14175 Set up test pretty-printer on the underlying context. Call
14176 refresh_dumps_are_enabled.
14177 (temp_dump_context::~temp_dump_context): Call
14178 refresh_dumps_are_enabled.
14179 (temp_dump_context::get_dumped_text): New member function.
14180 (selftest::verify_dumped_text): New function.
14181 (ASSERT_DUMPED_TEXT_EQ): New macro.
14182 (selftest::test_capture_of_dump_calls): Run all tests twice, with
14183 and then without optinfo enabled. Add uses of
14184 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
14185 * dumpfile.h: Update comment for the dump_* API.
14186 * optinfo-emit-json.cc
14187 (selftest::test_building_json_from_dump_calls): Update for new
14188 param for temp_dump_context ctor.
14189 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
14190 and "m_owned" field.
14191 (optinfo_item::~optinfo_item): Likewise.
14192 (optinfo::add_item): New member function.
14193 (optinfo::emit): Update comment.
14194 (optinfo::add_string): Delete.
14195 (optinfo::add_printf): Delete.
14196 (optinfo::add_printf_va): Delete.
14197 (optinfo::add_gimple_stmt): Delete.
14198 (optinfo::add_gimple_expr): Delete.
14199 (optinfo::add_tree): Delete.
14200 (optinfo::add_symtab_node): Delete.
14201 (optinfo::add_dec): Delete.
14202 * optinfo.h (class dump_context): New forward decl.
14203 (optinfo::add_item): New decl.
14204 (optinfo::add_string): Delete.
14205 (optinfo::add_printf): Delete.
14206 (optinfo::add_printf_va): Delete.
14207 (optinfo::add_gimple_stmt): Delete.
14208 (optinfo::add_gimple_expr): Delete.
14209 (optinfo::add_tree): Delete.
14210 (optinfo::add_symtab_node): Delete.
14211 (optinfo::add_dec): Delete.
14212 (optinfo::add_poly_int): Delete.
14213 (optinfo_item::optinfo_item): Remove "owned" param.
14214 (class optinfo_item): Remove field "m_owned".
14215
14216 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14217
14218 PR middle-end/86705
14219 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
14220 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
14221 requested variable alignment.
14222 (expand_one_ssa_partition): Likewise.
14223 (expand_one_var): Likewise.
14224
14225 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14226
14227 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
14228 to speculation_safe_value_not_needed.
14229
14230 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14231
14232 * targhooks.h (speculation_safe_value_not_needed): New prototype.
14233 * targhooks.c (speculation_safe_value_not_needed): New function.
14234 * target.def (have_speculation_safe_value): Update documentation.
14235 * doc/tm.texi: Regenerated.
14236
14237 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14238
14239 * config/aarch64/iterators.md (ALLI_TI): New iterator.
14240 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
14241 expand.
14242 (despeculate_copy<ALLI:mode>_insn): New insn.
14243 (despeculate_copyti_insn): New insn.
14244 (despeculate_simple<ALLI:mode>): New insn
14245 (despeculate_simpleti): New insn.
14246 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
14247 function.
14248 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
14249 aarch64_speculation_safe_value.
14250 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
14251
14252 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14253
14254 * config/aarch64/aarch64-speculation.cc: New file.
14255 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
14256 before pass_reorder_blocks.
14257 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
14258 prototype.
14259 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
14260 X14 and X15 when tracking speculation.
14261 * config/aarch64/aarch64.md (register name constants): Add
14262 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
14263 (unspec): Add UNSPEC_SPECULATION_TRACKER.
14264 (speculation_barrier): New insn attribute.
14265 (cmp<mode>): Allow SP in comparisons.
14266 (speculation_tracker): New insn.
14267 (speculation_barrier): Add speculation_barrier attribute.
14268 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
14269 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
14270 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
14271
14272 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14273
14274 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
14275 aarch64_track_speculation is true.
14276 (tb<optab><mode>1): Likewise.
14277 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
14278 generate CB[N]Z when tracking speculation.
14279 (aarch64_split_compare_and_swap): Likewise.
14280 (aarch64_split_atomic_op): Likewise.
14281
14282 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14283
14284 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
14285
14286 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14287
14288 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
14289 (speculation_barrier): New insn.
14290
14291 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14292
14293 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
14294 * config/arm/arm.md (speculation_barrier): New expand.
14295 (speculation_barrier_insn): New pattern.
14296
14297 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14298
14299 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
14300 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
14301 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
14302 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
14303 list.
14304 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
14305 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
14306 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
14307 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
14308 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
14309 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
14310 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
14311 * builtins.c (expand_speculation_safe_value): New function.
14312 (expand_builtin): Call it.
14313 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
14314 * doc/extend.texi: Document __builtin_speculation_safe_value.
14315 * doc/md.texi: Document "speculation_barrier" pattern.
14316 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
14317 TARGET_HAVE_SPECULATION_SAFE_VALUE.
14318 * doc/tm.texi: Regenerated.
14319 * target.def (have_speculation_safe_value, speculation_safe_value): New
14320 hooks.
14321 * targhooks.c (default_have_speculation_safe_value): New function.
14322 (default_speculation_safe_value): New function.
14323 * targhooks.h (default_have_speculation_safe_value): Add prototype.
14324 (default_speculation_safe_value): Add prototype.
14325
14326 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14327
14328 * dump-context.h (dump_context::dump_loc): New decl.
14329 * dumpfile.c (dump_context::dump_loc): New member function.
14330 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
14331 and dump_gimple_stmt.
14332 (dump_context::dump_gimple_expr_loc): Likewise, using
14333 dump_gimple_expr.
14334 (dump_context::dump_generic_expr_loc): Likewise, using
14335 dump_generic_expr.
14336 (dump_context::dump_printf_loc_va): Likewise, using
14337 dump_printf_va.
14338 (dump_context::begin_scope): Explicitly using the global function
14339 "dump_loc", rather than the member function.
14340
14341 2018-07-31 Martin Sebor <msebor@redhat.com>
14342
14343 PR tree-optimization/86741
14344 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
14345
14346 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
14347
14348 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
14349 depend on whether prefetch instructions will be emitted or not.
14350 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
14351 will be emitted or not.
14352 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
14353 (TARGET_SETMEM_PFD): New macros.
14354
14355 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14356
14357 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
14358 (NULL_STMT_VEC_INFO): Delete.
14359 (stmt_vec_info::operator*): Likewise.
14360 (stmt_vec_info::operator gimple *): Likewise.
14361 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
14362 of NULL_STMT_VEC_INFO.
14363 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14364 (vect_reassociating_reduction_p): Likewise.
14365 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
14366 (vectorizable_store): Likewise.
14367 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
14368 (vec_info::free_stmt_vec_infos): Likewise.
14369
14370 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14371
14372 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
14373 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
14374
14375 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14376
14377 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
14378 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14379 (vec_info::free_stmt_vec_info): New private member functions.
14380 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
14381 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
14382 * tree-parloops.c (gather_scalar_reductions): Remove calls to
14383 set_stmt_vec_info_vec and free_stmt_vec_infos.
14384 * tree-vect-loop.c (_loop_vec_info): Remove call to
14385 set_stmt_vec_info_vec.
14386 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
14387 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
14388 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
14389 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14390 (vec_info::free_stmt_vec_info): ...these new functions. Remove
14391 assignments in {vec_info::,}new_stmt_vec_info that are redundant
14392 with the clearing in the xcalloc.
14393 (stmt_vec_info_vec): Delete.
14394 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
14395 (vectorize_loops): Likewise.
14396 (vec_info::~vec_info): Remove argument from call to
14397 free_stmt_vec_infos.
14398 (vec_info::add_stmt): Remove vinfo argument from call to
14399 new_stmt_vec_info.
14400
14401 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14402
14403 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
14404 rather than a gimple stmt.
14405 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
14406 information for pattern statements when passed the original
14407 statement; instead wait to be passed the pattern statement itself.
14408 Don't call set_vinfo_for_stmt here.
14409 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
14410 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
14411 stmt_vec_infos here.
14412 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
14413 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
14414 stmt_vec_infos entry.
14415
14416 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14417
14418 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
14419 * tree-vectorizer.c (vec_info::replace_stmt): New function.
14420 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
14421 * tree-vect-stmts.c (vectorizable_call): Likewise.
14422 (vectorizable_simd_clone_call): Likewise.
14423
14424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14425
14426 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
14427 * tree-vectorizer.c (vec_info::remove_stmt): New function.
14428 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
14429 * tree-vect-loop.c (vect_transform_loop): Likewise.
14430 * tree-vect-slp.c (vect_schedule_slp): Likewise.
14431 * tree-vect-stmts.c (vect_remove_stores): Likewise.
14432
14433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14434
14435 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
14436 (vect_dr_stmt): Delete.
14437 * tree-vectorizer.c (vec_info::lookup_dr): New function.
14438 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
14439 of DR_VECT_AUX.
14440 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14441 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
14442 (vect_verify_datarefs_alignment, vect_peeling_supportable)
14443 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14444 (vect_analyze_data_refs): Likewise.
14445 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
14446 argument.
14447 (vect_find_same_alignment_drs): Likewise.
14448 (vect_slp_analyze_node_dependences): Update calls accordingly.
14449 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14450 instead of DR_VECT_AUX.
14451 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
14452 of a vector data references. Use vec_info::lookup_dr instead of
14453 DR_VECT_AUX.
14454 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
14455 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14456 instead of DR_VECT_AUX.
14457
14458 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14459
14460 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
14461 dr_vec_info.
14462 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14463 accordingly.
14464 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14465 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14466 (vect_gen_prolog_loop_niters): Likewise.
14467
14468 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14469
14470 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
14471 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
14472 (vect_known_alignment_in_bytes, vect_dr_behavior)
14473 (vect_get_scalar_dr_size): Take references as dr_vec_infos
14474 instead of data_references. Update calls to other routines for
14475 which the same change has been made.
14476 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
14477 dr_vec_infos instead of stmt_vec_infos.
14478 (vect_analyze_data_ref_dependence): Update call accordingly.
14479 (vect_slp_analyze_data_ref_dependence)
14480 (vect_record_base_alignments): Use DR_VECT_AUX.
14481 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
14482 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
14483 (vector_alignment_reachable_p, vect_get_data_access_cost)
14484 (vect_peeling_supportable, vect_analyze_group_access_1)
14485 (vect_analyze_group_access, vect_analyze_data_ref_access)
14486 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
14487 (vect_compile_time_alias, vect_small_gap_p)
14488 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
14489 (vect_supportable_dr_alignment): Take references as dr_vec_infos
14490 instead of data_references. Update calls to other routines for
14491 which the same change has been made.
14492 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
14493 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
14494 (vect_slp_analyze_and_verify_node_alignment)
14495 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14496 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14497 (vect_setup_realignment): Use dr_vec_infos. Update calls after
14498 above changes.
14499 (_vect_peel_info::dr): Replace with...
14500 (_vect_peel_info::dr_info): ...this new field.
14501 (vect_peeling_hash_get_most_frequent)
14502 (vect_peeling_hash_choose_best_peeling): Update accordingly.
14503 (vect_peeling_hash_get_lowest_cost):
14504 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
14505 routines for which the same change has been made.
14506 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
14507 data_reference.
14508 * tree-vect-loop-manip.c (get_misalign_in_elems)
14509 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
14510 above changes.
14511 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14512 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
14513 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
14514 (get_group_load_store_type, get_negative_load_store_type)
14515 (vect_get_data_ptr_increment, vectorizable_store)
14516 (vectorizable_load): Likewise.
14517 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
14518 Update calls to other routines for which the same change has been made.
14519
14520 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14521
14522 * tree-vectorizer.h (vec_info::move_dr): New member function.
14523 (dataref_aux): Rename to...
14524 (dr_vec_info): ...this and add "dr" and "stmt" fields.
14525 (_stmt_vec_info::dr_aux): Update accordingly.
14526 (_stmt_vec_info::data_ref_info): Delete.
14527 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
14528 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
14529 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
14530 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
14531 of data_ref.
14532 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
14533 (STMT_VINFO_DR_INFO): New macro.
14534 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
14535 (set_dr_misalignment): Update after rename of dataref_aux.
14536 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
14537 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
14538 initialization of STMT_VINFO_DATA_REF.
14539 * tree-vectorizer.c (vec_info::move_dr): New function.
14540 * tree-vect-patterns.c (vect_recog_bool_pattern)
14541 (vect_recog_mask_conversion_pattern)
14542 (vect_recog_gather_scatter_pattern): Use it.
14543 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
14544 the "dr" and "stmt" fields of dr_vec_info instead of
14545 STMT_VINFO_DATA_REF.
14546
14547 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14548
14549 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
14550 (is_pattern_stmt_p): Use it.
14551 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
14552 on pattern statements.
14553
14554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14555
14556 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
14557 original stmt as a stmt_vec_info rather than a gimple stmt.
14558 (vect_pattern_recog_1): Take the statement directly as a
14559 stmt_vec_info, rather than via a gimple_stmt_iterator.
14560 Update call to vect_mark_pattern_stmts.
14561 (vect_pattern_recog): Update calls accordingly.
14562
14563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14564
14565 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
14566 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
14567 a vect_def_type for the first argument.
14568 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
14569 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
14570 operand if it isn't defined by a vectorized statement.
14571 (vect_build_gather_load_calls): Remove the mask_dt argument and
14572 update calls to vect_get_vec_def_for_stmt_copy.
14573 (vectorizable_bswap): Likewise the dt argument.
14574 (vectorizable_call): Update calls to vectorizable_bswap and
14575 vect_get_vec_def_for_stmt_copy.
14576 (vectorizable_simd_clone_call, vectorizable_assignment)
14577 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
14578 (vectorizable_comparison): Update calls to
14579 vect_get_vec_def_for_stmt_copy.
14580 (vectorizable_store): Likewise. Remove now-unnecessary calls to
14581 vect_is_simple_use.
14582 (vect_get_loop_based_defs): Remove dt argument and update call
14583 to vect_get_vec_def_for_stmt_copy.
14584 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
14585 and vect_get_vec_def_for_stmt_copy.
14586 (vectorizable_load): Update calls to vect_build_gather_load_calls
14587 and vect_get_vec_def_for_stmt_copy.
14588 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14589 (vectorizable_reduction, vectorizable_live_operation): Update calls
14590 to vect_get_vec_def_for_stmt_copy.
14591
14592 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14593
14594 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
14595 and gimple stmt arguments with a stmt_vec_info.
14596 (vect_record_base_alignments): Update calls accordingly.
14597 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
14598 and gimple stmt arguments with a stmt_vec_info.
14599 (vect_build_slp_tree_1): Remove vinfo argument and update call
14600 to vect_record_max_nunits.
14601 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
14602 and vect_record_max_nunits.
14603
14604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14605
14606 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
14607 file and take a stmt_vec_info instead of a gimple stmt.
14608 (supportable_widening_operation, vect_finish_replace_stmt)
14609 (vect_finish_stmt_generation, vect_get_store_rhs)
14610 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
14611 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
14612 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
14613 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
14614 (vect_create_data_ref_ptr, bump_vector_ptr)
14615 (vect_permute_store_chain, vect_setup_realignment)
14616 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
14617 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
14618 (vectorizable_reduction, vectorizable_induction)
14619 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
14620 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
14621 than gimple stmts as arguments.
14622 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
14623 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
14624 (can_group_stmts_p, vect_check_gather_scatter)
14625 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14626 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
14627 (vect_permute_load_chain, vect_shift_permute_load_chain)
14628 (vect_transform_grouped_load)
14629 (vect_record_grouped_load_vectors): Likewise.
14630 * tree-vect-loop.c (vect_fixup_reduc_chain)
14631 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
14632 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
14633 (vectorizable_reduction, vectorizable_induction)
14634 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
14635 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
14636 (vect_get_load_store_mask): Likewise.
14637 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
14638 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
14639 * tree-vect-stmts.c (vect_mark_relevant)
14640 (is_simple_and_all_uses_invariant)
14641 (exist_non_indexing_operands_for_use_p, process_use)
14642 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
14643 (vect_get_vec_def_for_operand, vect_get_vec_defs)
14644 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
14645 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
14646 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
14647 (get_negative_load_store_type, get_load_store_type)
14648 (vect_check_load_store_mask, vect_check_store_rhs)
14649 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
14650 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14651 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14652 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14653 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
14654 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
14655 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
14656 (supportable_widening_operation): Likewise.
14657
14658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14659
14660 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
14661 a stmt_vec_info instead of a gcall.
14662 (vect_check_gather_scatter): Update call accordingly.
14663 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
14664 of a gphi.
14665 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
14666 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
14667 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
14668 instead of a gimple stmt.
14669 (vect_transform_loop): Update calls accordingly.
14670 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
14671 stmt_vec_infos instead of gimple stmts.
14672 (vect_analyze_slp_instance): Update use accordingly.
14673 * tree-vect-stmts.c (read_vector_array, write_vector_array)
14674 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
14675 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
14676 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
14677 (vect_gen_widened_results_half, vect_get_loop_based_defs)
14678 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
14679 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
14680 down to subroutines.
14681
14682 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14683
14684 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
14685 of the worklist from a vector of gimple stmts to a vector of
14686 stmt_vec_infos.
14687 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14688 (vect_mark_stmts_to_be_vectorized): Likewise
14689
14690 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14691
14692 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
14693 statement before passing it to vect_analyze_stmt.
14694 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
14695 the chain of phi vector definitions. Track the exit phi via its
14696 stmt_vec_info.
14697 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
14698 STMT_VINFO_REDUC_DEF.
14699 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
14700 stmt_vec_infos to handle the statement chains.
14701 (vect_get_slp_defs): Record the first statement in the node
14702 using a stmt_vec_info.
14703 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
14704 statements here and pass their stmt_vec_info down to subroutines.
14705 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
14706 down to vect_finish_stmt_generation.
14707 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
14708 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
14709 stmt_vec_infos to subroutines.
14710 (vect_remove_stores): Use stmt_vec_infos to handle the statement
14711 chains.
14712
14713 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14714
14715 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
14716 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
14717 (vect_permute_store_chain, vect_setup_realignment)
14718 (vect_permute_load_chain, vect_shift_permute_load_chain)
14719 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
14720 stmts internally, and when passing values to other vectorizer routines.
14721 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14722 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
14723 (vect_analyze_loop_operations, get_initial_def_for_reduction)
14724 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
14725 (vectorizable_reduction, vectorizable_induction)
14726 (vectorizable_live_operation, vect_transform_loop_stmt)
14727 (vect_transform_loop): Likewise.
14728 * tree-vect-patterns.c (vect_reassociating_reduction_p)
14729 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
14730 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
14731 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14732 (vect_slp_analyze_node_operations_1): Likewise.
14733 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14734 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
14735 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
14736 (vect_finish_stmt_generation_1, get_group_load_store_type)
14737 (get_load_store_type, vect_build_gather_load_calls)
14738 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14739 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14740 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14741 (vectorizable_store, vectorizable_load, vectorizable_condition)
14742 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
14743 (supportable_widening_operation): Likewise.
14744 (vect_get_vector_types_for_stmt): Likewise.
14745 * tree-vectorizer.h (vect_dr_behavior): Likewise.
14746
14747 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14748
14749 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14750 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
14751 (vect_permute_store_chain, vect_permute_load_chain)
14752 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
14753 repeated stmt_vec_info lookups.
14754 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14755 (vect_update_ivs_after_vectorizer): Likewise.
14756 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
14757 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
14758 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
14759 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14760 (vect_bb_slp_scalar_cost): Likewise.
14761 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
14762
14763 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14764
14765 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
14766 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
14767 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
14768 to get gassigns and gcalls, rather than operating on generc gimple
14769 stmts.
14770 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
14771 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
14772 (vectorizable_load, vect_analyze_stmt): Likewise.
14773 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
14774
14775 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14776
14777 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
14778 return stmt_vec_infos rather than gimple stmts. Do not accept
14779 null arguments.
14780 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
14781 of a gimple stmt.
14782 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
14783 Update use of get_later_stmt.
14784 (vect_get_constant_vectors): Update call accordingly.
14785 (vect_schedule_slp_instance): Likewise
14786 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
14787 (vect_slp_analyze_instance_dependence): Likewise.
14788 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
14789
14790 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14791
14792 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
14793 (stmt_info_for_cost::stmt_info): ...this new field.
14794 (add_stmt_costs): Update accordingly.
14795 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
14796 (vect_get_known_peeling_cost): Likewise.
14797 (vect_estimate_min_profitable_iters): Likewise.
14798 * tree-vect-stmts.c (record_stmt_cost): Likewise.
14799
14800 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14801
14802 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
14803 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14804 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14805 accordingly.
14806 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
14807
14808 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14809
14810 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
14811 a gimple stmt to a stmt_vec_info.
14812 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
14813
14814 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14815
14816 * tree-vectorizer.h (vec_info::grouped_stores): Change from
14817 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14818 (_loop_vec_info::reduction_chains): Likewise.
14819 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
14820 accordingly.
14821 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14822
14823 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14824
14825 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
14826 a gimple stmt to a stmt_vec_info.
14827 (_stmt_vec_info::next_element): Likewise.
14828 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
14829 (vect_slp_analyze_and_verify_node_alignment)
14830 (vect_analyze_group_access_1, vect_analyze_group_access)
14831 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
14832 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
14833 (vect_supportable_dr_alignment): Update accordingly.
14834 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
14835 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
14836 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
14837 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14838 * tree-vect-slp.c (vect_build_slp_tree_1)
14839 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
14840 (vect_split_slp_store_group, vect_analyze_slp_instance)
14841 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
14842 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
14843 (get_group_load_store_type, get_load_store_type)
14844 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
14845 (vect_transform_stmt, vect_remove_stores): Likewise.
14846
14847 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14848
14849 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
14850 than a gimple stmt.
14851 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14852 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
14853 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
14854 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
14855 (vector_alignment_reachable_p, vect_get_data_access_cost)
14856 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
14857 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
14858 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
14859 (vect_analyze_group_access_1, vect_analyze_group_access)
14860 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
14861 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
14862 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
14863 result of vect_dr_stmt and use the stmt_vec_info instead of
14864 the associated gimple stmt.
14865 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14866 (vect_gen_prolog_loop_niters): Likewise.
14867 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14868
14869 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14870
14871 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
14872 to a vec<stmt_vec_info>.
14873 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
14874 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
14875 vec<stmt_vec_info>.
14876 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
14877 to a vec<stmt_vec_info>.
14878 (bst_traits::value_type, bst_traits::value_type): Likewise.
14879 (bst_traits::hash): Update accordingly.
14880 (vect_get_and_check_slp_defs): Change the stmts parameter from
14881 a vec<gimple *> to a vec<stmt_vec_info>.
14882 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
14883 (vect_build_slp_tree): Likewise.
14884 (vect_build_slp_tree_2): Likewise. Update uses of
14885 SLP_TREE_SCALAR_STMTS.
14886 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
14887 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
14888 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
14889 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
14890 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
14891 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
14892 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
14893 (vect_get_constant_vectors, vect_get_slp_defs)
14894 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
14895 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
14896 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
14897 instead of gimple stmts.
14898 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
14899 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
14900 (vect_slp_analyze_instance_dependence): Update uses of
14901 SLP_TREE_SCALAR_STMTS.
14902 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14903 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
14904 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
14905 (get_initial_defs_for_reduction): Likewise.
14906 (vect_create_epilog_for_reduction): Likewise.
14907 (vectorize_fold_left_reduction): Likewise.
14908 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
14909 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
14910 (can_vectorize_live_stmts): Likewise.
14911
14912 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14913
14914 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
14915 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14916 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
14917 than gimple stmts.
14918 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
14919 of a gimple stmt.
14920 (gather_scalar_reductions): Update after above interface changes.
14921 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
14922 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
14923 than gimple stmts.
14924 (vect_force_simple_reduction): Likewise.
14925 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
14926 LOOP_VINFO_REDUCTIONS.
14927 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14928
14929 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14930
14931 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
14932 a gimple stmt to a stmt_vec_info.
14933 * tree-vect-loop.c (vect_active_double_reduction_p)
14934 (vect_force_simple_reduction, vectorizable_reduction): Update
14935 accordingly.
14936
14937 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14938
14939 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
14940 vec<gimple *> to a vec<stmt_vec_info>.
14941 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
14942 the reduction_phis argument from a vec<gimple *> to a
14943 vec<stmt_vec_info>.
14944 (vectorizable_reduction): Likewise the phis local variable that
14945 is passed to vect_create_epilog_for_reduction. Update for new type
14946 of SLP_TREE_VEC_STMTS.
14947 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
14948 (vectorizable_live_operation): Likewise.
14949 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
14950 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
14951
14952 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14953
14954 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
14955 a gimple stmt to a stmt_vec_info.
14956 (vectorizable_condition, vectorizable_live_operation)
14957 (vectorizable_reduction, vectorizable_induction): Pass back the
14958 vectorized statement as a stmt_vec_info.
14959 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
14960 use of STMT_VINFO_VEC_STMT.
14961 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
14962 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
14963 as stmt_vec_infos rather than gimple stmts.
14964 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
14965 to a stmt_vec_info.
14966 (vectorizable_live_operation): Likewise.
14967 (vectorizable_reduction, vectorizable_induction): Likewise,
14968 updating use of STMT_VINFO_VEC_STMT.
14969 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
14970 of STMT_VINFO_VEC_STMT.
14971 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
14972 (vectorizable_simd_clone_call, vectorizable_conversion)
14973 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14974 (vectorizable_store, vectorizable_load, vectorizable_condition)
14975 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
14976 from a gimple stmt to a stmt_vec_info.
14977 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
14978 pointer to a stmt_vec_info to the vectorizable_* routines.
14979
14980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14981
14982 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
14983 a gimple stmt to a stmt_vec_info.
14984 (is_pattern_stmt_p): Update accordingly.
14985 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
14986 (vect_record_grouped_load_vectors): Likewise.
14987 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
14988 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
14989 (vect_model_reduction_cost): Likewise.
14990 (vect_create_epilog_for_reduction): Likewise.
14991 (vectorizable_reduction, vectorizable_induction): Likewise.
14992 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14993 Return the stmt_vec_info for the pattern statement.
14994 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
14995 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
14996 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
14997 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
14998 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
14999 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
15000 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
15001 (free_stmt_vec_info, vect_is_simple_use): Likewise.
15002
15003 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15004
15005 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
15006 (vect_finish_stmt_generation): Likewise.
15007 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15008 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
15009 (vect_build_gather_load_calls): Use the return value of the above
15010 functions instead of a separate call to vinfo_for_stmt. Use narrow
15011 scopes for the input gimple stmt and wider scopes for the associated
15012 stmt_vec_info. Use vec_info::lookup_def when setting these
15013 stmt_vec_infos from an SSA_NAME definition.
15014 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
15015 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
15016 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
15017 (vectorizable_store, vectorizable_load, vectorizable_condition)
15018 (vectorizable_comparison): Likewise.
15019 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
15020 (vectorizable_reduction): Likewise.
15021
15022 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15023
15024 * tree-vectorizer.h (vect_is_simple_use): Add an optional
15025 stmt_vec_info * parameter before the optional gimple **.
15026 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15027 (process_use, vect_get_vec_def_for_operand_1): Update callers.
15028 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
15029 * tree-vect-loop.c (vectorizable_reduction): Likewise.
15030 (vectorizable_live_operation): Likewise.
15031 * tree-vect-patterns.c (type_conversion_p): Likewise.
15032 (vect_look_through_possible_promotion): Likewise.
15033 (vect_recog_rotate_pattern): Likewise.
15034 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15035
15036 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15037
15038 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
15039 a typedef to a wrapper class.
15040 (NULL_STMT_VEC_INFO): New macro.
15041 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
15042 (stmt_vec_info::operator*): New function.
15043 (stmt_vec_info::operator gimple *): Likewise.
15044 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
15045 (add_stmt_costs): Likewise.
15046 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
15047 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
15048 (vect_get_known_peeling_cost): Likewise.
15049 (vect_estimate_min_profitable_iters): Likewise.
15050 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15051 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
15052 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
15053 (vectorizable_store, free_stmt_vec_infos): Likewise.
15054 (new_stmt_vec_info): Change return type of xcalloc to
15055 _stmt_vec_info *.
15056
15057 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15058
15059 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
15060 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
15061 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
15062 a single_imm_use-based sequence.
15063 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
15064
15065 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15066
15067 * tree-vectorizer.h (vec_info::lookup_def): Declare.
15068 * tree-vectorizer.c (vec_info::lookup_def): New function.
15069 * tree-vect-patterns.c (vect_get_internal_def): Use it.
15070 (vect_widened_op_tree): Likewise.
15071 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15072 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
15073 (vectorizable_reduction): Likewise.
15074 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
15075 of a gimple *.
15076 (vect_is_slp_reduction): Update calls accordingly. Use
15077 vec_info::lookup_def.
15078 (vect_is_simple_reduction): Likewise
15079 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
15080
15081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15082
15083 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
15084 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
15085 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
15086 of vinfo_for_stmt.
15087 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
15088 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
15089 (vect_update_vf_for_slp, vect_analyze_loop_operations)
15090 (vect_is_slp_reduction, vectorizable_induction)
15091 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
15092 * tree-vect-patterns.c (vect_init_pattern_stmt):
15093 (vect_determine_min_output_precision_1, vect_determine_precisions)
15094 (vect_pattern_recog): Likewise.
15095 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
15096 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
15097 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
15098 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
15099 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
15100 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
15101 info field from a loop to a loop_vec_info.
15102
15103 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15104
15105 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
15106 (vec_info::add_stmt): Declare.
15107 * tree-vectorizer.c (vec_info::add_stmt): New function.
15108 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
15109 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
15110 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
15111 (vectorizable_induction): Likewise.
15112 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
15113 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15114 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
15115 (vectorizable_load): Likewise.
15116 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15117 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
15118 (vect_recog_gather_scatter_pattern): Likewise.
15119 (append_pattern_def_seq): Likewise. Remove a check that is
15120 performed by add_stmt itself.
15121
15122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15123
15124 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
15125 which make_ssa_name was called with new_stmt before new_stmt
15126 had been created.
15127
15128 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15129
15130 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
15131 split out from...
15132 (vect_is_slp_reduction): ...here...
15133 (vect_is_simple_reduction): ...and here. Remove repetition of tests
15134 that are already known to be false.
15135
15136 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15137
15138 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
15139 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
15140 STMT_VINFO_NUM_SLP_USES when it's true.
15141 (vect_free_slp_instance): Add a final_p parameter and pass it to
15142 vect_free_slp_tree.
15143 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
15144 (vect_analyze_slp_instance): Likewise.
15145 (vect_slp_analyze_operations): Likewise.
15146 (vect_slp_analyze_bb_1): Likewise.
15147 * tree-vectorizer.c (vec_info): Likewise.
15148 * tree-vect-loop.c (vect_transform_loop): Likewise.
15149
15150 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15151
15152 * tree-vect-loop.c (vectorizable_reduction): Assert that the
15153 function is not called for second and subsequent members of
15154 a reduction group.
15155
15156 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15157
15158 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
15159 cases for nested loops from here to ...
15160 (vect_create_epilog_for_reduction): ...here. Only call
15161 vect_is_simple_use for inner-loop reductions.
15162
15163 2018-07-31 Martin Liska <mliska@suse.cz>
15164
15165 PR gcov-profile/85338
15166 PR gcov-profile/85350
15167 PR gcov-profile/85372
15168 * profile.c (struct location_triplet): New.
15169 (struct location_triplet_hash): Likewise.
15170 (output_location): Do not output a BB that
15171 is already recorded for a line.
15172 (branch_prob): Use streamed_locations.
15173
15174 2018-07-31 Martin Liska <mliska@suse.cz>
15175
15176 PR gcov-profile/85370
15177 * coverage.c (coverage_begin_function): Do not mark target
15178 clones as artificial functions.
15179
15180 2018-07-31 Martin Liska <mliska@suse.cz>
15181
15182 PR gcov-profile/83813
15183 PR gcov-profile/84758
15184 PR gcov-profile/85217
15185 PR gcov-profile/85332
15186 * profile.c (branch_prob): Do not record GOTO expressions
15187 for GIMPLE statements which locations are already streamed.
15188
15189 2018-07-31 Olivier Hainque <hainque@adacore.com>
15190
15191 * gcc.c (handle_spec_function): Accept a soft_matched_part
15192 argument, as do_spec_1. Pass it down to ...
15193 (eval_spec_function): Accept a soft_matched_part argument,
15194 and pass it down to ...
15195 (do_spec_2): Accept a soft_matched_part argument, and pass
15196 it down to do_spec_1.
15197 (do_spec_1): Pass soft_matched_part to handle_spec_function.
15198 (handle_braces): Update call to handle_spec_function.
15199 (driver::set_up_specs): Update calls to do_spec_2.
15200 (compare_debug_dump_opt_spec_function): Likewise.
15201 (compare_debug_self_opt_spec_function): Likewise.
15202
15203 2018-07-31 Olivier Hainque <hainque@adacore.com>
15204
15205 * common.opt (nolibc): New option.
15206 * doc/invoke.texi (Link Options): Document it.
15207 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
15208 * config/alpha/linux.h: Likewise.
15209 * config/arc/elf.h: Likewise.
15210 * config/arm/uclinux-elf.h: Likewise.
15211 * config/arm/unknown-elf.h: Likewise.
15212 * config/avr/avrlibc.h: Likewise.
15213 * config/bfin/bfin.h: Likewise.
15214 * config/bfin/linux.h: Likewise.
15215 * config/bfin/uclinux.h: Likewise.
15216 * config/darwin.h: Likewise.
15217 * config/darwin10.h: Likewise.
15218 * config/darwin12.h: Likewise.
15219 * config/gnu-user.h: Likewise.
15220 * config/lm32/uclinux-elf.h: Likewise.
15221 * config/pa/pa-hpux11.h: Likewise.
15222 * config/pa/pa64-hpux.h: Likewise.
15223 * config/sparc/sparc.h: Likewise.
15224
15225 2018-07-31 Olivier Hainque <hainque@adacore.com>
15226
15227 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
15228 undefined variables.
15229
15230 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15231
15232 PR target/86640
15233 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
15234 instead of GEN_INT.
15235
15236 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
15237
15238 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
15239 terminated string literal.
15240
15241 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15242
15243 PR rtl-optimization/85160
15244 * combine.c (is_just_move): New function.
15245 (try_combine): Allow combining two instructions into two if neither of
15246 the original instructions was a move.
15247
15248 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
15249
15250 PR target/86673
15251 * doc/extend.texi (Global Register Variables): Discourage use of type
15252 qualifiers.
15253 (Local Register Variables): Likewise.
15254
15255 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
15256
15257 PR tree-optimization/86506
15258 * hwint.h (ceil_log2): Resync with hwint.c implementation.
15259
15260 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
15261
15262 PR target/86547
15263 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
15264 hard_regno, make sure no insn between `from` and `to` clobbers it.
15265
15266 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
15267 Tom de Vries <tdevries@suse.de>
15268
15269 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
15270 (PTX_DEFAULT_RUNTIME_DIM): ... this.
15271 (nvptx_goacc_validate_dims): Set default worker and gang dims to
15272 PTX_DEFAULT_RUNTIME_DIM.
15273 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
15274
15275 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
15276
15277 * config/pa/pa.c (pa_output_addr_vec): Align address table.
15278 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
15279 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
15280
15281 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
15282
15283 * config/rs6000/constraints.md (wG constraint): Delete, no longer
15284 used.
15285 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
15286 predicate to reflect toc fusion has been deleted.
15287 (toc_fusion_mem_raw): Delete, no longer used.
15288 (toc_fusion_mem_wrapped): Likewise.
15289 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
15290 fusion mask bit.
15291 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
15292 Delete, no longer used.
15293 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
15294 meant to be used for toc fusion.
15295 (rs6000_debug_print_mode): Delete toc fusion debugging.
15296 (rs6000_debug_reg_global): Likewise.
15297 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
15298 fusion and secondary reload support that were never used.
15299 (rs6000_option_override_internal): Delete TOC fusion, that was only
15300 partially defined, and it did not work unless you also used the
15301 -mcmodel= switch.
15302 (rs6000_legitimate_address_p): Delete TOC fusion support.
15303 (rs6000_opt_masks): Likewise.
15304 (fusion_wrap_memory_address): Delete function, no longer used.
15305 (fusion_split_address); Delete TOC fusion support.
15306 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
15307 longer used with toc fusion being deleted.
15308 (TARGET_TOC_FUSION_FP): Likewise.
15309 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
15310 UNSPEC.
15311 (toc fusion spliter): Delete TOC fusion support.
15312 (toc_fusionload_<mode>): Likewise.
15313 (toc_fusionload_di): Likewise.
15314 (fusion_gpr_load_<mode>): Delete generator function, this insn no
15315 longer needs to be named. Rename predicate to delete TOC fusion.
15316 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15317 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15318 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15319 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15320 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
15321
15322 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
15323
15324 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
15325 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
15326 __int128 in built-in function prototypes.
15327 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
15328 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
15329
15330 2018-07-27 Martin Sebor <msebor@redhat.com>
15331
15332 PR tree-optimization/86696
15333 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
15334 types, including enums.
15335 (handle_char_store): Be prepared for the above function to fail.
15336
15337 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
15338
15339 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
15340 when optimization level is lower than 2 or optimize for size.
15341
15342 2018-07-26 Martin Sebor <msebor@redhat.com>
15343
15344 PR tree-optimization/86043
15345 PR tree-optimization/86042
15346 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
15347 (get_string_cst_length): Rename...
15348 (get_min_string_length): ...to this. Add argument.
15349 (handle_char_store): Extend to handle multi-character stores by
15350 MEM_REF.
15351 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
15352 * tree.h (initializer_zerop): Add argument.
15353
15354 2018-07-26 Jakub Jelinek <jakub@redhat.com>
15355
15356 PR middle-end/86660
15357 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
15358 declare target to variables if they have always,{to,from,tofrom} map
15359 kinds.
15360
15361 2018-07-26 Martin Liska <mliska@suse.cz>
15362
15363 PR lto/86548
15364 * lto-wrapper.c: Add linker_output as prefix
15365 for ltrans_output_file.
15366
15367 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
15368
15369 PR rtl-optimization/85805
15370 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
15371 value for hard registers if that was written in the same mode.
15372
15373 2018-07-26 Martin Liska <mliska@suse.cz>
15374
15375 PR gcov-profile/86536
15376 * gcov.c (format_gcov): Use printf format %.*f directly
15377 and do not handle special values.
15378
15379 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15380
15381 * common/config/arc/arc-common.c (arc_option_optimization_table):
15382 Update default optimizations for size.
15383
15384 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15385
15386 * config/arc/arc.md (movsf_insn): Add short instruction selection.
15387 * config/arc/constraints.md (CfZ): New constraint.
15388 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
15389 (subsf3_fpu): Likewise.
15390 (cmpsf_fpu): Likewise.
15391 (cmpsf_fpu_uneq): Likewise.
15392
15393 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15394
15395 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
15396 accesses as well.
15397 (arc_is_uncached_mem_p): uncached applies to both the variable and
15398 the pointer.
15399
15400 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15401
15402 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
15403 register names.
15404
15405 2018-07-25 David Malcolm <dmalcolm@redhat.com>
15406
15407 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
15408 field "m_scopes" from vec to auto_vec.
15409
15410 2018-07-25 Martin Liska <mliska@suse.cz>
15411
15412 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
15413 return type.
15414
15415 2018-07-25 Richard Biener <rguenther@suse.de>
15416
15417 PR debug/86654
15418 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
15419 special wrt context_die late.
15420 (gen_subprogram_die): Re-use DIEs in local scope.
15421
15422 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
15423
15424 PR tree-optimization/86644
15425 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
15426
15427 2018-07-25 Martin Liska <mliska@suse.cz>
15428
15429 PR middle-end/86645
15430 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
15431 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
15432
15433 2018-07-25 Martin Liska <mliska@suse.cz>
15434
15435 PR sanitizer/79635
15436 * params.def: Explain ASan abbreviation and provide
15437 a documentation link.
15438
15439 2018-07-24 Martin Sebor <msebor@redhat.com>
15440
15441 PR tree-optimization/86622
15442 PR tree-optimization/86532
15443 * builtins.h (string_length): Declare.
15444 * builtins.c (c_strlen): Correct handling of non-constant offsets.
15445 (check_access): Be prepared for non-constant length ranges.
15446 (string_length): Make extern.
15447 * expr.c (string_constant): Only handle the minor non-constant
15448 array index. Use string_constant to compute the length of
15449 a generic string constant.
15450
15451 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
15452
15453 PR tree-optimization/86618
15454 * tree-vect-stmts.c (vectorizable_call): Don't take the address
15455 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
15456
15457 2018-07-24 David Malcolm <dmalcolm@redhat.com>
15458
15459 PR tree-optimization/86636
15460 * json.cc (json::object::set): Fix comment. Add assertions.
15461 (json::array::append): Move here from json.h. Add comment and an
15462 assertion.
15463 (json::string::string): Likewise.
15464 * json.h (json::array::append): Move to json.cc.
15465 (json::string::string): Likewise.
15466 * optinfo-emit-json.cc
15467 (optrecord_json_writer::impl_location_to_json): Assert that we
15468 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
15469 wrapper around it. Expand the location once, rather than three
15470 times.
15471 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
15472 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
15473 wrappers.
15474 (optrecord_json_writer::optinfo_to_json): Likewise, in four
15475 places. Fix some overlong lines.
15476
15477 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
15478
15479 * config/aarch64/aarch64-simd.md
15480 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
15481 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
15482 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
15483 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
15484 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
15485 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
15486 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
15487 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
15488 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
15489
15490 2018-07-24 Jakub Jelinek <jakub@redhat.com>
15491
15492 PR middle-end/86627
15493 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
15494 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
15495 and abs_d == d, do the power of two handling if profitable.
15496
15497 2018-07-24 Richard Biener <rguenther@suse.de>
15498
15499 * match.pd: Add BIT_FIELD_REF canonicalizations.
15500
15501 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15502
15503 PR c/86617
15504 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
15505
15506 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15507
15508 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
15509 terminated STRING_CST object.
15510
15511 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15512
15513 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
15514
15515 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15516
15517 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
15518 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
15519 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
15520 the elements into a register.
15521 (rs6000_split_v4si_init_di_reg): Delete.
15522 (rs6000_split_v4si_init): Delete.
15523 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
15524 (vsx_init_v4si): Rewrite as a define_expand.
15525
15526 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15527
15528 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
15529 zero_extend argument from memory): New.
15530
15531 2018-07-22 Martin Sebor <msebor@redhat.com>
15532
15533 PR bootstrap/86621
15534 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
15535 diagnosing calls with unknown arguments unless -Walloca-larger-than
15536 is restricted to less than PTRDIFF_MAX bytes.
15537
15538 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
15539
15540 * doc/gcov.texi (Invoking Gcov): Editorial changes.
15541
15542 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15543
15544 * pretty-print.c (text_info::set_location): Remove redundant
15545 "line_table" parameter from call to rich_location::set_range.
15546
15547 2018-07-20 Martin Sebor <msebor@redhat.com>
15548
15549 PR middle-end/82063
15550 * builtins.c (expand_builtin_alloca): Adjust.
15551 * calls.c (alloc_max_size): Simplify.
15552 * cgraphunit.c (cgraph_node::expand): Adjust.
15553 * common.opt (larger_than_size, warn_frame_larger_than): Remove
15554 variables.
15555 (frame_larger_than_size): Same.
15556 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
15557 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
15558 Initialize.
15559 * doc/invoke.texi (GCC Command Options): Document option arguments.
15560 Explain byte-size arguments and suffixes.
15561 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
15562 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
15563 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
15564 * doc/options.texi (UInteger): Expand.
15565 (Host_Wide_Int, ByteSize): Document new properties.
15566 * final.c (final_start_function_1): Include sizes in an error message.
15567 * function.c (frame_offset_overflow): Same.
15568 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
15569 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
15570 Diagnose unbounded alloca calls only for limits of less than
15571 PTRDIFF_MAX.
15572 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
15573 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
15574 for alloca(0).
15575 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
15576 only for limits of less than PTRDIFF_MAX.
15577 * langhooks-def.h (lhd_handle_option): Change function argument
15578 to HOST_WIDE_INT.
15579 * langhooks.c (lhd_handle_option): Same.
15580 * langhooks.h (handle_option): Same.
15581 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
15582 ByteSize flags.
15583 (var_type, var_type_struct): Same.
15584 (var_set): Handle ByteSize flag.
15585 * optc-gen.awk: Add comments to output to ease debugging. Make
15586 use of HOST_WIDE_INT where appropriate.
15587 * opts-gen-save.awk: Use %lx to format unsigned long.
15588 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
15589 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
15590 arguments. Parse bytes-size suffixes.
15591 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
15592 (enum_value_to_arg): Same.
15593 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
15594 (handle_option): Adjust.
15595 (generate_option): Change function argument to HOST_WIDE_INT.
15596 (cmdline_handle_error): Adjust.
15597 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
15598 (set_option): Change function argument to HOST_WIDE_INT.
15599 (option_enabled): Handle cl_host_wide_int.
15600 (get_option_state): Handle CLVC_SIZE.
15601 (control_warning_option): Same.
15602 * opts.c (common_handle_option): Change function argument to
15603 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
15604 OPT_Wvla_larger_than_.
15605 * opts.h (enum cl_var_type): Add an enumerator.
15606 * stor-layout.c (layout_decl): Print a more meaningful warning.
15607 * toplev.c (output_stack_usage): Adjust.
15608
15609 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
15610
15611 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
15612 call to inline_expand_builtin_string_cmp.
15613 (expand_builtin_strcmp): Likewise.
15614 (expand_builtin_strncmp): Likewise.
15615 (inline_string_cmp): Delete the last parameter, change char_type_node
15616 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
15617 two operands.
15618 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
15619 the inlining expansion on target where the type of the call has same or
15620 narrower precision than unsigned char.
15621
15622 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15623
15624 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
15625 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
15626 * common.opt (fsave-optimization-record): New option.
15627 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
15628 * doc/invoke.texi (-fsave-optimization-record): New option.
15629 * dumpfile.c: Include "optinfo-emit-json.h".
15630 (struct kv_pair): Move to coretypes.h.
15631 (optgroup_options): Make non-static.
15632 (dump_context::end_scope): Call
15633 optimization_records_maybe_pop_dump_scope.
15634 * dumpfile.h (optgroup_options): New decl.
15635 * json.cc: New file.
15636 * json.h: New file.
15637 * optinfo-emit-json.cc: New file.
15638 * optinfo-emit-json.h: New file.
15639 * optinfo.cc: Include "optinfo-emit-json.h".
15640 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
15641 (optinfo_enabled_p): Check optimization_records_enabled_p.
15642 (optinfo_wants_inlining_info_p): Likewise.
15643 * optinfo.h: Update comment.
15644 * profile-count.c (profile_quality_as_string): New function.
15645 * profile-count.h (profile_quality_as_string): New decl.
15646 (profile_count::quality): New accessor.
15647 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
15648 and optinfo_emit_json_cc_tests.
15649 * selftest.h (selftest::json_cc_tests): New decl.
15650 (selftest::optinfo_emit_json_cc_tests): New decl.
15651 * toplev.c: Include "optinfo-emit-json.h".
15652 (compile_file): Call optimization_records_finish.
15653 (do_compile): Call optimization_records_start.
15654 * tree-ssa-live.c: Include optinfo.h.
15655 (remove_unused_scope_block_p): Retain inlining information if
15656 optinfo_wants_inlining_info_p returns true.
15657
15658 2018-07-20 Richard Biener <rguenther@suse.de>
15659
15660 PR debug/86585
15661 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
15662 to cover -flto-partition=none.
15663
15664 2018-07-20 Martin Liska <mliska@suse.cz>
15665
15666 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
15667 (get_decl_source_range): Remove unused function.
15668
15669 2018-07-20 Richard Biener <rguenther@suse.de>
15670
15671 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
15672 (struct vn_phi_s): Likewise.
15673 (struct vn_reference_s): Likewise.
15674 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
15675 for searching the slot of an entry known to be in the hash itself.
15676 (vn_phi_hasher::equal): Likewise.
15677 (vn_reference_hasher::equal): Likewise.
15678 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
15679 globals.
15680 (optimistic_info, current_info): Remove, keeping only valid_info.
15681 (vn_reference_lookup_1): Remove fallback lookup.
15682 (vn_reference_lookup_2): Likewise.
15683 (vn_nary_op_lookup_1): Likewise.
15684 (vn_phi_lookup): Likewise.
15685 (vn_nary_build_or_lookup_1): Make sure to not chain the built
15686 hash element.
15687 (vn_reference_insert): Adjust, chain the inserted hash element
15688 at last_inserted_ref.
15689 (vn_reference_insert_pieces): Likewise.
15690 (visit_reference_op_call): Likewise.
15691 (vn_nary_op_insert_into): Chain the inserted hash element at
15692 last_inserted_nary.
15693 (vn_nary_op_insert_pieces): Adjust.
15694 (vn_nary_op_insert): Likewise.
15695 (vn_nary_op_insert_stmt): Likewise.
15696 (vn_phi_insert): Adjust, chain the inserted hash element at
15697 last_inserted_phi.
15698 (process_scc): Remove clearing and copying the optimistic
15699 table. Instead remove elements inserted during an optimistic
15700 iteration from the single table we maintain.
15701 (init_scc_vn): Adjust.
15702 (free_scc_vn): Likewise.
15703 (sccvn_dom_walker::record_cond): Likewise.
15704 (sccvn_dom_walker::after_dom_children): Likewise.
15705
15706 2018-07-19 Martin Sebor <msebor@redhat.com>
15707
15708 PR tree-optimization/84047
15709 PR tree-optimization/83776
15710 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
15711 (check_array_bounds): Call it.
15712
15713 2018-07-19 Martin Sebor <msebor@redhat.com>
15714
15715 * align.h (align_flags): Use member initialization.
15716
15717 2018-07-19 David Malcolm <dmalcolm@redhat.com>
15718
15719 * Makefile.in (OBJS): Add optinfo.o.
15720 * coretypes.h (class symtab_node): New forward decl.
15721 (struct cgraph_node): New forward decl.
15722 (class varpool_node): New forward decl.
15723 * dump-context.h: New file.
15724 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
15725 "tree-pass.h".
15726 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
15727 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
15728 (set_alt_dump_file): Likewise.
15729 (dump_context::~dump_context): New dtor.
15730 (dump_gimple_stmt): Move implementation to...
15731 (dump_context::dump_gimple_stmt): ...this new member function.
15732 Add the stmt to any pending optinfo, creating one if need be.
15733 (dump_gimple_stmt_loc): Move implementation to...
15734 (dump_context::dump_gimple_stmt_loc): ...this new member function.
15735 Start a new optinfo and add the stmt to it.
15736 (dump_gimple_expr): Move implementation to...
15737 (dump_context::dump_gimple_expr): ...this new member function.
15738 Add the stmt to any pending optinfo, creating one if need be.
15739 (dump_gimple_expr_loc): Move implementation to...
15740 (dump_context::dump_gimple_expr_loc): ...this new member function.
15741 Start a new optinfo and add the stmt to it.
15742 (dump_generic_expr): Move implementation to...
15743 (dump_context::dump_generic_expr): ...this new member function.
15744 Add the tree to any pending optinfo, creating one if need be.
15745 (dump_generic_expr_loc): Move implementation to...
15746 (dump_context::dump_generic_expr_loc): ...this new member
15747 function. Add the tree to any pending optinfo, creating one if
15748 need be.
15749 (dump_printf): Move implementation to...
15750 (dump_context::dump_printf_va): ...this new member function. Add
15751 the text to any pending optinfo, creating one if need be.
15752 (dump_printf_loc): Move implementation to...
15753 (dump_context::dump_printf_loc_va): ...this new member function.
15754 Start a new optinfo and add the stmt to it.
15755 (dump_dec): Move implementation to...
15756 (dump_context::dump_dec): ...this new member function. Add the
15757 value to any pending optinfo, creating one if need be.
15758 (dump_context::dump_symtab_node): New member function.
15759 (dump_context::get_scope_depth): New member function.
15760 (dump_context::begin_scope): New member function.
15761 (dump_context::end_scope): New member function.
15762 (dump_context::ensure_pending_optinfo): New member function.
15763 (dump_context::begin_next_optinfo): New member function.
15764 (dump_context::end_any_optinfo): New member function.
15765 (dump_context::s_current): New global.
15766 (dump_context::s_default): New global.
15767 (dump_scope_depth): Delete global.
15768 (dumpfile_ensure_any_optinfo_are_flushed): New function.
15769 (dump_symtab_node): New function.
15770 (get_dump_scope_depth): Reimplement in terms of dump_context.
15771 (dump_begin_scope): Likewise.
15772 (dump_end_scope): Likewise.
15773 (selftest::temp_dump_context::temp_dump_context): New ctor.
15774 (selftest::temp_dump_context::~temp_dump_context): New dtor.
15775 (selftest::verify_item): New function.
15776 (ASSERT_IS_TEXT): New macro.
15777 (ASSERT_IS_TREE): New macro.
15778 (ASSERT_IS_GIMPLE): New macro.
15779 (selftest::test_capture_of_dump_calls): New test.
15780 (selftest::dumpfile_c_tests): Call it.
15781 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
15782 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
15783 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
15784 descriptive comment.
15785 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
15786 (dump_node, dump_bb): Move these unrelated decls.
15787 (class dump_manager): Add leading comment.
15788 * optinfo.cc: New file.
15789 * optinfo.h: New file.
15790
15791 2018-07-19 Michael Collison <michael.collison@arm.com>
15792 Richard Henderson <rth@redhat.com>
15793
15794 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
15795 (subti): Handle op1 zero.
15796 (subvti4, usub4ti4): New.
15797 (*sub<GPI>3_compare1_imm): New.
15798 (sub<GPI>3_carryinCV): New.
15799 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
15800 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
15801
15802 2018-07-19 Michael Collison <michael.collison@arm.com>
15803 Richard Henderson <rth@redhat.com>
15804
15805 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
15806 (addti3): Create simpler code if low part is already known to be 0.
15807 (addvti4, uaddvti4): New.
15808 (*add<GPI>3_compareC_cconly_imm): New.
15809 (*add<GPI>3_compareC_cconly): New.
15810 (*add<GPI>3_compareC_imm): New.
15811 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
15812 handle constants within this pattern..
15813 (*add<GPI>3_compareV_cconly_imm): New.
15814 (*add<GPI>3_compareV_cconly): New.
15815 (*add<GPI>3_compareV_imm): New.
15816 (add<GPI>3_compareV): New.
15817 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
15818 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
15819 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
15820 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
15821 with 'comparison' operator.
15822 (*add<GPI>3_compareV_cconly_imm): Ditto.
15823 (*add<GPI>3_compareV_cconly): Ditto.
15824 (*add<GPI>3_compareV_imm): Ditto.
15825 (add<GPI>3_compareV): Ditto.
15826 (add<mode>3_carryinC): Ditto.
15827 (*add<mode>3_carryinC_zero): Ditto.
15828 (*add<mode>3_carryinC): Ditto.
15829 (add<mode>3_carryinV): Ditto.
15830 (*add<mode>3_carryinV_zero): Ditto.
15831 (*add<mode>3_carryinV): Ditto.
15832
15833 2018-07-19 Michael Collison <michael.collison@arm.com>
15834 Richard Henderson <rth@redhat.com>
15835
15836 * config/aarch64/aarch64-modes.def (CC_V): New.
15837 * config/aarch64/aarch64-protos.h
15838 (aarch64_addti_scratch_regs): Declare
15839 (aarch64_subvti_scratch_regs): Declare.
15840 (aarch64_expand_subvti): Declare.
15841 (aarch64_gen_unlikely_cbranch): Declare
15842 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
15843 for signed overflow using CC_Vmode.
15844 (aarch64_get_condition_code_1): Handle CC_Vmode.
15845 (aarch64_gen_unlikely_cbranch): New function.
15846 (aarch64_addti_scratch_regs): New function.
15847 (aarch64_subvti_scratch_regs): New function.
15848 (aarch64_expand_subvti): New function.
15849
15850 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
15851
15852 * config/aarch64/aarch64-option-extensions.def: New entry for profile
15853 extension.
15854 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
15855 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
15856 extension.
15857
15858 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
15859
15860 PR target/83009
15861 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15862 address check not strict.
15863
15864 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
15865
15866 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
15867 Umq with Umn.
15868 (store_pair_lanes<mode>): Likewise.
15869 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
15870 enum value 'ADDR_QUERY_LDP_STP_N'.
15871 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
15872 (aarch64_print_address_internal): Add declaration.
15873 (aarch64_print_ldpstp_address): Remove.
15874 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
15875 (aarch64_print_operand): Change printing of 'y'.
15876 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
15877 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
15878 'true' rather than '1'.
15879 * config/aarch64/constraints.md (Uml): Likewise.
15880 (Uml): Rename to Umn.
15881 (Umq): Remove.
15882
15883 2018-07-19 Richard Biener <rguenther@suse.de>
15884
15885 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
15886 a trailing array.
15887 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
15888 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
15889 (vn_reference_hasher): Likewise.
15890 (struct vn_tables_s): Remove obstack and alloc-pool members.
15891 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
15892 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
15893 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
15894 (vn_reference_insert_pieces): Likewise.
15895 (alloc_vn_nary_op_noinit): Adjust.
15896 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
15897 (vn_phi_eq): Adjust.
15898 (shared_lookup_phiargs): Remove.
15899 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
15900 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
15901 (visit_reference_op_call): Likewise.
15902 (copy_nary, copy_phi, copy_reference): Remove.
15903 (process_scc): Rewind the obstack when iterating. Do not
15904 copy the elements to valid_info but just move them from one
15905 hashtable to the other.
15906 (allocate_vn_table): Adjust.
15907 (free_vn_table): Likewise.
15908 (init_scc_vn): Likewise.
15909 (free_scc_vn): Likewise.
15910
15911 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
15912
15913 PR target/86560
15914 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
15915 indirect_return as function type attribute.
15916 (ix86_attribute_table): Change indirect_return to function
15917 type attribute.
15918 * doc/extend.texi: Update indirect_return attribute.
15919
15920 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
15921
15922 * wide-int.h (widest2_int): New.
15923 * gimple-fold.c (arith_overflowed_p): Use it.
15924 * tree.h (widest2_int_cst): New.
15925 * tree-vrp.c (wide_int_binop_overflow): Rename from
15926 vrp_int_const_binop.
15927 Rewrite to work on trees.
15928 (extract_range_from_multiplicative_op_1): Abstract code to...
15929 (wide_int_range_min_max): ...here.
15930 (wide_int_range_cross_product): ...and here.
15931 (extract_range_from_binary_expr_1): Abstract overflow code to...
15932 (wide_int_range_mult_wrapping): ...here.
15933 * tree-vrp.h (wide_int_range_cross_product): New.
15934 (wide_int_range_mult_wrapping): New.
15935
15936 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
15937 Julia Koval <julia.koval@intel.com>
15938
15939 * config/i386/x86-tune-costs.h (skylake_memcpy,
15940 skylake_memset): Replace rep_prefix with unrolling for size 512.
15941
15942 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
15943
15944 PR middle-end/86544
15945 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
15946 comparision with EQ_EXPR in last stmt.
15947
15948 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
15949
15950 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
15951 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
15952 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
15953 previously known as "PowerPC AltiVec Built-in Functions". Move
15954 some material to new subsubsections "PowerPC AltiVec Built-in
15955 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
15956 ISA 2.07".
15957 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
15958 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
15959 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
15960 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
15961
15962 2018-07-18 Richard Biener <rguenther@suse.de>
15963
15964 PR tree-optimization/86557
15965 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
15966 EXACT_DIV_EXPR.
15967
15968 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
15969
15970 * config/s390/s390.c (s390_function_profiler): Generate CFI.
15971
15972 2018-07-17 Jeff Law <law@redhat.com>
15973
15974 * config/arm/arm.c (get_label_padding): Update for recent
15975 changes to label_to_alignment.
15976
15977 PR tree-optimization/86010
15978 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
15979
15980 * config/mips/mips.c (vr4130_align_insns): Update for recent
15981 changes to label_to_alignment.
15982
15983 * config/frv/frv.c (frv_label_align): Update for recent changes
15984 to label_to_alignment.
15985
15986 * config/nios2/nios2.c (nios2_label_align): Update for recent
15987 changes which dropped ALIGN_LABELS_LOG.
15988
15989 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
15990
15991 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
15992 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
15993
15994 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
15995
15996 * config/arc/arc.c (arc_label_align): Use align_labels instead of
15997 deprecated align_labels_log.
15998
15999 2018-07-17 Richard Biener <rguenther@suse.de>
16000
16001 PR lto/86456
16002 * dwarf2out.c (init_sections_and_labels): Always generate
16003 a debug_line_str_section for early LTO debug.
16004 (dwarf2out_finish): Reset debug_line_str_hash output early.
16005 Bump counter for extra dwarf5 .debug_loc labels to not conflict
16006 with fat LTO part.
16007 (dwarf2out_early_finish): Output debug_line_str.
16008
16009 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16010
16011 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
16012 index register on z196 or later.
16013
16014 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16015
16016 * config/s390/s390.c (s390_default_align): Set default function
16017 alignment to 16.
16018 (s390_override_options_after_change): Call s390_default align.
16019 (s390_option_override_internal): Call s390_default_align.
16020 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
16021
16022 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16023
16024 PR middle-end/86542
16025 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
16026 to _looptemp_ clauses, other than the first two.
16027
16028 2018-07-17 Martin Liska <mliska@suse.cz>
16029
16030 * opts.c: Do not enable OPT_falign_* for -Os.
16031
16032 2018-07-17 Martin Liska <mliska@suse.cz>
16033
16034 * align.h (MAX_CODE_ALIGN): New.
16035 (MAX_CODE_ALIGN_VALUE): New.
16036 * common/config/i386/i386-common.c (ix86_handle_option):
16037 (MAX_CODE_ALIGN): Moved to align.h.
16038 * final.c (MAX_CODE_ALIGN): Likewise.
16039 * opts.c (parse_and_check_align_values):
16040 (MAX_CODE_ALIGN): Likewise.
16041 (MAX_CODE_ALIGN_VALUE): Likewise.
16042
16043 2018-07-17 Martin Liska <mliska@suse.cz>
16044
16045 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
16046 in order to fulfil coding style.
16047 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
16048 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16049 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
16050 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
16051 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
16052 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
16053 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
16054 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
16055 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16056
16057 2018-07-17 Martin Liska <mliska@suse.cz>
16058
16059 * align.h: New file.
16060 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
16061 directly.
16062 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
16063 align_flags of label_to_alignment.
16064 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
16065 align_flags class.
16066 * config/m68k/m68k.c: Do not use removed align_labels_value and
16067 align_loops_value.
16068 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
16069 (LOOP_ALIGN): Likewise.
16070 (LABEL_ALIGN): Likewise.
16071 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16072 Remove not used macro.
16073 (rs6000_loop_align): Change return type to align_flags.
16074 (rs6000_loop_align_max_skip): Remove.
16075 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
16076 Change return type to align_flags.
16077 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16078 Remove not used macro.
16079 (rs6000_loop_align): Change return type to align_flags.
16080 (rs6000_loop_align_max_skip): Remove.
16081 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
16082 * config/rx/rx-protos.h (rx_align_for_label): Make it
16083 static function.
16084 * config/rx/rx.c (rx_align_for_label): Change return type
16085 to align_flags.
16086 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
16087 macro definitions.
16088 into align_flags class.
16089 (LABEL_ALIGN): Likewise.
16090 (LOOP_ALIGN): Likewise.
16091 * config/s390/s390.c (s390_label_align): Use align_flags
16092 class member.
16093 (s390_asm_output_function_label): Likewise.
16094 * config/sh/sh.c (sh_override_options_after_change):
16095 Use align_flags class directly without macros.
16096 (find_barrier): Likewise.
16097 (barrier_align): Likewise.
16098 (sh_loop_align): Likewise.
16099 * config/spu/spu.c (spu_option_override):
16100 Use align_flags_tuple::get_value instead of removed macros.
16101 (spu_sched_init): Likewise.
16102 * config/spu/spu.h (GTY): Likewise.
16103 * config/visium/visium.c (visium_option_override):
16104 Set "8" as default secondary alignment.
16105 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
16106 in order to guarantee secondary alignment of 8.
16107 * coretypes.h: Include align.h header file.
16108 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
16109 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
16110 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
16111 * doc/tm.texi.in: Likewise.
16112 * final.c (struct label_alignment): Remove not used structure.
16113 (LABEL_ALIGN): Change type to align_flags.
16114 (LOOP_ALIGN): Likewise.
16115 (JUMP_ALIGN): Likewise.
16116 (default_loop_align_max_skip): Remove.
16117 (default_label_align_max_skip): Likewise.
16118 (default_jump_align_max_skip): Likewise.
16119 (default_label_align_after_barrier_max_skip):
16120 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
16121 (LABEL_TO_MAX_SKIP): Remove.
16122 (label_to_alignment): Return align_flags type instead of integer.
16123 (label_to_max_skip): Remove.
16124 (align_fuzz): Use align_flags type.
16125 (compute_alignments): Use align_flags type and use align_flags::max
16126 to combine multiple alignments.
16127 (grow_label_align): Grow vec instead of C array.
16128 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
16129 (shorten_branches): Use align_flags type and use align_flags::max
16130 to combine multiple alignments.
16131 (final_scan_insn_1): Remove usage of secondary alignment that comes
16132 from label alignment, but instead use proper secondary alignment
16133 which is computed in grow_label_align.
16134 * flags.h (struct align_flags_tuple): Move to align.h.
16135 (struct align_flags): Likewise.
16136 (state_align_loops): Rename to align_loops.
16137 (state_align_jumps): Rename to align_jumps.
16138 (state_align_labels): Rename to align_labels.
16139 (state_align_functions): Rename to align_functions.
16140 (align_loops_log): Remove.
16141 (align_jumps_log): Remove.
16142 (align_labels_log): Remove.
16143 (align_functions_log): Remove.
16144 (align_loops_max_skip): Remove.
16145 (align_jumps_max_skip): Remove.
16146 (align_labels_max_skip): Remove.
16147 (align_functions_max_skip): Remove.
16148 (align_loops_value): Remove.
16149 (align_jumps_value): Remove.
16150 (align_labels_value): Remove.
16151 (align_functions_value): Remove.
16152 * output.h (label_to_alignment): Change return type to align_flags.
16153 (label_to_max_skip): Remove.
16154 * target.def: Remove loop_align_max_skip, label_align_max_skip,
16155 jump_align_max_skip macros.
16156 * targhooks.h (default_loop_align_max_skip): Remove.
16157 (default_label_align_max_skip): Likewise.
16158 (default_jump_align_max_skip): Likewise.
16159 (default_label_align_after_barrier_max_skip): Remove.
16160 * toplev.c (read_log_maxskip): Use ::normalize function.
16161 (parse_N_M): Remove not used argument and also call ::normalize.
16162 (parse_alignment_opts): Do not pass unused arguments.
16163 * varasm.c (assemble_start_function): Use directly align_functions
16164 instead of removed macros.
16165 * system.h: Do not poison removed macros.
16166
16167 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16168
16169 PR middle-end/86539
16170 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
16171 and cond temporaries don't have reference type if iterator has
16172 pointer type. For init use &for_pre_body instead of pre_p if
16173 for_pre_body is non-empty.
16174
16175 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16176
16177 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
16178 double-double modes to SFmode directly directly.
16179 (trunc<mode>sf2_fprs): Delete.
16180
16181 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16182
16183 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
16184 for conversions between IFmode and the decimal floating point modes.
16185 (init_float128_ieee): Use the correct names for conversions between
16186 KFmode and the decimal floating point modes.
16187
16188 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16189
16190 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
16191 for the conversions between TDmode and IFmode.
16192 (init_float128_ieee): Use more correct names for the conversions
16193 between TDmode and KFmode.
16194
16195 2018-07-16 Jakub Jelinek <jakub@redhat.com>
16196
16197 PR tree-optimization/86526
16198 * builtins.c (expand_builtin_memcmp): Formatting fixes.
16199 (inline_expand_builtin_string_cmp): Likewise.
16200 (inline_string_cmp): Likewise. Use c_readstr instead of
16201 builtin_memcpy_read_str. Add unit_mode temporary.
16202
16203 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
16204
16205 PR middle-end/86528
16206 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
16207 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
16208
16209 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16210
16211 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
16212 Alphabetize prototypes of built-in functions, separating out
16213 built-in functions that are listed in this section but should be
16214 described elsewhere.
16215
16216 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
16217
16218 PR target/86511
16219 * expmed.c (emit_store_flag): Do not emit setcc followed by a
16220 conditional move when trapping comparison was split to a
16221 non-trapping one (and vice versa).
16222
16223 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16224
16225 * config/s390/s390.c (s390_function_profiler): Generate nops
16226 instead of profiler call sequences.
16227 * config/s390/s390.opt: Add the new option.
16228
16229 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16230
16231 * config/s390/s390.c (s390_function_profiler): Generate
16232 __mcount_loc section.
16233 * config/s390/s390.opt: Add the new option.
16234
16235 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16236
16237 * common.opt: Add the new warning.
16238 * config/s390/s390.c (s390_function_profiler): Emit "brasl
16239 %r0,__fentry__" when -mfentry is specified.
16240 (s390_option_override_internal): Disallow -mfentry for 31-bit
16241 CPUs.
16242 * config/s390/s390.opt: Add the new option.
16243
16244 2018-07-16 Richard Biener <rguenther@suse.de>
16245
16246 PR lto/86523
16247 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
16248 for function-local FUNCTION_DECL and RESULT_DECL immediately.
16249
16250 2018-07-16 Martin Liska <mliska@suse.cz>
16251
16252 PR ipa/86529
16253 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
16254 to ::get_create.
16255
16256 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16257
16258 * config/arc/arcHS.md: Update ARCHS scheduling rules.
16259
16260 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16261
16262 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
16263 for ARCHS4x.
16264 * config/arc/arc-cpus.def (hs4x): New cpu.
16265 (hs4xd): Likewise.
16266 * config/arc/arc-tables.opt: Regenerate.
16267 * config/arc/arc.c (arc_sched_issue_rate): New function.
16268 (TARGET_SCHED_ISSUE_RATE): Define.
16269 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
16270 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
16271 fpu_cvt.
16272 (attr tune): Add ARCHS4x tune values.
16273 (attr tune_dspmpy): Define.
16274 (*tst): Correct instruction type.
16275 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
16276 * config/arc/arcHS4x.md: New file.
16277 * config/arc/fpu.md: Update instruction type attributes.
16278 * config/arc/t-multilib: Regenerate.
16279
16280 2018-07-16 Tom de Vries <tdevries@suse.de>
16281
16282 PR debug/86455
16283 * var-tracking.c (vt_initialize): Fix pre_dec handling.
16284
16285 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16286
16287 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
16288 early clobber.
16289
16290 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
16291
16292 PR tree-optimization/86514
16293 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
16294 conversion to a boolean type from a type with greater precision.
16295
16296 2018-07-16 Tom de Vries <tdevries@suse.de>
16297
16298 * var-tracking.c (vt_initialize): Print adjusted insn slim if
16299 dump_flags request TDF_SLIM.
16300
16301 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
16302
16303 * fold-const.c (int_const_binop_1): Abstract...
16304 (wide_int_binop): ...wide int code here.
16305 (poly_int_binop): ...poly int code here.
16306 Abstract the rest of int_const_binop_1 into int_const_binop.
16307 * fold-const.h (wide_int_binop): New.
16308 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
16309 Remove useless PLUS/MINUS_EXPR case.
16310 (zero_nonzero_bits_from_vr): Move wide int code...
16311 (zero_nonzero_bits_from_bounds): ...here.
16312 (extract_range_from_binary_expr_1): Move mask optimization code...
16313 (range_easy_mask_min_max): ...here.
16314 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
16315 (range_easy_mask_min_max): New.
16316
16317 2018-07-15 Jeff Law <law@redhat.com>
16318
16319 PR target/85993
16320 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
16321 block.
16322
16323 2018-07-14 Jim Wilson <jimw@sifive.com>
16324
16325 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
16326
16327 2018-07-14 Paul Koning <ni1d@arrl.net>
16328
16329 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
16330
16331 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
16332
16333 * lto-streamer-out.c (copy_function_or_variable): Dump info about
16334 copying section.
16335
16336 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
16337 Steve Munroe <munroesj52@gmail.com>
16338
16339 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
16340 (_mm_andnot_si128): Likewise.
16341 (_mm_or_si128): Likewise.
16342 (_mm_xor_si128): Likewise.
16343
16344 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
16345
16346 PR middle-end/78809
16347 * builtins.c (expand_builtin_memcmp): Inline the calls first
16348 when result_eq is false.
16349 (expand_builtin_strcmp): Inline the calls first.
16350 (expand_builtin_strncmp): Likewise.
16351 (inline_string_cmp): New routine. Expand a string compare
16352 call by using a sequence of char comparison.
16353 (inline_expand_builtin_string_cmp): New routine. Inline expansion
16354 a call to str(n)cmp/memcmp.
16355 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
16356 New option.
16357 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
16358
16359 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
16360
16361 * config/arm/driver-arm.c: Include arm-native.h.
16362 (host_detect_local_cpu): Use auto-generated data tables.
16363 (vendors, arm_cpu_table): Delete. Move part information to ...
16364 * config/arm/arm-cpus.in: ... here.
16365 * config/arm/parsecpu.awk (gen_native): New function.
16366 (vendor, part): New CPU fields.
16367 (END): Add support for building the native CPU detection tables.
16368 * config/arm/t-arm (arm-native.h): Add build rule.
16369 (driver-arm.o): Add dependency on arm-native.h.
16370
16371 2018-07-13 Richard Biener <rguenther@suse.de>
16372
16373 PR middle-end/85974
16374 * match.pd (addr1 - addr2): Allow either of the operand to
16375 have a conversion.
16376
16377 2018-07-13 Tom de Vries <tdevries@suse.de>
16378
16379 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
16380 in remap_ssa_name.
16381
16382 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
16383
16384 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
16385 arrays instead of numbered variables.
16386
16387 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
16388
16389 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
16390 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
16391
16392 2018-07-13 Richard Biener <rguenther@suse.de>
16393
16394 PR debug/86452
16395 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
16396 instead of get_context_die.
16397
16398 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
16399 Richard Biener <rguenther@suse.de>
16400
16401 PR middle-end/86489
16402 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
16403 that the loop latch destination where phi is defined.
16404
16405 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
16406
16407 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
16408 (riscv_expand_epilogue): Add assertion to check interrupt mode.
16409 (riscv_set_current_function): Extract getting interrupt type to new
16410 function.
16411 (riscv_get_interrupt_type): New function.
16412 (riscv_merge_decl_attributes): New function, checking interrupt type is
16413 same.
16414 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
16415
16416 2018-07-12 Paul Koning <ni1d@arrl.net>
16417
16418 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
16419 directive.
16420
16421 2018-07-12 Paul Koning <ni1d@arrl.net>
16422
16423 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
16424 zero reference, add doloop_end instead.
16425 * doc/md.texi (decrement_and_branch_until_zero): Remove.
16426 (Looping patterns): Remove decrement_and_branch_until_zero. Add
16427 detail for doloop_end.
16428
16429 2018-07-12 Martin Sebor <msebor@redhat.com>
16430
16431 PR c/86453
16432 * attribs.c (decl_attributes): Reject conflicting attributes before
16433 calling attribute handlers.
16434
16435 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16436
16437 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
16438 parameter.
16439 (gcc::dump_manager::get_dump_file_name): likewise.
16440 (dump_begin): Likewise.
16441 * dumpfile.h (dump_begin): Update prototype.
16442 (gcc::dump_manager::get_dump_file_name,
16443 gcc::dump_manager::get_dump_file_name): Update prototype.
16444
16445 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16446
16447 * internal-fn.h (vectorizable_internal_fn_p): New function.
16448 * tree-vect-slp.c (compatible_calls_p): Likewise.
16449 (vect_build_slp_tree_1): Remove nops argument. Handle calls
16450 to internal functions.
16451 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
16452
16453 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16454
16455 * fold-const.h (inverse_conditions_p): Declare.
16456 * fold-const.c (inverse_conditions_p): New function.
16457 * match.pd: Use inverse_conditions_p. Add folds of view_converts
16458 that test the inverse condition of a conditional internal function.
16459 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
16460 * internal-fn.c (internal_fn_mask_index): Handle conditional
16461 internal functions.
16462 (vectorized_internal_fn_supported_p): New function.
16463 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
16464 (any_pred_load_store): Replace with...
16465 (need_to_predicate): ...this new variable.
16466 (redundant_ssa_names): New variable.
16467 (ifcvt_can_use_mask_load_store): Move initial checks to...
16468 (ifcvt_can_predicate): ...this new function. Handle tree codes
16469 for which a conditional internal function exists.
16470 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
16471 instead of ifcvt_can_use_mask_load_store. Update after variable
16472 name change.
16473 (predicate_load_or_store): New function, split out from
16474 predicate_mem_writes.
16475 (check_redundant_cond_expr): New function.
16476 (value_available_p): Likewise.
16477 (predicate_rhs_code): Likewise.
16478 (predicate_mem_writes): Rename to...
16479 (predicate_statements): ...this. Use predicate_load_or_store
16480 and predicate_rhs_code.
16481 (combine_blocks, tree_if_conversion): Update after above name changes.
16482 (ifcvt_local_dce): Handle redundant_ssa_names.
16483 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
16484 general conditional functions.
16485 * tree-vect-stmts.c (vectorizable_call): Likewise.
16486
16487 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16488 Alan Hayward <alan.hayward@arm.com>
16489 David Sherwood <david.sherwood@arm.com>
16490
16491 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
16492 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
16493 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
16494 plus and minus and convert them into IFN_COND_FMA-based sequences.
16495 (convert_mult_to_fma): Handle conditional plus and minus.
16496
16497 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16498
16499 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
16500 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
16501 (cond_fnms_optab): New optabs.
16502 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
16503 internal functions.
16504 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
16505 * internal-fn.h (get_conditional_internal_fn): Declare.
16506 (get_unconditional_internal_fn): Likewise.
16507 * internal-fn.c (cond_ternary_direct): New macro.
16508 (expand_cond_ternary_optab_fn): Likewise.
16509 (direct_cond_ternary_optab_supported_p): Likewise.
16510 (FOR_EACH_COND_FN_PAIR): Likewise.
16511 (get_conditional_internal_fn): New function.
16512 (get_unconditional_internal_fn): Likewise.
16513 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
16514 (gimple_match_op::gimple_match_op): Add a new overload for 5
16515 operands.
16516 (gimple_match_op::set_op): Likewise.
16517 (gimple_resimplify5): Declare.
16518 * genmatch.c (decision_tree::gen): Generate simplifications for
16519 5 operands.
16520 * gimple-match-head.c (gimple_simplify): Define an overload for
16521 5 operands. Handle calls with 5 arguments in the top-level overload.
16522 (convert_conditional_op): Handle conversions from unconditional
16523 internal functions to conditional ones.
16524 (gimple_resimplify5): New function.
16525 (build_call_internal): Pass a fifth operand.
16526 (maybe_push_res_to_seq): Likewise.
16527 (try_conditional_simplification): Try converting conditional
16528 internal functions to unconditional internal functions.
16529 Handle 3-operand unconditional forms.
16530 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
16531 Define ternary equivalents of the current rules for binary conditional
16532 internal functions.
16533 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
16534 ternary operations.
16535 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
16536 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
16537 (optab): Handle them.
16538 (SVE_COND_FP_TERNARY): New int iterator.
16539 (sve_fmla_op, sve_fmad_op): New int attributes.
16540 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
16541 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
16542 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
16543
16544 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16545
16546 * target.def (preferred_else_value): New target hook.
16547 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
16548 * doc/tm.texi: Regenerate.
16549 * targhooks.h (default_preferred_else_value): Declare.
16550 * targhooks.c (default_preferred_else_value): New function.
16551 * internal-fn.h (conditional_internal_fn_code): Declare.
16552 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
16553 (get_conditional_internal_fn): Use it.
16554 (conditional_internal_fn_code): New function.
16555 * gimple-match.h (gimple_match_cond): New struct.
16556 (gimple_match_op): Add a cond member function.
16557 (gimple_match_op::gimple_match_op): Update all forms to take a
16558 gimple_match_cond.
16559 * genmatch.c (expr::gen_transform): Use the same condition as res_op
16560 for the suboperation, but don't specify a particular else_value.
16561 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
16562 (visit_nary_op, visit_reference_op_load): Pass
16563 gimple_match_cond::UNCOND to the gimple_match_op constructor.
16564 * gimple-match-head.c: Include tree-eh.h
16565 (convert_conditional_op): New function.
16566 (maybe_resimplify_conditional_op): Likewise.
16567 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
16568 (gimple_resimplify2): Likewise.
16569 (gimple_resimplify3): Likewise.
16570 (gimple_resimplify4): Likewise.
16571 (maybe_push_res_to_seq): Return null for conditional operations.
16572 (try_conditional_simplification): New function.
16573 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
16574 constructor.
16575 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
16576 IFN_COND_* call.
16577 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
16578 function.
16579 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
16580
16581 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16582
16583 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16584 DECL_FCONTEXT
16585 (hash_tree): Do not hash DECL_FCONTEXT
16586 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
16587 Do not stream DECL_FCONTEXT.
16588 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
16589 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
16590
16591 2018-07-12 Richard Biener <rguenther@suse.de>
16592
16593 PR debug/86462
16594 * dwarf2out.c (gen_block_die): Only output blocks when they have
16595 at least one !DECL_IGNORED_P variable.
16596
16597 2018-07-12 Richard Biener <rguenther@suse.de>
16598
16599 PR target/84829
16600 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
16601 Remove -mieee-fp handling.
16602
16603 2018-07-12 Richard Biener <rguenther@suse.de>
16604
16605 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
16606 left-over from last patch.
16607
16608 2018-07-12 Jakub Jelinek <jakub@redhat.com>
16609
16610 PR tree-optimization/86492
16611 * gimple-ssa-store-merging.c
16612 (imm_store_chain_info::coalesce_immediate_stores): Call
16613 check_no_overlap even for the merge_overlapping case. Formatting fix.
16614
16615 2018-07-12 Richard Biener <rguenther@suse.de>
16616
16617 PR middle-end/86479
16618 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
16619 move possibly trapping operations into the conditional.
16620
16621 2018-07-12 Richard Biener <rguenther@suse.de>
16622
16623 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
16624 (vn_lookup_simplify_result): Remove recursion limit applied
16625 here.
16626 (vn_nary_build_or_lookup_1): Adjust.
16627 (try_to_simplify): Likewise.
16628 * gimple-match-head.c (gimple_resimplify1): Instead apply one
16629 here.
16630 (gimple_resimplify2): Likewise.
16631 (gimple_resimplify3): Likewise.
16632 (gimple_resimplify4): Likewise.
16633
16634 2018-07-11 Jakub Jelinek <jakub@redhat.com>
16635
16636 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
16637 Use __mmask64 type instead of __mmask8 for __M argument.
16638 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
16639 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
16640 __U argument.
16641 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
16642 __mmask16 for __M argument.
16643 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
16644 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
16645 to __mmask16 instead of __mmask8.
16646 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
16647 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
16648 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
16649 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
16650 instead of __mmask16 for __U argument.
16651 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
16652 __mmask16 instead of __mmask8 for __U argument.
16653 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
16654 __U argument.
16655 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
16656 __mmask16.
16657 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
16658 argument.
16659 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
16660 __U argument.
16661 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
16662 __mmask16.
16663 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
16664 of __mmask16.
16665 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
16666 __U argument.
16667 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
16668 __U argument.
16669 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
16670 __U argument.
16671 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
16672 __U argument.
16673 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
16674 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
16675 return type as well as __M argument type and all casts from __mmask8
16676 to __mmask32.
16677 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
16678 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
16679 return type as well as __M argument type and all casts from __mmask8
16680 to __mmask16.
16681 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
16682 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
16683 return type as well as __M argument type and all casts from __mmask8
16684 to __mmask32.
16685 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
16686 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
16687 return type as well as __M argument type and all casts from __mmask8
16688 to __mmask16.
16689 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
16690 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
16691 __mmask16.
16692
16693 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
16694
16695 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
16696 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
16697 for __U argument.
16698
16699 2018-07-11 Paul Koning <ni1d@arrl.net>
16700
16701 * doc/md.texi (define_subst): Document how multiple occurrences of
16702 the same argument in the replacement pattern are handled.
16703
16704 2018-07-11 Paul Koning <ni1d@arrl.net>
16705
16706 * doc/extend.texi (Common Variable Attributes): Move "mode" into
16707 alphabetical order.
16708 (Common Type Attributes): Add "mode" attribute.
16709
16710 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
16711
16712 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
16713 stream DECL_ORIGINAL_TYPE.
16714 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
16715 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
16716 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
16717 Do not walk original type.
16718 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
16719 external decls.
16720 (write_ts_decl_non_common_tree_pointers): Do not stream
16721 DECL_ORIGINAL_TYPE
16722 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
16723 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
16724
16725 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16726
16727 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
16728 thread twice from the same starting edge.
16729
16730 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16731
16732 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
16733 * gimple.c (gimple_call_nonnull_result_p): ...here...
16734 (gimple_call_nonnull_arg): ...and here.
16735 * gimple.h (gimple_call_nonnull_result_p): New.
16736 (gimple_call_nonnull_arg): New.
16737
16738 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
16739
16740 * config/arm/arm-cpus.in: Move information from fpu field of each
16741 cpu definition to the isa field.
16742 * config/arm/parsecpu.awk (fpu): Delete match rule.
16743 (gen_comm_data): Don't add bits from the CPU's FPU entry.
16744
16745 2018-07-11 Richard Biener <rguenther@suse.de>
16746
16747 PR debug/86457
16748 * dwarf2out.c (init_sections_and_labels): Use
16749 output_asm_line_debug_info consistently.
16750 (dwarf2out_early_finish): Likewise.
16751 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
16752 type units.
16753
16754 2018-07-11 Richard Biener <rguenther@suse.de>
16755
16756 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
16757 Rework father_bb setting in a way to avoid propagating constants
16758 multiple times on a loop body.
16759
16760 2018-07-10 Mark Wielaard <mark@klomp.org>
16761
16762 PR debug/86459
16763 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
16764
16765 2018-07-10 Richard Biener <rguenther@suse.de>
16766
16767 * hash-map.h (hash_map::iterator::operator*): Return
16768 references to key and value.
16769
16770 2018-07-10 Jakub Jelinek <jakub@redhat.com>
16771
16772 PR c++/86443
16773 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
16774 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
16775 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
16776 (gimplify_omp_for): For composite loops, move outer
16777 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
16778 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
16779 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
16780 TREE_LIST for both the original class iterator and the "last" helper
16781 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
16782 loop, remember has_decl_expr from outer composite loops for the
16783 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
16784
16785 2018-07-09 Martin Sebor <msebor@redhat.com>
16786
16787 PR middle-end/77357
16788 PR middle-end/86428
16789 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
16790 accessing implicitly initialized array elements.
16791 * expr.c (string_constant): Handle string initializers of
16792 character arrays within aggregates.
16793 * gimple-fold.c (fold_array_ctor_reference): Add argument.
16794 Store element offset. As a special case, handle zero size.
16795 (fold_nonarray_ctor_reference): Same.
16796 (fold_ctor_reference): Add argument. Store subobject offset.
16797 * gimple-fold.h (fold_ctor_reference): Add argument.
16798
16799 2018-07-09 Paul Koning <ni1d@arrl.net>
16800
16801 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
16802 (pdp11_insn_cost): New function.
16803 (pdp11_md_asm_adjust): New function.
16804 (TARGET_INVALID_WITHIN_DOLOOP): Define.
16805 (pdp11_rtx_costs): Update to match machine better.
16806 (output_addr_const_pdp11): Correct format mismatch warnings.
16807 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
16808 * config/pdp11/pdp11.md: General change to add base_cost and/or
16809 length attributes for use by new pdp11_insn_cost function.
16810 (MIN_BRANCH): Correct definition.
16811 (MIN_SOB): Ditto.
16812 (doloop_end): Use standard pattern name for looping pattern.
16813 (doloop_end_nocc): New.
16814 (movsf): Add another constraint alternative.
16815 (zero_extendqihi2): Add constraint alternatives for not in place
16816 extend.
16817 (zero_extendhisi2): Remove.
16818 (shift patterns): Add CC handling variants.
16819 (bswaphi2): New.
16820 (bswapsi2): New.
16821 (rothi3): New.
16822 (define_peephole2): New peephole to recognize mov that sets CC for
16823 subsequent test.
16824
16825 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16826
16827 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
16828 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
16829 wi::add.
16830
16831 2018-07-09 Jakub Jelinek <jakub@redhat.com>
16832
16833 PR c/86420
16834 * real.c (real_nextafter): Return true if result is denormal.
16835
16836 2018-07-09 Martin Liska <mliska@suse.cz>
16837
16838 * common.opt: Add back wrongly removed attribute.
16839
16840 2018-07-09 Richard Biener <rguenther@suse.de>
16841
16842 PR debug/86413
16843 * dwarf2out.c (gen_block_die): For an early generated DIE
16844 always output high/low PC attributes.
16845
16846 2018-07-09 Tom de Vries <tdevries@suse.de>
16847
16848 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
16849 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
16850 onto VAR_DECL with abstract origin.
16851
16852 2018-07-07 Jim Wilson <jimw@sifive.com>
16853
16854 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
16855
16856 2018-07-07 Tom de Vries <tdevries@suse.de>
16857
16858 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
16859
16860 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
16861
16862 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
16863 overflow_type.
16864 (combine_bound): Use wide-int overflow calculation instead of
16865 rolling our own.
16866 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
16867 overflow_type.
16868 * fold-const.c (int_const_binop_2): Same.
16869 (extract_muldiv_1): Same.
16870 (fold_div_compare): Same.
16871 (fold_abs_const): Same.
16872 * match.pd: Same.
16873 * poly-int.h (add): Same.
16874 (sub): Same.
16875 (neg): Same.
16876 (mul): Same.
16877 * predict.c (predict_iv_comparison): Same.
16878 * profile-count.c (slow_safe_scale_64bit): Same.
16879 * simplify-rtx.c (simplify_const_binary_operation): Same.
16880 * tree-chrec.c (tree_fold_binomial): Same.
16881 * tree-data-ref.c (split_constant_offset_1): Same.
16882 * tree-if-conv.c (idx_within_array_bound): Same.
16883 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
16884 * tree-ssa-phiopt.c (minmax_replacement): Same.
16885 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
16886 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
16887 * vr-values.c (vr_values::adjust_range_with_scev): Same.
16888 * wide-int.cc (wi::add_large): Same.
16889 (wi::mul_internal): Same.
16890 (wi::sub_large): Same.
16891 (wi::divmod_internal): Same.
16892 * wide-int.h: Change overflow type to overflow_type for neg, add,
16893 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
16894 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
16895 mul_internal, divmod_internal.
16896 (overflow_type): New enum.
16897 (accumulate_overflow): New.
16898
16899 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
16900
16901 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
16902 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
16903
16904 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
16905
16906 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
16907 argument is checked for zero before entering loop, avoid checking again.
16908
16909 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
16910
16911 * gimplify.h (generic_expr_could_trap_p): Set as global function.
16912 * gimplify.h (generic_expr_could_trap_p): Likwise.
16913 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
16914
16915 2018-07-06 Jakub Jelinek <jakub@redhat.com>
16916
16917 PR tree-optimization/86401
16918 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
16919 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
16920 (fold_bit_and_mask): ... here. New helper function for match.pd.
16921 * fold-const.h (fold_bit_and_mask): Declare.
16922 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
16923
16924 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
16925
16926 PR target/86324
16927 * target.def (translate_mode_attribute): New hook.
16928 * targhooks.h (default_translate_mode_attribute): Declare.
16929 * targhooks.c (default_translate_mode_attribute): New function.
16930 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
16931 * doc/tm.texi: Regenerate.
16932 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
16933 (rs6000_translate_mode_attribute): New function.
16934
16935 2018-07-06 Paul Koning <ni1d@arrl.net>
16936
16937 * doc/md.texi (define_split): Document DONE and FAIL.
16938 (define_peephole2): Ditto.
16939
16940 2018-07-05 Jeff Law <law@redhat.com>
16941
16942 PR tree-optimization/86010
16943 * tree-ssa-dse.c (compute_trims): More aggressively trim at
16944 both the head and tail of mem* and str* calls.
16945
16946 2018-07-05 Jim Wilson <jimw@sifive.com>
16947
16948 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
16949
16950 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
16951
16952 * config/aarch64/aarch64-simd.md: correct flags text for
16953 MIN_EXPR replacement.
16954
16955 2018-07-05 James Clarke <jrtc27@jrtc27.com>
16956
16957 * configure: Regenerated.
16958
16959 2018-07-05 Carl Love <cel@us.ibm.com>
16960
16961 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
16962 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
16963 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
16964 VSX_BUILTIN_DOUBLEL_V4SF.
16965
16966 2018-07-05 Martin Sebor <msebor@redhat.com>
16967
16968 PR c++/86400
16969 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
16970 than its domain to compute its the upper bound of a char array.
16971
16972 2018-07-05 Nathan Sidwell <nathan@acm.org>
16973
16974 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
16975 * doc/cpp.texi: Update comment.
16976 * doc/tm.texi: Rebuilt.
16977 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
16978 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
16979 * doc/extend.texi (Backwards Compatibility): Clarify it is system
16980 headers affected by extern "C".
16981 * system.h: Poison NO_IMPLICIT_EXTERN_C.
16982 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
16983 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
16984 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
16985 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
16986 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
16987 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
16988 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
16989 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
16990 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
16991 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
16992 config/sparc/sp64-elf.h, config/spu/spu.h,
16993 config/stormy16/stormy16.h, config/v850/v850.h,
16994 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
16995 define NO_IMPLICIT_EXTERN_C.
16996 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
16997
16998 2018-07-05 Tamar Christina <tamar.christina@arm.com>
16999
17000 PR target/84711
17001 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17002 instead of GET_MODE_SIZE when comparing Units.
17003
17004 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17005
17006 PR target/84711
17007 * rtlanal.c (set_noop_p): Constrain on mode change,
17008 include hard-reg-set.h
17009
17010 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17011
17012 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
17013
17014 2018-07-05 Jakub Jelinek <jakub@redhat.com>
17015
17016 Revert
17017 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17018
17019 PR sanitizer/84250
17020 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17021 libasan.
17022 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17023
17024 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17025
17026 PR sanitizer/84250
17027 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17028 libasan.
17029 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17030
17031 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
17032
17033 PR middle-end/86380
17034 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
17035
17036 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
17037
17038 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
17039 neg_*_op* variables.
17040
17041 2018-07-04 Martin Liska <mliska@suse.cz>
17042
17043 * tree-switch-conversion.c: Define
17044 max_ratio_for_speed and max_ratio_for_size constants.
17045
17046 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17047 Martin Liska <mliska@suse.cz>
17048
17049 PR middle-end/66240
17050 PR target/45996
17051 PR c/84100
17052 * common.opt: Rename align options with 'str_' prefix.
17053 * common/config/i386/i386-common.c (set_malign_value): New
17054 function.
17055 (ix86_handle_option): Use it to set -falign-* options/
17056 * config/aarch64/aarch64-protos.h (struct tune_params): Change
17057 type from int to string.
17058 * config/aarch64/aarch64.c: Update default values from int
17059 to string.
17060 * config/alpha/alpha.c (alpha_override_options_after_change):
17061 Likewise.
17062 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
17063 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17064 max skip conditionally.
17065 * config/i386/freebsd.h (SUBALIGN_LOG): New.
17066 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17067 max skip conditionally.
17068 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17069 max skip conditionally.
17070 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
17071 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17072 max skip conditionally.
17073 * config/i386/i386.c (struct ptt): Change type from int to
17074 string.
17075 (ix86_default_align): Set default values.
17076 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
17077 max skip conditionally.
17078 * config/i386/iamcu.h (SUBALIGN_LOG): New.
17079 (ASM_OUTPUT_MAX_SKIP_ALIGN):
17080 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
17081 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17082 max skip conditionally.
17083 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
17084 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
17085 * config/i386/x86-64.h (SUBALIGN_LOG): New.
17086 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17087 max skip conditionally.
17088 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17089 * config/ia64/ia64.c (ia64_option_override): Set default values
17090 for alignment options.
17091 * config/m68k/m68k.c: Handle new str_align_* options.
17092 * config/mips/mips.c (mips_set_compression_mode): Change
17093 type of constants.
17094 (mips_option_override): Set default values for options.
17095 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
17096 Likewise.
17097 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17098 Likewise.
17099 * config/rx/rx.c (rx_option_override): Likewise.
17100 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
17101 (LABEL_ALIGN): Use align_labels_log.
17102 (LOOP_ALIGN): Use align_loops_align.
17103 * config/s390/s390.c (s390_asm_output_function_label): Use new
17104 macros.
17105 * config/sh/sh.c (sh_override_options_after_change):
17106 Change type of constants.
17107 * config/spu/spu.c (spu_sched_init): Likewise.
17108 * config/sparc/sparc.c (sparc_option_override): Set default
17109 values for options.
17110 * config/visium/visium.c (visium_option_override): Likewise.
17111 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
17112 emit p2align format with last argument if it's not needed.
17113 * doc/invoke.texi: Document extended format of -falign-*.
17114 * final.c: Use align_labels alignment.
17115 * flags.h (struct target_flag_state): Change type to use
17116 align_flags.
17117 (struct align_flags_tuple): New.
17118 (struct align_flags): Likewise.
17119 (align_loops_log): Redefine macro to use new types.
17120 (align_loops_max_skip): Redefine macro to use new types.
17121 (align_jumps_log): Redefine macro to use new types.
17122 (align_jumps_max_skip): Redefine macro to use new types.
17123 (align_labels_log): Redefine macro to use new types.
17124 (align_labels_max_skip): Redefine macro to use new types.
17125 (align_functions_log): Redefine macro to use new types.
17126 (align_loops): Redefine macro to use new types.
17127 (align_jumps): Redefine macro to use new types.
17128 (align_labels): Redefine macro to use new types.
17129 (align_functions): Redefine macro to use new types.
17130 (align_functions_max_skip): Redefine macro to use new types.
17131 (align_loops_value): New macro.
17132 (align_jumps_value): New macro.
17133 (align_labels_value): New macro.
17134 (align_functions_value): New macro.
17135 * function.c (invoke_set_current_function_hook): Propagate
17136 alignment values from flags to global variables default in
17137 topleev.h.
17138 * ipa-icf.c (sem_function::equals_wpa): Use
17139 cl_optimization_option_eq instead of memcmp.
17140 * lto-streamer.h (cl_optimization_stream_out): Support streaming
17141 of string types.
17142 (cl_optimization_stream_in): Likewise.
17143 * optc-save-gen.awk: Support strings in cl_optimization.
17144 * opth-gen.awk: Likewise.
17145 * opts.c (finish_options): Remove error checking of invalid
17146 value ranges.
17147 (MAX_CODE_ALIGN): Remove.
17148 (MAX_CODE_ALIGN_VALUE): Likewise.
17149 (parse_and_check_align_values): New function.
17150 (check_alignment_argument): Likewise.
17151 (common_handle_option): Use check_alignment_argument.
17152 * opts.h (parse_and_check_align_values): Declare.
17153 * toplev.c (init_alignments): Remove.
17154 (read_log_maxskip): New.
17155 (parse_N_M): Likewise.
17156 (parse_alignment_opts): Likewise.
17157 (backend_init_target): Remove usage of init_alignments.
17158 * toplev.h (parse_alignment_opts): Declare.
17159 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
17160 argument.
17161 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
17162 * tree.c (cl_option_hasher::equal): New.
17163 * varasm.c: Use new global macros.
17164
17165 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17166
17167 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
17168 Use a simpler align directive also if MAXSKIP = ALIGN-1.
17169 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17170 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17171 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17172 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17173 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
17174 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
17175 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
17176 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17177 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17178 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17179 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17180
17181 2018-07-04 Martin Liska <mliska@suse.cz>
17182 Jonathan Wakely <jwakely@redhat.com>
17183
17184 * coverage.c: Use correct type.
17185 * doc/invoke.texi: Language correction.
17186
17187 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
17188
17189 PR target/85620
17190 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
17191 ENDBRANCH for non-tail call which may return via indirect branch.
17192 * doc/extend.texi: Document indirect_return attribute.
17193
17194 2018-07-03 Martin Sebor <msebor@redhat.com>
17195
17196 PR tree-optimization/86274
17197 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
17198 precondition.
17199 (format_floating): Correct handling of infinities and NaNs.
17200
17201 2018-07-03 Martin Sebor <msebor@redhat.com>
17202
17203 * print-tree.c (print_real_cst): New function.
17204 (print_node_brief): Call it.
17205 (print_node): Ditto.
17206
17207 2018-07-03 Jeff Law <law@redhat.com>
17208
17209 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
17210 into a single pattern.
17211
17212 * config/h8300/h8300.md (ors code_iterator): New.
17213 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
17214 a single pattern and single splitter.
17215 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
17216 (iorqi3_1, xorqi3_1): Likewise.
17217 (iorqi3, xorqi3 expanders): Similarly.
17218
17219 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
17220 (movmd_internal) into a single pattern using the P mode iterator.
17221 (movmd splitters): Similarly.
17222 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
17223 (movsd splitters): Similarly.
17224
17225 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
17226 ADDB, ADDW and ADDL into a single ADD attribute which selects the
17227 right table based on the size of the operand.
17228 * config/h8300/h8300.md (length_table): Corresponding changes. All
17229 references to "addb", "addw" and "addl" changed to "add".
17230 (btst patterns): Merge two variants into a single pattern.
17231 (tstqi, tsthi): Likewise.
17232 (addhi3_incdec, addsi3_incdec): Likewise.
17233 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
17234 (mulhi3, mulsi3): Likewise.
17235 (udivhi3, udivsi3): Likewise.
17236 (divhi3, divsi3): Likewise.
17237 (andorqi3, andorhi3, andorsi3): Likewise.
17238
17239 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
17240
17241 PR target/85694
17242 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
17243 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
17244
17245 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17246
17247 PR tree-optimization/85694
17248 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
17249 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
17250 UNSPEC_URHADD.
17251 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
17252 (<u>avg<mode>3_ceil): New patterns.
17253
17254 2018-07-03 David Malcolm <dmalcolm@redhat.com>
17255
17256 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
17257 scan-tree-dump directive.
17258 * gcc.dg/vect/slp-perm-2.c: Likewise.
17259 * gcc.dg/vect/slp-perm-3.c: Likewise.
17260 * gcc.dg/vect/slp-perm-5.c: Likewise.
17261 * gcc.dg/vect/slp-perm-6.c: Likewise.
17262 * gcc.dg/vect/slp-perm-7.c: Likewise.
17263 * gcc.dg/vect/slp-perm-8.c: Likewise.
17264
17265 2018-07-03 Marek Polacek <polacek@redhat.com>
17266
17267 PR middle-end/86202
17268 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
17269
17270 2018-07-03 Richard Biener <rguenther@suse.de>
17271
17272 PR ipa/86389
17273 * tree-ssa-structalias.c (find_func_clobbers): Properly
17274 handle indirect calls.
17275
17276 2018-07-03 Jeff Law <law@redhat.com>
17277
17278 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
17279 (shifts): New code iterator.
17280 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
17281 expander. Fix HImode handling on H8/SX.
17282 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
17283 (subqi3, subhi3, subsi3 expanders): Likewise.
17284 (andqi3, andhi3, andsi3 expanders): Likewise.
17285 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
17286 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
17287 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
17288 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
17289 (zero_extendqihi2, zero_extendqisi2): Likewise.
17290 (extendqihi2, extendqisi2): Likewise.
17291 (rotlqi3, rotlhi3, rotlsi3): Likewise.
17292 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
17293 (rotlqi3_1, rotlhi3_1): Likewise.
17294 (logicalhi3_sn, logicalsi3_sn): Likewise.
17295 (logicalhi3, logicalsi3): Likewise.
17296
17297 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17298
17299 * tree-vect-patterns.c (vect_recog_rotate_pattern)
17300 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17301 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
17302 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
17303 type to append_pattern_def_seq instead of creating a stmt_vec_info
17304 directly.
17305 (build_mask_conversion): Likewise. Remove vinfo argument.
17306 (vect_add_conversion_to_patterm): Likewise, renaming to...
17307 (vect_add_conversion_to_pattern): ...this.
17308 (vect_recog_mask_conversion_pattern): Update call to
17309 build_mask_conversion. Pass the vector type to
17310 append_pattern_def_seq here too.
17311 (vect_recog_gather_scatter_pattern): Update call to
17312 vect_add_conversion_to_pattern.
17313
17314 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17315
17316 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
17317 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17318 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
17319 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
17320 STMT_VINFO_PATTERN_DEF_SEQ to null here.
17321 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
17322 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
17323 append_pattern_def_seq instead of new_pattern_def_seq.
17324 (vect_recog_divmod_pattern): Do both of the above.
17325 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
17326 is null.
17327
17328 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17329
17330 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
17331 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
17332 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
17333 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
17334 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
17335 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17336 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
17337 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17338 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17339 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
17340 parameter with a single stmt_vec_info.
17341 (vect_recog_func_ptr): Likewise.
17342 (vect_recog_gather_scatter_pattern): Likewise, folding in...
17343 (vect_try_gather_scatter_pattern): ...this.
17344 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
17345 the stmt_vec_info of the statement to be matched. Don't clear
17346 STMT_VINFO_RELATED_STMT.
17347 (vect_pattern_recog): Update call accordingly.
17348
17349 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17350
17351 PR tree-optimization/85694
17352 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
17353 (uavgM3_ceil): Document new optabs.
17354 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
17355 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
17356 functions.
17357 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
17358 (savg_ceil_optab): New optabs.
17359 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
17360 (vect_vect_recog_func_ptrs): Add it.
17361 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
17362 constant directly from the associated lhs.
17363
17364 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17365
17366 * tree-vect-patterns.c (vect_split_statement): New function.
17367 (vect_convert_input): Use it to try to split an existing cast.
17368
17369 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17370
17371 * poly-int.h (print_hex): New function.
17372 * dumpfile.h (dump_dec, dump_hex): Declare.
17373 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
17374 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
17375 min_input_precision, operation_precision and operation_sign.
17376 * tree-vect-patterns.c (vect_get_range_info): New function.
17377 (vect_same_loop_or_bb_p, vect_single_imm_use)
17378 (vect_operation_fits_smaller_type): Delete.
17379 (vect_look_through_possible_promotion): Add an optional
17380 single_use_p parameter.
17381 (vect_recog_over_widening_pattern): Rewrite to use new
17382 stmt_vec_info infomration. Handle one operation at a time.
17383 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
17384 (vect_truncatable_operation_p, vect_set_operation_type)
17385 (vect_set_min_input_precision): New functions.
17386 (vect_determine_min_output_precision_1): Likewise.
17387 (vect_determine_min_output_precision): Likewise.
17388 (vect_determine_precisions_from_range): Likewise.
17389 (vect_determine_precisions_from_users): Likewise.
17390 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
17391 (vect_vect_recog_func_ptrs): Put over_widening first.
17392 Add cast_forwprop.
17393 (vect_pattern_recog): Call vect_determine_precisions.
17394
17395 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17396
17397 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
17398 statements that have been replaced by further pattern statements.
17399 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
17400
17401 2018-07-03 Richard Biener <rguenther@suse.de>
17402
17403 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
17404 always set *dt. Dump vectype in vectype overload.
17405 * dumpfile.h (dump_gimple_expr): New function.
17406 (dump_gimple_expr_loc): Likewise.
17407 * dumpfile.c (dump_gimple_expr): New function.
17408 (dump_gimple_expr_loc): Likewise.
17409
17410 2018-07-02 Jeff Law <law@redhat.com>
17411
17412 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
17413 the H8/300, H8/300H and H8/S variants into a single pattern.
17414 (movhi_h8300, movqi_h8300hs): Similarly.
17415 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
17416 (QHI mode iterator): New.
17417
17418 * config/h8300/h8300.md: Remove trailing whitespace.
17419
17420 2018-07-02 Jim Wilson <jimw@sifive.com>
17421
17422 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
17423 instead of emit_insn for interrupt returns.
17424 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
17425 (riscv_sret, riscv_uret): Likewise.
17426
17427 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17428
17429 * pretty-print.c (selftest::test_pp_format): Move save and restore
17430 of quotes to class auto_fix_quotes, and add an instance.
17431 * selftest.c: Include "intl.h".
17432 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
17433 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
17434 * selftest.h (selftest::auto_fix_quotes): New class.
17435
17436 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
17437
17438 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
17439 (aarch64_sve_prepare_conditional_op): Remove.
17440 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
17441 Allow aarch64_simd_reg_or_zero as select operand; remove
17442 the aarch64_sve_prepare_conditional_op call.
17443 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
17444 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17445 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
17446 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
17447 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
17448 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
17449 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
17450 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
17451 and a splitters to match all of the *_any patterns.
17452 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
17453
17454 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
17455 (SVE_COND_FP_BINARY_REV): Remove.
17456 (sve_int_op_rev, sve_fp_op_rev): New.
17457 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
17458 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
17459 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
17460 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
17461 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
17462 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
17463 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
17464 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
17465 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
17466
17467 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
17468 Remove match_dup 1 from the inner unspec.
17469 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17470
17471 * config/aarch64/aarch64.md (movprfx): New attr.
17472 (length): Default movprfx to 8.
17473 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
17474 (*madd<SVE_I>, *msub<SVE_I): Likewise.
17475 (*<su>mul<SVE_I>3_highpart): Likewise.
17476 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
17477 (*v<ASHIFT><SVE_I>3): Likewise.
17478 (*<su><MAXMIN><SVE_I>3): Likewise.
17479 (*<su><MAXMIN><SVE_F>3): Likewise.
17480 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
17481 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
17482 (*div<SVE_F>4): Likewise.
17483
17484 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
17485
17486 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
17487 in dump string.
17488
17489 2018-07-02 Richard Biener <rguenther@suse.de>
17490
17491 PR tree-optimization/86363
17492 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
17493 memset argument refers to a non-variable address.
17494
17495 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17496
17497 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
17498 {PLUS,MINUS}_EXPR code to...
17499 (adjust_symbolic_bound): ...here,
17500 (combine_bound): ...here,
17501 (set_value_range_with_overflow): ...and here.
17502
17503 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17504
17505 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
17506 code...
17507 (extract_range_from_abs_expr): ...here.
17508
17509 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
17510
17511 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
17512 -fno-omit-frame-pointer when not optimizing.
17513
17514 2018-07-02 Martin Liska <mliska@suse.cz>
17515
17516 PR ipa/86279
17517 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
17518 (propagate_nothrow): Likewise.
17519
17520 2018-07-02 Martin Liska <mliska@suse.cz>
17521
17522 PR ipa/86323
17523 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
17524
17525 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17526
17527 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
17528 function in r262149, changing "loc" param from source_location to
17529 const dump_location_t &.
17530 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
17531 declaration, as above.
17532
17533 2018-07-01 Paul Koning <ni1d@arrl.net>
17534
17535 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
17536 -munit-asm, -mgnu-asm, -mdec-asm.
17537 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
17538 (pdp11_output_labelref): New.
17539 (pdp11_output_def): New.
17540 (pdp11_output_addr_vec_elt): New.
17541 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
17542 %# and %@ format codes.
17543 (pdp11_option_override): New.
17544 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
17545 (pdp11_output_ident): New.
17546 (pdp11_asm_named_section): New.
17547 (pdp11_asm_init_sections): New.
17548 (pdp11_file_start): New.
17549 (pdp11_file_end): New.
17550 (output_ascii): Use .ascii/.asciz for -mdec-asm.
17551 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
17552 %o, like %c but octal.
17553 (pdp11_option_override): New.
17554 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
17555 -mdec-asm.
17556 (DATA_SECTION_ASM_OP): Ditto.
17557 (READONLY_DATA_SECTION_ASM_OP): New.
17558 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
17559 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
17560 (ASM_OUTPUT_LABELREF): Ditto.
17561 (ASM_OUTPUT_DEF): Ditto.
17562 (ASM_OUTPUT_EXTERNAL): New.
17563 (ASM_OUTPUT_SOURCE_FILENAME): New.
17564 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
17565 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
17566 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
17567 %# and %@ format codes.
17568 * config/pdp11/pdp11.opt (mgnu-asm): New.
17569 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
17570 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
17571 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
17572
17573 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
17574
17575 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
17576 dereferencing path[] beyond its length.
17577 (debug_path): New.
17578 (debug_all_paths): New.
17579 (rewire_first_differing_edge): New.
17580 (adjust_paths_after_duplication): New.
17581 (duplicate_thread_path): Call adjust_paths_after_duplication.
17582 Add new argument.
17583 (thread_through_all_blocks): Add new argument to
17584 duplicate_thread_path.
17585
17586 2018-06-30 Jim Wilson <jimw@sifive.com>
17587
17588 * config/riscv/predicates.md (p2m1_shift_operand): New.
17589 (high_mask_shift_operand): New.
17590 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
17591 pattern using p2m1_shift_operand.
17592 (lshsi3_zero_extend_3+2): New combiner pattern using
17593 high_mask_shift_operand.
17594
17595 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17596
17597 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
17598 split out from...
17599 (vect_recog_rotate_pattern): ...here.
17600 (vect_convert_input): Try to insert casts of invariants in the
17601 preheader.
17602 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
17603 preheader to be empty.
17604
17605 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17606
17607 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
17608 vector type. If given, install it in the new statement's
17609 STMT_VINFO_VECTYPE.
17610 (vect_element_precision): New function.
17611 (vect_unpromoted_value): New struct.
17612 (vect_unpromoted_value::vect_unpromoted_value): New function.
17613 (vect_unpromoted_value::set_op): Likewise.
17614 (vect_look_through_possible_promotion): Likewise.
17615 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
17616 (vect_widened_op_tree, vect_convert_input): Likewise.
17617 (vect_convert_inputs, vect_convert_output): Likewise.
17618 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
17619 to handle the optional cast of the multiplication result and
17620 vect_widened_op_tree to detect the widened multiplication itself.
17621 Do not require the input and output of promotion casts to have
17622 the same sign, but base the signedness of the operation on the
17623 input rather than the result. If the pattern includes two
17624 promotions, check that those promotions have the same sign.
17625 Do not restrict the MULT_EXPR handling to a double-width result;
17626 handle quadruple-width results and wider. Use vect_convert_inputs
17627 to convert the inputs to the common type.
17628 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
17629 to handle the optional cast of the ABS result. Also allow a sign
17630 change or a sign extension between the ABS and MINUS.
17631 Use vect_widened_op_tree to detect the widened subtraction and use
17632 vect_convert_inputs to convert the inputs to the common type.
17633 (vect_handle_widen_op_by_const): Delete.
17634 (vect_recog_widen_op_pattern): New function.
17635 (vect_recog_widen_mult_pattern): Use it.
17636 (vect_recog_widen_shift_pattern): Likewise.
17637 (vect_recog_widen_sum_pattern): Use
17638 vect_look_through_possible_promotion to handle the promoted
17639 PLUS_EXPR operand.
17640
17641 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17642
17643 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
17644 the containing gimple_seq *.
17645 * gimple-iterator.h (gsi_for_stmt): Declare it.
17646 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
17647 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
17648 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17649 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17650 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
17651 checks.
17652 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
17653 split out from...
17654 (vect_mark_pattern_stmts): ...here. Handle cases in which the
17655 statement being replaced is part of an existing pattern
17656 definition sequence, inserting the new pattern statements before
17657 the original one.
17658 (vect_pattern_recog_1): Don't return a bool. If the statement
17659 is already part of a pattern, instead apply pattern matching
17660 to the pattern definition statements. Don't clear the
17661 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
17662 (vect_pattern_recog): Don't break after the first match;
17663 continue processing the pattern definition statements instead.
17664 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
17665
17666 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17667
17668 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17669 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17670 (vect_recog_widen_sum_pattern): Use it.
17671
17672 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17673
17674 * tree-vect-loop.c (vectorizable_reduction): Assert that the
17675 phi is not a pattern statement and has not been replaced by
17676 a pattern statement.
17677 * tree-vect-patterns.c (type_conversion_p): Don't check
17678 STMT_VINFO_IN_PATTERN_P.
17679 (vect_recog_vector_vector_shift_pattern): Likewise.
17680 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
17681 the pattern statement rather than the original statement; check
17682 directly for a WIDEN_MULT_EXPR here.
17683 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
17684 vect_is_simple_use to return the pattern statement rather
17685 than the original statement; use is_pattern_stmt_p to check
17686 for such a pattern statement.
17687 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
17688 to return the pattern statement rather than the original statement;
17689 don't do the same transformation here.
17690 (vect_is_simple_use): If the defining statement has been replaced
17691 by a pattern statement, return the pattern statement instead.
17692 Remove the corresponding (local) transformation from the vectype
17693 overload.
17694
17695 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17696
17697 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
17698 end and default to null.
17699 * tree-vect-loop.c (vect_create_epilog_for_reduction)
17700 (vectorizable_reduction): Update calls accordingly, dropping the
17701 gimple ** argument if the passed-back statement isn't needed.
17702 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
17703 (vect_recog_rotate_pattern): Likewise.
17704 (vect_recog_mask_conversion_pattern): Likewise.
17705 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
17706 (vect_mask_constant_operand_p): Likewise.
17707 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
17708 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
17709 (get_group_load_store_type, get_load_store_type): Likewise.
17710 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
17711 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
17712 (vectorizable_conversion, vectorizable_assignment): Likewise.
17713 (vectorizable_shift, vectorizable_operation): Likewise.
17714 (vectorizable_store, vect_is_simple_cond): Likewise.
17715 (vectorizable_condition, vectorizable_comparison): Likewise.
17716 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
17717 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
17718 and move it to the end. Cope with null def_stmt_outs.
17719
17720 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
17721
17722 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
17723
17724 2018-06-29 Jeff Law <law@redhat.com>
17725
17726 * config/v850/v850.c (v850_legitimate_address_p): Handle large
17727 displacements for TARGET_V850E2V3 and newer.
17728 (TARGET_LRA_P): Remove. Defaults to LRA now.
17729 * config/v850/v850.md (sign23byte_load): Remove.
17730 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
17731 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
17732
17733 2018-06-29 Martin Liska <mliska@suse.cz>
17734
17735 PR lto/85759
17736 * coverage.c (coverage_init): Mangle full path name.
17737 * doc/invoke.texi: Document the change.
17738 * gcov-io.c (mangle_path): New.
17739 * gcov-io.h (mangle_path): Likewise.
17740 * gcov.c (mangle_name): Use mangle_path for path mangling.
17741
17742 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17743
17744 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
17745 if starting source register is not even.
17746
17747 2018-06-29 Martin Liska <mliska@suse.cz>
17748
17749 PR tree-optimization/86263
17750 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
17751 Make edge redirection.
17752
17753 2018-06-29 David Malcolm <dmalcolm@redhat.com>
17754
17755 * dumpfile.c (dump_loc): Add indentation based on scope depth.
17756 (dump_scope_depth): New variable.
17757 (get_dump_scope_depth): New function.
17758 (dump_begin_scope): New function.
17759 (dump_end_scope): New function.
17760 * dumpfile.h (get_dump_scope_depth): New declaration.
17761 (dump_begin_scope): New declaration.
17762 (dump_end_scope): New declaration.
17763 (class auto_dump_scope): New class.
17764 (AUTO_DUMP_SCOPE): New macro.
17765 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
17766 AUTO_DUMP_SCOPE.
17767
17768 2018-06-29 Richard Biener <rguenther@suse.de>
17769
17770 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
17771 compute_all_dependences succeeds.
17772 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
17773 exceed --param loop-max-datarefs-for-datadeps.
17774
17775 2018-06-29 Jakub Jelinek <jakub@redhat.com>
17776
17777 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
17778
17779 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
17780
17781 PR target/86348
17782 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
17783 alternative 0 in preferred_for_speed attribute.
17784
17785 2018-06-28 Paul Koning <ni1d@arrl.net>
17786
17787 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
17788 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
17789 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
17790 * config/pdp11/pdp11.md: Correct "length" attribute calculation
17791 for shift insn patterns.
17792
17793 2018-06-28 David Malcolm <dmalcolm@redhat.com>
17794
17795 * cgraph.c (cgraph_node::get_body): Replace assignments to
17796 "dump_file" with calls to set_dump_file.
17797 * dumpfile.c (alt_dump_file): Make static, and group with...
17798 (alt_flags): ...this definition.
17799 (dumps_are_enabled): New variable.
17800 (refresh_dumps_are_enabled): New function.
17801 (set_dump_file): New function.
17802 (set_alt_dump_file): New function.
17803 (gcc::dump_manager::dump_start): Replace assignments to
17804 "dump_file" and "alt_dump_file" with calls to set_dump_file and
17805 set_alt_dump_file.
17806 (gcc::dump_manager::dump_finish): Likewise.
17807 * dumpfile.h (alt_dump_file): Delete decl.
17808 (dumps_are_enabled): New variable decl.
17809 (set_dump_file): New function decl.
17810 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
17811 global.
17812 * tree-nested.c (lower_nested_functions): Replace assignments to
17813 "dump_file" with calls to set_dump_file.
17814
17815 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
17816
17817 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
17818 goto_locus of each outgoing edge of each basic block.
17819
17820 2018-06-28 Richard Biener <rguenther@suse.de>
17821
17822 * dwarf2out.c (decl_scope_table): Remove.
17823 (push_decl_scope): Likewise.
17824 (pop_decl_scope): Likewise.
17825 (gen_type_die_for_member): Do not call push/pop_decl_scope.
17826 (gen_struct_or_union_type_die): Likewise.
17827 (gen_tagged_type_die): Likewise.
17828 (dwarf2out_init): Do not initialize decl_scope_table.
17829 (dwarf2out_c_finalize): Do not free it.
17830
17831 2018-06-28 Richard Biener <rguenther@suse.de>
17832
17833 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
17834 deciding whether to not re-use a DIE.
17835
17836 2018-06-28 Richard Biener <rguenther@suse.de>
17837
17838 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
17839 DW_AT_abstract_origin attribute.
17840
17841 2018-06-28 Martin Liska <mliska@suse.cz>
17842
17843 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17844 Use newly introduced constants.
17845 * tree-switch-conversion.h (struct jump_table_cluster):
17846 Define max_ratio_for_size and max_ratio_for_speed.
17847
17848 2018-06-28 Martin Liska <mliska@suse.cz>
17849
17850 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17851 Add new checking assert to catch invalid state.
17852 (jump_table_cluster::can_be_handled): Handle single case
17853 clusters.
17854 (jump_table_cluster::is_beneficial): Bail out for such case.
17855 (bit_test_cluster::find_bit_tests):
17856 Add new checking assert to catch invalid state.
17857 (bit_test_cluster::can_be_handled): Handle single case
17858 clusters.
17859 (bit_test_cluster::is_beneficial): Bail out for such case.
17860 (switch_decision_tree::analyze_switch_statement):
17861 Fix comment.
17862
17863 2018-06-28 Martin Liska <mliska@suse.cz>
17864
17865 * common.opt: Introduce -completion option.
17866 * gcc.c (driver_handle_option): Handle it.
17867 (driver::main): Print completions if completion
17868 is set.
17869 * opt-suggestions.c (option_proposer::get_completions):
17870 New function.
17871 (option_proposer::suggest_completion): Likewise.
17872 (option_proposer::find_param_completions): Likewise.
17873 (verify_autocompletions): Likewise.
17874 (test_completion_valid_options): Likewise.
17875 (test_completion_valid_params): Likewise.
17876 (in_completion_p): Likewise.
17877 (empty_completion_p): Likewise.
17878 (test_completion_partial_match): Likewise.
17879 (test_completion_garbage): Likewise.
17880 (opt_proposer_c_tests): Likewise.
17881 * opt-suggestions.h: Declare new functions.
17882 * opts.c (common_handle_option): Handle OPT__completion_.
17883 * selftest-run-tests.c (selftest::run_tests): Add
17884 opt_proposer_c_tests.
17885 * selftest.c (assert_str_startswith): New.
17886 * selftest.h (assert_str_startswith): Likewise.
17887 (opt_proposer_c_tests): New.
17888 (ASSERT_STR_STARTSWITH): Likewise.
17889
17890 2018-06-28 Martin Liska <mliska@suse.cz>
17891
17892 * Makefile.in: Add opt-suggestions.o.
17893 * gcc-main.c: Include opt-suggestions.h.
17894 * gcc.c (driver::driver): Likewise.
17895 (driver::~driver): Remove m_option_suggestions.
17896 (driver::build_option_suggestions): Moved to option_proposer.
17897 (driver::suggest_option): Likewise.
17898 (driver::handle_unrecognized_options): Use option_proposer.
17899 * gcc.h (class driver): Add new memver m_option_proposer.
17900 * opt-suggestions.c: New file.
17901 * opt-suggestions.h: New file.
17902
17903 2018-06-28 Martin Liska <mliska@suse.cz>
17904
17905 * vec.h (class auto_string_vec): New (moved from auto_argvec).
17906 (auto_string_vec::~auto_string_vec): Likewise.
17907
17908 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
17909
17910 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
17911 prevent_decl_creation_for_types fields up and add reset_location field.
17912 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
17913 statement if id->reset_location is true.
17914 (copy_edges_for_bb): Do not set goto_locus on the new edges if
17915 id->reset_location is true.
17916 (copy_phis_for_bb): Force input_location on the arguments if
17917 id->reset_location is true.
17918 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
17919 is set on the function to be inlined.
17920
17921 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
17922
17923 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
17924
17925 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
17926
17927 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
17928 registers for Pmode.
17929 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
17930 hard registers for the clobbered pseudo.
17931
17932 2018-06-27 Paul Koning <ni1d@arrl.net>
17933
17934 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
17935 mutually exclusive options.
17936 * config/pdp11/constraints.md (h): New constraint.
17937 (O): Update definition to match shift code generation.
17938 (D): New constraint.
17939 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
17940 (CCFP): Remove.
17941 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
17942 function.
17943 (output_jump): Change arguments.
17944 (pdp11_fixed_cc_regs): New function.
17945 (pdp11_cc_mode): Ditto.
17946 (pdp11_expand_shift): Ditto.
17947 (pdp11_assemble_shift): Ditto.
17948 (pdp11_small_shift): Ditto.
17949 (pdp11_branch_cost): Remove.
17950 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
17951 from output.
17952 (pdp11_register_move_cost): Update for CC registers.
17953 (pdp11_rtx_costs): Add case for LSHIFTRT.
17954 (pdp11_output_jump): Add CCNZ mode conditional branches.
17955 (notice_update_cc_on_set): Remove.
17956 (pdp11_cc_mode): New function.
17957 (simple_memory_operand): Correct pre/post decrement case.
17958 (no_side_effect_operand): New function.
17959 (pdp11_regno_reg_class): Add CC_REGS class.
17960 (pdp11_fixed_cc_regs): New function.
17961 (pdp11_small_shift): New function.
17962 (pdp11_expand_shift): New function to expand shift insns.
17963 (pdp11_assemble_shift): New function to output shifts.
17964 (pdp11_branch_cost): Remove.
17965 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
17966 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
17967 (WCHAR_TYPE): Ditto.
17968 (PTRDIFF_TYPE): Ditto.
17969 (ADJUST_INSN_LENGTH): New macro.
17970 (FIXED_REGISTERS): Add CC registers.
17971 (CALL_USED_REGISTERS): Ditto.
17972 (reg_class): Ditto.
17973 (REG_CLASS_NAMES): Ditto.
17974 (REG_CLASS_CONTENTS): Ditto.
17975 (SELECT_CC_MODE): Use new function.
17976 (TARGET_FLAGS_REGNUM): New macro.
17977 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
17978 (cc0_reg_rtx): Remove.
17979 (CC_STATUS_MDEP): Remove.
17980 (CC_STATUS_MDEFP_INIT): Remove.
17981 (CC_IN_FPU): Remove.
17982 (NOTICE_UPDATE_CC): Remove.
17983 (REGISTER_NAMES): Add CC registers.
17984 (BRANCH_COST): Change to constant 1.
17985 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
17986 handling.
17987 * config/pdp11/pdp11.opt (mbcopy): Remove.
17988 (mbcopy-builtin): Remove.
17989 (mbranch-cheap): Remove.
17990 (mbranch-expensive): Remove.
17991 * config/pdp11/predicates.md (expand_shift_operand): Update to
17992 match shift code generation.
17993 (ccnz_operator): New predicate.
17994 * doc/invoke.texi (PDP-11 Options): Remove deleted options
17995 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
17996 Remove non-existent option -mabshi, -mno-abshi. Document mutually
17997 exclusive options.
17998 * doc/md.texi (PDP-11): Document new D and h constraints. Update
17999 description of O constraint.
18000
18001 2018-06-27 Jeff Law <law@redhat.com>
18002 Austin Law <austinklaw@gmail.com>
18003
18004 * config/v850/v850.md (addsi3_set_flags): New pattern.
18005 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
18006 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
18007 (zero_extendhisi2_v850_set_flags): Likewise.
18008 (zero_extendqisi2_v850_set_flags): Likewise.
18009 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
18010 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
18011 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
18012
18013 * config/v850/v850-protos.h (notice_update_cc): Remove.
18014 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
18015 (v850_print_operand): Handle 'D' and "d".
18016 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
18017 Add handling of arithmetic/logical operations compared against zero.
18018 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
18019 Do not look at v850_compare_op, instead get mode from last argument.
18020 (v850_gen_compare): Remove
18021 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
18022 after reload for prologue insns.
18023 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
18024 patterns.
18025 (construct_save_jarl): Likewise.
18026 (TARGET_FLAGS_REGNUM): Define.
18027 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
18028 (NOTICE_UPDATE_CC): Remove.
18029 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
18030 than cc0. Conditionalize on reload_completed.
18031 (cmpsi_insn, setfcc_insn): Likewise.
18032 (tst1 splitter): Turn into define_and_split which sets the flags
18033 after reload.
18034 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
18035 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
18036 (cstoresf4, cstoredf4): Clobber the flags.
18037 (cmpsi, cmpsf, cmpdf): Remove expanders.
18038 (setf_insn): Remove pattern.
18039 (addsi3): Turn into define_and_split which clobbers the flags after
18040 reload and a suitable pattern (addsi3_clobber_flags) for use after
18041 reload.
18042 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
18043 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
18044 (ashrsi3, ashrsi3_v850e2): Likewise.
18045 (bins): Clobber the flags.
18046 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
18047 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
18048 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
18049 (call_value_internal_short, call_value_internal_long): Likewise.
18050 (callt_save_interrupt, callt_return_interrupt): Likewise.
18051 (save_interrupt, return_interrupt): Likewise.
18052 (callt_save_all_interrupt, save_all_interrupt): Likewise.
18053 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
18054 (restore_all_interrupt, _restore_all_interrupt): Likewise.
18055 (All FP comparisons): Only allow after reload has completed.
18056 (trfsr): Likewise.
18057 (divh, divhu): Tweak output template.
18058 (branch_z_normal, branch_z_invert): Remove
18059 (branch_nz_normal, branch_nz_invert): Likewise.
18060 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
18061
18062 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
18063 * config/v850/v850.c (notice_update_cc): Remove.
18064 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
18065 (CC_NO_CARRY): Likewise.
18066 (NOTICE_UPDATE_CC): Define to nothing.
18067 * config/v850/v850.md: Remove block comment on cc0 handling
18068 Remove "cc" attribute from all patterns. Remove cc_status handling
18069 from all patterns. Minor formatting fixes.
18070
18071 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18072
18073 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
18074 (cortex-a76.cortex-a55): Likewise.
18075 * config/aarch64/aarch64-tune.md: Regenerate.
18076 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
18077 cortex-a76.cortex-a55.
18078
18079 2018-06-27 Jeff Law <law@redhat.com>
18080
18081 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
18082 (MULTILIB_DIRNAMES): Similarly.
18083
18084 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
18085
18086 * gimple.h (gimple_return_retbnd): Delete.
18087 (gimple_return_set_retbnd): Likewise.
18088 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
18089 gimple_return_set_retbnd.
18090 * gimple-pretty-print.c (dump_gimple_return): Remove call to
18091 gimple_return_retbnd and adjust.
18092 * tree-inline.h (struct copy_body_data): Remove retbnd field.
18093 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
18094 Explicitly return NULL in a couple more cases. Move assertion
18095 on debug statements and remove unreachable code.
18096 (reset_debug_binding): Do not test id->retbnd.
18097 (expand_call_inline): Do not set it.
18098
18099 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
18100
18101 * configure.ac: Add --disable-gcov option.
18102 * configure: Regenerate.
18103 * Makefile.in: Honour @enable_gcov@.
18104 * doc/install.texi: Document --disable-gcov.
18105
18106 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18107
18108 * config/arm/arm-cpus.in (cortex-a76): New entry.
18109 (cortex-a76.cortex-a55): Likewise.
18110 * config/arm/arm-tables.opt: Regenerate.
18111 * config/arm/arm-tune.md: Likewise.
18112 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
18113 * doc/invoke.texi (ARM Options): Document cortex-a76 and
18114 cortex-a76.cortex-a55.
18115
18116 2018-06-27 Tamar Christina <tamar.christina@arm.com>
18117
18118 PR target/85769
18119 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
18120
18121 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
18122
18123 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
18124 comment.
18125 (EPILOGUE_USES): Likewise.
18126
18127 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
18128
18129 * tree-inline.c (remap_location): New function extracted from...
18130 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
18131 (copy_phis_for_bb): ...here. Call remap_location.
18132 (copy_cfg_body): Adjust call to copy_edges_for_bb.
18133
18134 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
18135
18136 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
18137 unaligned vsx for 16B memset.
18138
18139 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
18140
18141 PR target/86285
18142 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
18143 ieee128_float_type_node to long_double_type_node unless
18144 TARGET_LONG_DOUBLE_128 is set.
18145
18146 2018-06-26 David Malcolm <dmalcolm@redhat.com>
18147
18148 * cfgloop.c (get_loop_location): Convert return type from
18149 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
18150 by implicit construction from rtx_insn *, and using
18151 dump_user_location_t::from_function_decl for the fallback case.
18152 * cfgloop.h (get_loop_location): Convert return type from
18153 location_t to dump_user_location_t.
18154 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
18155 dump_printf_loc to pass in a dump_location_t rather than a
18156 location_t, via the gimple stmt.
18157 * coverage.c (get_coverage_counts): Update calls to
18158 dump_printf_loc to pass in dump_location_t rather than a
18159 location_t.
18160 * doc/optinfo.texi (Dump types): Convert example of
18161 dump_printf_loc from taking "locus" to taking "insn". Update
18162 description of the "_loc" calls to cover dump_location_t.
18163 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
18164 "selftest.h".
18165 (dump_user_location_t::dump_user_location_t): New constructors,
18166 from gimple *stmt and rtx_insn *.
18167 (dump_user_location_t::from_function_decl): New function.
18168 (dump_loc): Make static.
18169 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
18170 const dump_location_t &.
18171 (dump_generic_expr_loc): Delete.
18172 (dump_printf_loc): Convert param "loc" from location_t to
18173 const dump_location_t &.
18174 (selftest::test_impl_location): New function.
18175 (selftest::dumpfile_c_tests): New function.
18176 * dumpfile.h: Include "profile-count.h".
18177 (class dump_user_location_t): New class.
18178 (struct dump_impl_location_t): New struct.
18179 (class dump_location_t): New class.
18180 (dump_printf_loc): Convert 2nd param from source_location to
18181 const dump_location_t &.
18182 (dump_generic_expr_loc): Delete.
18183 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
18184 const dump_location_t &.
18185 * gimple-fold.c (fold_gimple_assign): Update call to
18186 dump_printf_loc to pass in a dump_location_t rather than a
18187 location_t, via the gimple stmt.
18188 (gimple_fold_call): Likewise.
18189 * gimple-loop-interchange.cc
18190 (loop_cand::analyze_iloop_reduction_var): Update for change to
18191 check_reduction_path.
18192 (tree_loop_interchange::interchange): Update for change to
18193 find_loop_location.
18194 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
18195 change in return-type of find_loop_location.
18196 (graphite_regenerate_ast_isl): Likewise.
18197 * graphite-optimize-isl.c (optimize_isl): Likewise.
18198 * graphite.c (graphite_transform_loops): Likewise.
18199 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
18200 pass in a dump_location_t rather than a location_t, via the
18201 gimple stmt.
18202 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18203 * ipa.c (walk_polymorphic_call_targets): Likewise.
18204 * loop-unroll.c (report_unroll): Convert "locus" param from
18205 location_t to dump_location_t.
18206 (decide_unrolling): Update for change to get_loop_location's
18207 return type.
18208 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
18209 location_t to dump_user_location_t.
18210 (grid_find_single_omp_among_assignments_1): Updates calls to
18211 dump_printf_loc to pass in a dump_location_t rather than a
18212 location_t, via the gimple stmt.
18213 (grid_parallel_clauses_gridifiable): Convert "tloc" from
18214 location_t to dump_location_t. Updates calls to dump_printf_loc
18215 to pass in a dump_location_t rather than a location_t, via the
18216 gimple stmt.
18217 (grid_inner_loop_gridifiable_p): Likewise.
18218 (grid_dist_follows_simple_pattern): Likewise.
18219 (grid_gfor_follows_tiling_pattern): Likewise.
18220 (grid_target_follows_gridifiable_pattern): Likewise.
18221 (grid_attempt_target_gridification): Convert initialization
18222 of local "grid" from memset to zero-initialization; FIXME: does
18223 this require C++11? Update call to dump_printf_loc to pass in a
18224 optinfo_location rather than a location_t, via the gimple stmt.
18225 * profile.c (read_profile_edge_counts): Updates call to
18226 dump_printf_loc to pass in a dump_location_t rather than a
18227 location_t
18228 (compute_branch_probabilities): Likewise.
18229 * selftest-run-tests.c (selftest::run_tests): Call
18230 dumpfile_c_tests.
18231 * selftest.h (dumpfile_c_tests): New decl.
18232 * tree-loop-distribution.c (pass_loop_distribution::execute):
18233 Update for change in return type of find_loop_location.
18234 * tree-parloops.c (parallelize_loops): Likewise.
18235 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
18236 "locus" from location_t to dump_user_location_t.
18237 (canonicalize_loop_induction_variables): Likewise.
18238 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
18239 for change in return type of find_loop_location.
18240 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
18241 to dump_printf_loc to pass in a dump_location_t rather than a
18242 location_t, via the stmt.
18243 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
18244 Likewise.
18245 * tree-vect-loop-manip.c (find_loop_location): Convert return
18246 type from source_location to dump_user_location_t.
18247 (vect_do_peeling): Update for above change.
18248 (vect_loop_versioning): Update for change in type of
18249 vect_location.
18250 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
18251 from location_t to dump_user_location_t.
18252 (vect_estimate_min_profitable_iters): Update for change in type
18253 of vect_location.
18254 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
18255 location_t to dump_location_t.
18256 (vect_slp_bb): Update for change in type of vect_location.
18257 * tree-vectorizer.c (vect_location): Convert from source_location
18258 to dump_user_location_t.
18259 (try_vectorize_loop_1): Update for change in vect_location's type.
18260 (vectorize_loops): Likewise.
18261 (increase_alignment): Likewise.
18262 * tree-vectorizer.h (vect_location): Convert from source_location
18263 to dump_user_location_t.
18264 (find_loop_location): Convert return type from source_location to
18265 dump_user_location_t.
18266 (check_reduction_path): Convert 1st param from location_t to
18267 dump_user_location_t.
18268 * value-prof.c (check_counter): Update call to dump_printf_loc to
18269 pass in a dump_user_location_t rather than a location_t; update
18270 call to error_at for change in type of "locus".
18271 (check_ic_target): Update call to dump_printf_loc to
18272 pass in a dump_user_location_t rather than a location_t, via the
18273 call_stmt.
18274
18275 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
18276
18277 * config/s390/s390.h (enum processor_flags): Do not use
18278 default tune parameter when -march was specified.
18279
18280 2018-06-26 Jakub Jelinek <jakub@redhat.com>
18281
18282 PR target/86314
18283 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
18284 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
18285 operands.
18286
18287 2018-06-26 Richard Biener <rguenther@suse.de>
18288
18289 PR tree-optimization/86287
18290 PR bootstrap/86316
18291 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
18292 (vect_analyze_loop): Initialize n_stmts.
18293
18294 2018-06-26 Richard Biener <rguenther@suse.de>
18295
18296 PR middle-end/86271
18297 * fold-const.c (fold_convertible_p): Pointer extension
18298 isn't valid.
18299
18300 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
18301
18302 PR debug/86064
18303 * dwarf2out.c (loc_list_has_views): Adjust comments.
18304 (dw_loc_list): Split single cross-partition range with
18305 nonzero locview.
18306
18307 2018-06-25 Jeff Law <law@redhat.com>
18308
18309 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
18310 on -mbig-switch by default.
18311
18312 * config/v850/predicates.md (const_float_1_operand): Fix match_code
18313 test.
18314 (const_float_0_operand): Remove unused predicate.
18315 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
18316 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
18317 (recipsf2): New expander. Original pattern now called
18318 (recipsf2_insn).
18319 (recipdf2, recipdf2_insn): Similarly.
18320 (rsqrtsf2, rsqrtsf2_insn): Similarly
18321 (rsqrtdf2, rsqrtdf2_insn): Similarly
18322
18323 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
18324
18325 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
18326 Simplify logic for FreeBSD (twice).
18327
18328 2018-06-25 Martin Sebor <msebor@redhat.com>
18329
18330 PR tree-optimization/86204
18331 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
18332 a strnlen result if it's less than the length of the string.
18333
18334 2018-06-25 Martin Sebor <msebor@redhat.com>
18335
18336 PR tree-optimization/85700
18337 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
18338 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
18339 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
18340
18341 2018-06-25 Martin Sebor <msebor@redhat.com>
18342
18343 * doc/extend.texi (Zero-length arrays): Update and clarify.
18344
18345 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
18346
18347 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
18348 added IEEE/IBM long double multilib support on PowerPC little
18349 endian Linux systems.
18350 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
18351 (MULTILIB_DEFAULTS): Likewise.
18352 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18353 Likewise.
18354 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
18355 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
18356 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
18357
18358 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
18359
18360 PR middle-end/86311
18361 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
18362 (REORDER_45): Likewise.
18363
18364 2018-06-25 Jeff Law <law@redhat.com>
18365
18366 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
18367 dividend to 32 bits. Adjust length.
18368 (udivmodhi4): Cleanup output template. Fix length.
18369
18370 2018-06-25 Carl Love <cel@us.ibm.com>
18371
18372 * config/rs6000/vsx.md: Change word selector to prefered location.
18373
18374 2018-06-25 Richard Biener <rguenther@suse.de>
18375
18376 PR tree-optimization/86304
18377 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
18378 epilogue-if-converted loops as well.
18379
18380 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
18381
18382 * lto-section-out.c (lto_begin_section): Do not print section
18383 name for noaddr and unnumbered dumps.
18384
18385 2018-06-25 Richard Biener <rguenther@suse.de>
18386
18387 * tree-vectorizer.h (struct vec_info_shared): New structure
18388 with parts split out from struct vec_info and loop_nest from
18389 struct _loop_vec_info.
18390 (struct vec_info): Adjust accordingly.
18391 (struct _loop_vec_info): Likewise.
18392 (LOOP_VINFO_LOOP_NEST): Adjust.
18393 (LOOP_VINFO_DATAREFS): Likewise.
18394 (LOOP_VINFO_DDRS): Likewise.
18395 (struct _bb_vec_info): Likewise.
18396 (BB_VINFO_DATAREFS): Likewise.
18397 (BB_VINFO_DDRS): Likewise.
18398 (struct _stmt_vec_info): Add dr_aux member.
18399 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
18400 (DR_MISALIGNMENT_UNINITIALIZED): New.
18401 (set_dr_misalignment): Adjust.
18402 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
18403 (vect_analyze_loop): Adjust prototype.
18404 (vect_analyze_loop_form): Likewise.
18405 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
18406 Compute dependences lazily.
18407 (vect_record_base_alignments): Use shared datarefs/ddrs.
18408 (vect_verify_datarefs_alignment): Likewise.
18409 (vect_analyze_data_refs_alignment): Likewise.
18410 (vect_analyze_data_ref_accesses): Likewise.
18411 (vect_analyze_data_refs): Likewise.
18412 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
18413 constructor parameter for shared part.
18414 (vect_analyze_loop_form): Pass in shared part and adjust.
18415 (vect_analyze_loop_2): Pass in storage for the number of
18416 stmts. Move loop nest finding to the caller. Compute
18417 datarefs lazily.
18418 (vect_analyze_loop): Pass in shared part.
18419 (vect_transform_loop): Verify shared datarefs are unchanged.
18420 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
18421 constructor parameter for shared part.
18422 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
18423 (vect_slp_bb): Verify shared datarefs are unchanged before
18424 transform.
18425 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
18426 change.
18427 (new_stmt_vec_info): Initialize DR_AUX misalignment to
18428 DR_MISALIGNMENT_UNINITIALIZED.
18429 * tree-vectorizer.c (vec_info::vec_info): Add constructor
18430 parameter for shared part.
18431 (vec_info::~vec_info): Adjust.
18432 (vec_info_shared::vec_info_shared): New.
18433 (vec_info_shared::~vec_info_shared): Likewise.
18434 (vec_info_shared::save_datarefs): Likewise.
18435 (vec_info_shared::check_datarefs): Likewise.
18436 (try_vectorize_loop_1): Construct shared part live for analyses
18437 of a single loop for multiple vector sizes.
18438 * tree-parloops.c (gather_scalar_reductions): Adjust.
18439
18440 2018-06-25 Richard Biener <rguenther@suse.de>
18441
18442 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
18443 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
18444 (vect_analyze_data_refs): Remove similar code from here and
18445 simplify accordingly.
18446
18447 2018-06-25 Richard Biener <rguenther@suse.de>
18448
18449 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
18450 for reverse storage order accesses rather than asserting
18451 they cannot happen here.
18452
18453 2018-06-25 Tom de Vries <tdevries@suse.de>
18454
18455 PR debug/86257
18456 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
18457 Use data16 instead of .byte for insn prefix.
18458
18459 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
18460
18461 PR C++/86082
18462 * parser.c (make_char_string_pack): Pass this literal chars
18463 through cpp_interpret_string.
18464 (cp_parser_userdef_numeric_literal): Check the result of
18465 make_char_string_pack.
18466
18467 2018-06-24 Maya Rashish <coypu@sdf.org>
18468
18469 * ginclude/stddef.h: Simplify conditions around avoiding
18470 re-definition of __size_t.
18471
18472 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18473
18474 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
18475 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
18476
18477 2018-06-22 Maya Rashish <coypu@sdf.org>
18478
18479 * doc/invoke.texi (mno-fancy-math-387): Update for changes
18480 made to OpenBSD and NetBSD through the years.
18481
18482 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18483
18484 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18485 behavior of vec_pack (vector double, vector double) to match
18486 behavior of vec_float2 (vector double, vector double).
18487
18488 2018-06-22 Olivier Hainque <hainque@adacore.com>
18489
18490 * gimplify.c (gimplify_function_tree): Prevent creation
18491 of a trampoline for the address of the current function
18492 passed to entry/exit instrumentation hooks.
18493
18494 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
18495
18496 PR target/86222
18497 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
18498 correctly.
18499
18500 2018-06-22 Martin Liska <mliska@suse.cz>
18501
18502 PR tree-optimization/86263
18503 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18504 Bail out if is_enabled is false.
18505 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
18506 New declaration.
18507 (jump_table_cluster::is_enabled): New function.
18508
18509 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18510
18511 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
18512 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
18513 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
18514 (lto_input_ts_binfo_tree_pointers): Likewise.
18515 * tree-streamer-out.c (streamer_write_tree_bitfields,
18516 write_ts_binfo_tree_pointers): Likewise.
18517 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
18518
18519 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18520
18521 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
18522
18523 2018-06-22 Martin Liska <mliska@suse.cz>
18524
18525 * symbol-summary.h (get): Make it pure and inline move
18526 functionality from ::get function.
18527 (get): Remove and inline into ::get and ::get_create.
18528 (get_create): Move code from ::get function.
18529
18530 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18531
18532 PR target/85994
18533 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
18534 -x assembler-with-cpp.
18535
18536 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18537
18538 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
18539 _FILE_OFFSET_BITS=64 for C++.
18540
18541 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
18542
18543 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
18544 conversion insn that shows up when pr85657-3.c is compiled using
18545 IEEE 128-bit long double.
18546 (neg<mode>2_internal): Use the correct mode to check whether the
18547 mode is IBM extended.
18548 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
18549 multiply and divide external functions from being created more
18550 than once.
18551
18552 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18553
18554 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
18555 functions.
18556 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
18557 the edge can be forwarded.
18558 (cfg_layout_merge_blocks): Likewise.
18559
18560 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18561
18562 * except.c (finish_eh_generation): Commit edge insertions only after
18563 the EH edges have been redirected from post-landing to landing pads.
18564
18565 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18566
18567 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
18568 create_tmp_var_for to create the FRAME decl.
18569 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
18570
18571 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18572
18573 * tree-inline.c (copy_edges_for_bb): Minor tweak.
18574 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
18575 debug statement when resetting its value.
18576 (expand_call_inline): Copy the locus of the call onto the assignment
18577 of the return value, if any. Use local variable in more cases.
18578
18579 2018-06-21 Martin Liska <mliska@suse.cz>
18580
18581 * ipa-pure-const.c (propagate_nothrow): Use
18582 funct_state_summaries->get.
18583 (dump_malloc_lattice): Likewise.
18584 (propagate_malloc): Likewise.
18585
18586 2018-06-21 Richard Biener <rguenther@suse.de>
18587
18588 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
18589 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
18590 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
18591 comment.
18592 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
18593 BLOCK_ABSTRACT_ORIGIN unconditionally.
18594
18595 2018-06-21 David Malcolm <dmalcolm@redhat.com>
18596
18597 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
18598 deleting it.
18599 * ipa-reference.c (ipa_reference_c_finalize): Delete
18600 ipa_ref_opt_sum_summaries and set it to NULL.
18601
18602 2018-06-21 Tom de Vries <tdevries@suse.de>
18603
18604 PR tree-optimization/85859
18605 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
18606 test with comment from bb_no_side_effects_p.
18607
18608 2018-06-21 Richard Biener <rguenther@suse.de>
18609
18610 PR tree-optimization/86232
18611 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
18612 max for constant niter.
18613
18614 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18615
18616 * config/aarch64/aarch64-simd.md
18617 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
18618
18619 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18620
18621 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
18622 Make opernads of the unspec commutative.
18623
18624 2018-06-21 Richard Biener <rguenther@suse.de>
18625
18626 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
18627 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
18628 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
18629 (vect_analyze_data_ref_dependence): Re-order checks to deal with
18630 NULL DR_STEP.
18631 (vect_record_base_alignments): Do not record base alignment
18632 for gathers or scatters.
18633 (vect_compute_data_ref_alignment): Drop return value that is always
18634 true. Bail out early for gathers or scatters.
18635 (vect_enhance_data_refs_alignment): Bail out early for gathers
18636 or scatters.
18637 (vect_find_same_alignment_drs): Likewise.
18638 (vect_analyze_data_refs_alignment): Remove dead code.
18639 (vect_slp_analyze_and_verify_node_alignment): Likewise.
18640 (vect_analyze_data_refs): For possible gathers or scatters do
18641 not create an alternate DR, just check their possible validity
18642 and mark them. Adjust DECL_NONALIASED handling to not rely
18643 on DR_BASE_ADDRESS.
18644 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
18645 update inits of gathers or scatters.
18646 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
18647 Also copy gather/scatter flag to pattern vinfo.
18648
18649 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
18650
18651 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18652 behavior of vec_packsu (vector unsigned long long, vector unsigned
18653 long long) to match behavior of vec_packs with same signature.
18654
18655 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
18656 Thomas Schwinge <thomas@codesourcery.com>
18657 Cesar Philippidis <cesar@codesourcery.com>
18658
18659 * gimplify.c (gimplify_scan_omp_clauses): Add support for
18660 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18661 (gimplify_adjust_omp_clauses): Likewise.
18662 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
18663 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
18664 (gimplify_omp_target_update): Update handling of acc update and
18665 enter/exit data.
18666 * omp-low.c (install_var_field): Remove unused parameter
18667 base_pointers_restrict.
18668 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
18669 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
18670 FINALIZE}
18671 (omp_target_base_pointers_restrict_p): Delete.
18672 (scan_omp_target): Update call to scan_sharing_clauses.
18673 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
18674 FINALIZE}.
18675 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
18676 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18677 (convert_local_omp_clauses): Likewise.
18678 * tree-pretty-print.c (dump_omp_clause): Likewise.
18679 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
18680 FINALIZE}.
18681 (omp_clause_code_name): Likewise.
18682
18683 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18684
18685 PR debug/86194
18686 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
18687 be narrowed.
18688
18689 PR tree-optimization/86231
18690 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
18691 anti-range don't overwrite *vr0min before using it to compute *vr0max.
18692
18693 2018-06-20 Tom de Vries <tdevries@suse.de>
18694
18695 PR tree-optimization/86097
18696 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
18697 iv type if signedness of iv type is not the same as that of *nit.
18698
18699 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18700
18701 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
18702 EDGE_EH edges, verify they are all EDGE_EH.
18703
18704 2018-06-20 Maya Rashish <coypu@sdf.org>
18705
18706 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
18707
18708 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18709
18710 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
18711 * config/aarch64/aarch64.c (xgene1_tunings): Add
18712 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
18713 (aarch64_mode_valid_for_sched_fusion_p):
18714 Allow 16-byte modes.
18715 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
18716 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
18717 128-bit modes.
18718 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
18719 New pattern.
18720 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
18721 * config/aarch64/iterators.md (VQ2): New mode iterator.
18722
18723 2018-06-20 Martin Liska <mliska@suse.cz>
18724
18725 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
18726 Change default ratio from 10 to 8.
18727
18728 2018-06-20 Martin Liska <mliska@suse.cz>
18729
18730 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18731 New.
18732 (bit_test_cluster::find_bit_tests): Likewise.
18733 (switch_decision_tree::analyze_switch_statement): Find clusters.
18734 * tree-switch-conversion.h (struct jump_table_cluster): Document
18735 hierarchy.
18736
18737 2018-06-20 Martin Liska <mliska@suse.cz>
18738
18739 * tree-switch-conversion.c (switch_conversion::collect):
18740 Record m_uniq property.
18741 (switch_conversion::expand): Bail out for special conditions.
18742 (group_cluster::~group_cluster): New.
18743 (group_cluster::group_cluster): Likewise.
18744 (group_cluster::dump): Likewise.
18745 (jump_table_cluster::emit): New.
18746 (switch_decision_tree::fix_phi_operands_for_edges): New.
18747 (struct case_node): Remove struct.
18748 (jump_table_cluster::can_be_handled): New.
18749 (case_values_threshold): Moved to header.
18750 (reset_out_edges_aux): Likewise.
18751 (jump_table_cluster::is_beneficial): New.
18752 (bit_test_cluster::can_be_handled): Likewise.
18753 (add_case_node): Remove.
18754 (bit_test_cluster::is_beneficial): New.
18755 (case_bit_test::cmp): New.
18756 (bit_test_cluster::emit): New.
18757 (expand_switch_as_decision_tree_p): Remove.
18758 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
18759 (fix_phi_operands_for_edge): Likewise.
18760 (switch_decision_tree::analyze_switch_statement): New.
18761 (compute_cases_per_edge): Move ...
18762 (switch_decision_tree::compute_cases_per_edge): ... here.
18763 (try_switch_expansion): Likewise.
18764 (switch_decision_tree::try_switch_expansion): Likewise.
18765 (record_phi_operand_mapping): Likewise.
18766 (switch_decision_tree::record_phi_operand_mapping): Likewise.
18767 (emit_case_decision_tree): Likewise.
18768 (switch_decision_tree::emit): Likewise.
18769 (balance_case_nodes): Likewise.
18770 (switch_decision_tree::balance_case_nodes): Likewise.
18771 (dump_case_nodes): Likewise.
18772 (switch_decision_tree::dump_case_nodes): Likewise.
18773 (emit_jump): Likewise.
18774 (switch_decision_tree::emit_jump): Likewise.
18775 (emit_cmp_and_jump_insns): Likewise.
18776 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
18777 (emit_case_nodes): Likewise.
18778 (switch_decision_tree::emit_case_nodes): Likewise.
18779 (conditional_probability): Remove.
18780 * tree-switch-conversion.h (enum cluster_type): New.
18781 (PRINT_CASE): New.
18782 (struct cluster): Likewise.
18783 (cluster::cluster): Likewise.
18784 (struct simple_cluster): Likewise.
18785 (simple_cluster::simple_cluster): Likewise.
18786 (struct group_cluster): Likewise.
18787 (struct jump_table_cluster): Likewise.
18788 (struct bit_test_cluster): Likewise.
18789 (struct min_cluster_item): Likewise.
18790 (struct case_tree_node): Likewise.
18791 (case_tree_node::case_tree_node): Likewise.
18792 (jump_table_cluster::case_values_threshold): Likewise.
18793 (struct case_bit_test): Likewise.
18794 (struct switch_decision_tree): Likewise.
18795 (struct switch_conversion): Likewise.
18796 (switch_decision_tree::reset_out_edges_aux): Likewise.
18797
18798 2018-06-20 Martin Liska <mliska@suse.cz>
18799
18800 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
18801 (hoist_edge_and_branch_if_true): Likewise.
18802 (expand_switch_using_bit_tests_p): Likewise.
18803 (struct case_bit_test): Likewise.
18804 (case_bit_test_cmp): Likewise.
18805 (emit_case_bit_tests): Likewise.
18806 (switch_conversion::switch_conversion): New class.
18807 (struct switch_conv_info): Remove old struct.
18808 (collect_switch_conv_info): More to ...
18809 (switch_conversion::collect): ... this.
18810 (check_range): Likewise.
18811 (switch_conversion::check_range): Likewise.
18812 (check_all_empty_except_final): Likewise.
18813 (switch_conversion::check_all_empty_except_final): Likewise.
18814 (check_final_bb): Likewise.
18815 (switch_conversion::check_final_bb): Likewise.
18816 (create_temp_arrays): Likewise.
18817 (switch_conversion::create_temp_arrays): Likewise.
18818 (free_temp_arrays): Likewise.
18819 (gather_default_values): Likewise.
18820 (switch_conversion::gather_default_values): Likewise.
18821 (build_constructors): Likewise.
18822 (switch_conversion::build_constructors): Likewise.
18823 (constructor_contains_same_values_p): Likewise.
18824 (switch_conversion::contains_same_values_p): Likewise.
18825 (array_value_type): Likewise.
18826 (switch_conversion::array_value_type): Likewise.
18827 (build_one_array): Likewise.
18828 (switch_conversion::build_one_array): Likewise.
18829 (build_arrays): Likewise.
18830 (switch_conversion::build_arrays): Likewise.
18831 (gen_def_assigns): Likewise.
18832 (switch_conversion::gen_def_assigns): Likewise.
18833 (prune_bbs): Likewise.
18834 (switch_conversion::prune_bbs): Likewise.
18835 (fix_phi_nodes): Likewise.
18836 (switch_conversion::fix_phi_nodes): Likewise.
18837 (gen_inbound_check): Likewise.
18838 (switch_conversion::gen_inbound_check): Likewise.
18839 (process_switch): Use the newly created class.
18840 (switch_conversion::expand): New.
18841 (switch_conversion::~switch_conversion): New.
18842 * tree-switch-conversion.h: New file.
18843
18844 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18845
18846 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
18847 tree-vect-patterns.c.
18848 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
18849 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
18850 (vect_recog_sad_pattern): Likewise.
18851 (vect_recog_widen_sum_pattern): Likewise.
18852 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
18853 (vect_recog_widen_shift_pattern): Remove the type_in argument.
18854 (vect_recog_rotate_pattern): Likewise.
18855 (vect_recog_mult_pattern): Likewise.
18856 (vect_recog_vector_vector_shift_pattern): Likewise.
18857 (vect_recog_divmod_pattern): Likewise.
18858 (vect_recog_mixed_size_cond_pattern): Likewise.
18859 (vect_recog_bool_pattern): Likewise.
18860 (vect_recog_mask_conversion_pattern): Likewise.
18861 (vect_try_gather_scatter_pattern): Likewise.
18862 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
18863 (vect_recog_over_widening_pattern): Likewise.
18864 (vect_recog_gather_scatter_pattern): Likewise.
18865 (vect_recog_func_ptr): Move from tree-vectorizer.h
18866 (vect_vect_recog_func_ptrs): Move further down the file.
18867 (vect_recog_func): Likewise. Remove the third argument.
18868 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
18869 (vect_pattern_recog_1): Expect the pattern function to do any
18870 necessary target tests. Also expect it to provide a vector type.
18871 Remove the type_in handling.
18872
18873 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18874
18875 * tree-vect-patterns.c (vect_pattern_detected): New function.
18876 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
18877 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
18878 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
18879 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
18880 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
18881 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
18882 (vect_recog_mask_conversion_pattern)
18883 (vect_try_gather_scatter_pattern): Likewise.
18884
18885 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18886
18887 * tree-vect-patterns.c (vect_get_internal_def): New function.
18888 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
18889 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
18890 (search_type_for_mask_1): Use it.
18891
18892 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18893
18894 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
18895 redundant WIDEN_SUM_EXPR handling.
18896 (vect_recog_sad_pattern): Likewise.
18897
18898 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18899
18900 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
18901 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
18902 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
18903 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
18904 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
18905
18906 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18907
18908 * tree-vect-stmts.c (vectorizable_call): Make sure that we
18909 use the stmt_vec_info of the original bb statement for the
18910 new zero assignment, even if the call is part of a pattern.
18911
18912 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18913
18914 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
18915 that the sequence is attached to the original statement rather
18916 than the pattern statement.
18917 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
18918 PATTERN_DEF_SEQ from the original statement rather than
18919 the main pattern statement.
18920 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
18921 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
18922 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
18923
18924 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18925
18926 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
18927 definition statements before the early exit for statements that aren't
18928 live or relevant.
18929 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
18930 split out from...
18931 (vect_transform_loop): ...here. Process pattern definition
18932 statements without first checking whether the main pattern
18933 statement is live or relevant.
18934
18935 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
18936
18937 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
18938 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
18939
18940 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
18941
18942 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
18943 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
18944 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
18945 (expand_block_compare): Change select_block_compare_mode call.
18946 (expand_strncmp_align_check): Use new functions, fix comment.
18947 (emit_final_str_compare_gpr): New function.
18948 (expand_strn_compare): Refactor and clean up code.
18949 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
18950
18951 2018-06-19 Tony Reix <tony.reix@atos.com>
18952 Damien Bergamini <damien.bergamini@atos.com>
18953 David Edelsohn <dje.gcc@gmail.com>
18954
18955 * collect2.c (static_obj): New variable.
18956 (static_libs): New variable.
18957 (is_in_list): Uncomment declaration.
18958 (main): Track AIX libraries linked statically.
18959 (is_in_list): Uncomment definition.
18960 (scan_prog_file): Don't add AIX shared libraries initializer
18961 to constructor list if linking statically.
18962
18963 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
18964
18965 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
18966 constant.
18967 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
18968
18969 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
18970
18971 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
18972 blocks.
18973
18974 2018-06-19 Martin Liska <mliska@suse.cz>
18975
18976 * config/i386/i386.c (ix86_can_inline_p): Do not use
18977 ipa_fn_summaries::get_create.
18978 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
18979 get.
18980 (devirtualization_time_bonus): Likewise.
18981 (ipcp_propagate_stage): Likewise.
18982 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18983 (edge_set_predicate): Likewise.
18984 (evaluate_conditions_for_known_args): Likewise.
18985 (evaluate_properties_for_edge): Likewise.
18986 (ipa_call_summary::reset): Tranform to ...
18987 (ipa_call_summary::~ipa_call_summary): ... this.
18988 (ipa_fn_summary::reset): Transform to ...
18989 (ipa_fn_summary::~ipa_fn_summary): ... this.
18990 (ipa_fn_summary_t::remove): Rename to ...
18991 (ipa_fn_summary_t::remove_callees): ... this.
18992 (ipa_fn_summary_t::duplicate): Use placement new
18993 instead of memory copy.
18994 (ipa_call_summary_t::duplicate): Likewise.
18995 (ipa_call_summary_t::remove): Remove.
18996 (dump_ipa_call_summary): Change get_create to get.
18997 (ipa_dump_fn_summary): Dump only when summary exists.
18998 (analyze_function_body): Use symbol_summary::get instead
18999 of get_create.
19000 (compute_fn_summary): Likewise.
19001 (estimate_edge_devirt_benefit): Likewise.
19002 (estimate_edge_size_and_time): Likewise.
19003 (inline_update_callee_summaries): Likewise.
19004 (remap_edge_change_prob): Likewise.
19005 (remap_edge_summaries): Likewise.
19006 (ipa_merge_fn_summary_after_inlining): Likewise.
19007 (write_ipa_call_summary): Likewise.
19008 (ipa_fn_summary_write): Likewise.
19009 (ipa_free_fn_summary): Likewise.
19010 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
19011 (struct ipa_call_summary): Likewise.
19012 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
19013 of get_create.
19014 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
19015 (estimate_size_after_inlining): Likewise.
19016 (estimate_growth): Likewise.
19017 (growth_likely_positive): Likewise.
19018 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
19019 (inline_call): Likewise.
19020 * ipa-inline.c (caller_growth_limits): Likewise.
19021 (can_inline_edge_p): Likewise.
19022 (can_inline_edge_by_limits_p): Likewise.
19023 (compute_uninlined_call_time): Likewise.
19024 (compute_inlined_call_time): Likewise.
19025 (want_inline_small_function_p): Likewise.
19026 (edge_badness): Likewise.
19027 (update_caller_keys): Likewise.
19028 (update_callee_keys): Likewise.
19029 (inline_small_functions): Likewise.
19030 (inline_to_all_callers_1): Likewise.
19031 (dump_overall_stats): Likewise.
19032 (early_inline_small_functions): Likewise.
19033 (early_inliner): Likewise.
19034 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
19035 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
19036 * ipa-pure-const.c (malloc_candidate_p): Likewise.
19037 * ipa-split.c (execute_split_functions): Likewise.
19038 * symbol-summary.h: Likewise.
19039 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
19040
19041 2018-06-19 Richard Biener <rguenther@suse.de>
19042
19043 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
19044 (vectorize_loops): ... here. Fix dbgcnt handling.
19045 (try_vectorize_loop): Wrap try_vectorize_loop_1.
19046
19047 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
19048
19049 PR target/86197
19050 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
19051 ieee128 argument takes up only one (vector) register, not two (floating
19052 point) registers.
19053
19054 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
19055
19056 * gimplify.c (gimplify_init_constructor): Really never clear for an
19057 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
19058
19059 2018-06-19 Richard Biener <rguenther@suse.de>
19060
19061 PR tree-optimization/86179
19062 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
19063 after failed recognition.
19064
19065 2018-06-18 Martin Sebor <msebor@redhat.com>
19066
19067 PR middle-end/85602
19068 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
19069 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
19070 Handle integer subtraction.
19071 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
19072 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
19073
19074 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19075
19076 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
19077 param from rtx to rtx_insn *.
19078 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
19079 param.
19080 (frv_ifcvt_modify_insn): Likwise.
19081 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
19082 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
19083 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
19084 as_a <rtx_insn *> cast to local "unprotected_region" once
19085 it's been established that it's not NULL or pc_rtx.
19086 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
19087 param "sethi" from rtx to rtx_insn *.
19088 (nds32_group_float_insns): Likewise for param "insn".
19089 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
19090 param.
19091 (vax_output_int_subtract): Likewise.
19092 * config/vax/vax.c (vax_output_int_add): Likewise for param
19093 "insn".
19094 (vax_output_int_subtract): Likewise.
19095 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
19096 (emit_pattern_after): Likewise for param "after".
19097 (emit_insn_after): Likewise.
19098 (emit_jump_insn_after): Likewise.
19099 (emit_call_insn_after): Likewise.
19100 (emit_debug_insn_after): Likewise.
19101 (emit_pattern_before): Likewise for param "before".
19102 (emit_insn_before): Likewise.
19103 (emit_jump_insn_before): Likewise.
19104 * final.c (get_insn_template): Likewise for param "insn", removing
19105 a cast.
19106 * output.h (get_insn_template): Likewise for 2nd param.
19107 * rtl.h (emit_insn_before): Likewise.
19108 (emit_jump_insn_before): Likewise.
19109 (emit_debug_insn_before_noloc): Likewise.
19110 (emit_insn_after): Likewise.
19111 (emit_jump_insn_after): Likewise.
19112 (emit_call_insn_after): Likewise.
19113 (emit_debug_insn_after): Likewise.
19114 (set_insn_deleted): Likewise for param.
19115
19116 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
19117
19118 PR target/85358
19119 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
19120 floating point modes, so that IFmode is numerically greater than
19121 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
19122 to declare the ordering. This prevents IFmode from being
19123 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
19124 machine. Include rs6000-modes.h to share the fractional values
19125 between genmodes* and the rest of the compiler.
19126 (IFmode): Likewise.
19127 (KFmode): Likewise.
19128 (TFmode): Likewise.
19129 * config/rs6000/rs6000-modes.h: New file.
19130 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
19131 meaning of rs6000_long_double_size so that 126..128 selects an
19132 appropriate 128-bit floating point type.
19133 (rs6000_option_override_internal): Likewise.
19134 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
19135 (TARGET_LONG_DOUBLE_128): Change the meaning of
19136 rs6000_long_double_size so that 126..128 selects an appropriate
19137 128-bit floating point type.
19138 (LONG_DOUBLE_TYPE_SIZE): Update comment.
19139 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
19140 source and destination to match the standard usage.
19141 (truncifkf2): Likewise.
19142 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
19143 ISA 2.07 to use an explicit clobber, instead of passing in a
19144 temporary.
19145 (copysign<mode>3_soft): Likewise.
19146
19147 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19148
19149 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
19150 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
19151 (vect_slp_analyze_instance_dependence): Likewise.
19152 (vect_enhance_data_refs_alignment): Likewise.
19153 (vect_analyze_data_refs_alignment): Likewise.
19154 (vect_slp_analyze_and_verify_instance_alignment
19155 (vect_analyze_data_ref_accesses): Likewise.
19156 (vect_prune_runtime_alias_test_list): Likewise.
19157 (vect_analyze_data_refs): Likewise.
19158 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
19159 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19160 (vect_analyze_scalar_cycles_1): Likewise.
19161 (vect_get_loop_niters): Likewise.
19162 (vect_analyze_loop_form_1): Likewise.
19163 (vect_update_vf_for_slp): Likewise.
19164 (vect_analyze_loop_operations): Likewise.
19165 (vect_analyze_loop): Likewise.
19166 (vectorizable_induction): Likewise.
19167 (vect_transform_loop): Likewise.
19168 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
19169 * tree-vect-slp.c (vect_analyze_slp): Likewise.
19170 (vect_make_slp_decision): Likewise.
19171 (vect_detect_hybrid_slp): Likewise.
19172 (vect_slp_analyze_operations): Likewise.
19173 (vect_slp_bb): Likewise.
19174 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
19175 (vectorizable_bswap): Likewise.
19176 (vectorizable_call): Likewise.
19177 (vectorizable_simd_clone_call): Likewise.
19178 (vectorizable_conversion): Likewise.
19179 (vectorizable_assignment): Likewise.
19180 (vectorizable_shift): Likewise.
19181 (vectorizable_operation): Likewise.
19182 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
19183
19184 2018-06-18 Martin Sebor <msebor@redhat.com>
19185
19186 PR tree-optimization/81384
19187 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
19188 * builtins.c (expand_builtin_strnlen): New function.
19189 (expand_builtin): Call it.
19190 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
19191 * builtins.def (BUILT_IN_STRNLEN): New.
19192 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
19193 Warn for bounds in excess of maximum object size.
19194 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
19195 single-value ranges. Handle strnlen.
19196 (handle_builtin_strlen): Handle strnlen.
19197 (strlen_check_and_optimize_stmt): Same.
19198 * doc/extend.texi (Other Builtins): Document strnlen.
19199
19200 2018-06-18 Maya Rashish <coypu@sdf.org>
19201
19202 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
19203 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
19204 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
19205
19206 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
19207 here to ...
19208 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
19209
19210 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19211
19212 * tree.c (escaped_string::escape): Replace cast to char * by
19213 const_cast<char *> (unescaped).
19214
19215 2018-06-18 Nick Clifton <nickc@redhat.com>
19216
19217 PR 84195
19218 * tree.c (escaped_string): New class. Converts an unescaped
19219 string into its escaped equivalent.
19220 (warn_deprecated_use): Use the new class to convert the
19221 deprecation message, if present.
19222 (test_escaped_strings): New self test.
19223 (test_c_tests): Add test_escaped_strings.
19224 * doc/extend.texi (deprecated): Add a note that the
19225 deprecation message is affected by the -fmessage-length
19226 option, and that control characters will be escaped.
19227 (#pragma GCC error): Document this pragma.
19228 (#pragma GCC warning): Likewise.
19229 * doc/invoke.texi (-fmessage-length): Document this option's
19230 effect on the #warning and #error preprocessor directives and
19231 the deprecated attribute.
19232
19233 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
19234
19235 * tree.c (decl_value_expr_lookup): Revert latest change.
19236 (decl_value_expr_insert): Likewise.
19237
19238 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
19239
19240 * gimplify.c (nonlocal_vlas): Delete.
19241 (nonlocal_vla_vars): Likewise.
19242 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
19243 referenced VLAs.
19244 (gimplify_body): Do not create and destroy nonlocal_vlas.
19245 * tree-nested.c: Include diagnostic.h.
19246 (use_pointer_in_frame): Tweak.
19247 (lookup_field_for_decl): Add assertion and declare the transformation.
19248 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
19249 internal error when the reference is in a wrong context. Do not
19250 create a debug decl by default.
19251 (note_nonlocal_block_vlas): Delete.
19252 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
19253 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
19254 create a debug decl by default.
19255 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
19256 call is in a wrong context.
19257 (fixup_vla_decls): New function.
19258 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
19259 debug variables were created.
19260 * tree.c (decl_value_expr_lookup): Add checking assertion.
19261 (decl_value_expr_insert): Likewise.
19262
19263 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19264
19265 PR middle-end/82479
19266 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
19267 * tree-scalar-evolution.c (interpret_expr): Likewise.
19268 (expression_expensive_p): Likewise.
19269 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
19270 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
19271 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
19272 (ssa_defined_by_minus_one_stmt_p): New.
19273
19274 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19275
19276 PR middle-end/64946
19277 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
19278 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
19279 * dojump.c (do_jump): Likewise.
19280 * expr.c (expand_expr_real_2): Check operand type's sign.
19281 * fold-const.c (const_unop): Handle ABSU_EXPR.
19282 (fold_abs_const): Likewise.
19283 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
19284 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
19285 (strip_sign_op_1): Likesise.
19286 * match.pd: Add new pattern to generate ABSU_EXPR.
19287 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
19288 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19289 * tree-eh.c (operation_could_trap_helper_p): Likewise.
19290 * tree-inline.c (estimate_operator_cost): Likewise.
19291 * tree-pretty-print.c (dump_generic_node): Likewise.
19292 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
19293 * tree.def (ABSU_EXPR): New.
19294
19295 2018-06-16 Jakub Jelinek <jakub@redhat.com>
19296
19297 PR middle-end/86095
19298 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
19299 documented as preserved for backward compatibility only.
19300 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
19301
19302 PR rtl-optimization/86108
19303 * bb-reorder.c (create_forwarder_block): Renamed to ...
19304 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
19305 jump from new landing pad to the second part.
19306 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
19307 Adjust callers.
19308
19309 2018-06-15 Jakub Jelinek <jakub@redhat.com>
19310
19311 PR middle-end/85878
19312 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
19313 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
19314 Only call store_expr for halves if the mode is the same.
19315
19316 PR middle-end/86123
19317 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
19318 Fix up comment formatting.
19319
19320 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
19321
19322 * typed-splay-tree.h (typed_splay_tree::remove): New function.
19323 (typed_splay_tree::closure,
19324 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
19325 (typed_splay_tree::typed_splay_tree,
19326 typed_splay_tree::operator =): Declared private.
19327 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
19328 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
19329 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
19330 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
19331 typed_splay_tree::splay_tree_splay,
19332 typed_splay_tree::splay_tree_foreach_helper,
19333 typed_splay_tree::splay_tree_insert,
19334 typed_splay_tree::splay_tree_remove,
19335 typed_splay_tree::splay_tree_lookup,
19336 typed_splay_tree::splay_tree_predecessor,
19337 typed_splay_tree::splay_tree_successor,
19338 typed_splay_tree::splay_tree_min,
19339 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
19340 (typed_splay_tree::root, typed_splay_tree::comp,
19341 typed_splay_tree::delete_key,
19342 typed_splay_tree::delete_value): New data members.
19343 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
19344 typed_splay_tree::remove.
19345
19346 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
19347
19348 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
19349 -mginv and -mno-ginv to the assembler.
19350 * config/mips/mips.opt (-mcrc): New option.
19351 (-mginv): Likewise.
19352 * doc/invoke.text (-mcrc): Document.
19353 (-mginv): Likewise.
19354
19355 2018-06-15 Nick Clifton <nickc@redhat.com>
19356
19357 PR 84195
19358 * tree.c (escaped_string): New class. Converts an unescaped
19359 string into its escaped equivalent.
19360 (warn_deprecated_use): Use the new class to convert the
19361 deprecation message, if present.
19362 (test_escaped_strings): New self test.
19363 (test_c_tests): Add test_escaped_strings.
19364 * doc/extend.texi (deprecated): Add a note that the
19365 deprecation message is affected by the -fmessage-length
19366 option, and that control characters will be escaped.
19367 (#pragma GCC error): Document this pragma.
19368 (#pragma GCC warning): Likewise.
19369 * doc/invoke.texi (-fmessage-length): Document this option's
19370 effect on the #warning and #error preprocessor directives and
19371 the deprecated attribute.
19372
19373 2018-06-15 Richard Biener <rguenther@suse.de>
19374
19375 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
19376 here, also noting vector size used.
19377 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
19378 size used in MSG_OPTIMIZED_LOCATIONS dump.
19379 (pass_slp_vectorize::execute): Adjust.
19380
19381 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
19382
19383 PR target/85968
19384 * config/arc/arc.c (arc_return_address_register): Fix
19385 if-condition.
19386
19387 2018-06-15 Richard Biener <rguenther@suse.de>
19388
19389 PR middle-end/86159
19390 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
19391 leave useless conversion stripping to force_gimple_operand_gsi.
19392 (gimplify_build2): Likewise.
19393 (gimplify_build1): Likewise.
19394
19395 2018-06-15 Richard Biener <rguenther@suse.de>
19396
19397 PR middle-end/86076
19398 * tree-cfg.c (move_stmt_op): unshare invariant addresses
19399 before adjusting their block.
19400
19401 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
19402
19403 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
19404 multilibs for *-*-rtems*.
19405 * config/riscv/t-rtems: New file.
19406
19407 2018-06-14 Jakub Jelinek <jakub@redhat.com>
19408
19409 PR middle-end/86122
19410 * match.pd ((A +- CST1) +- CST2): Punt if last resort
19411 unsigned_type_for returns NULL.
19412
19413 PR target/85945
19414 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
19415 subregs of multi-word pseudos unless the float mode has word size.
19416
19417 2018-06-14 Richard Biener <rguenther@suse.de>
19418
19419 PR middle-end/86139
19420 * tree-vect-generic.c (build_word_mode_vector_type): Remove
19421 duplicate and harmful type_hash_canon.
19422 * tree.c (type_hash_canon): Assert we didn't find ourselves.
19423
19424 2018-06-14 Richard Biener <rguenther@suse.de>
19425
19426 PR ipa/86124
19427 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
19428 NULL cgraph_node.
19429
19430 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
19431
19432 * config/rtems.h (STDINT_LONG32): Define.
19433
19434 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
19435 Prachi Godbole <prachi.godbole@imgtec.com>
19436
19437 * config/mips/mips-cpus.def: Define P6600.
19438 * config/mips/mips-tables.opt: Regenerate.
19439 * config/mips/mips.c (mips_ucbranch_type): New enum.
19440 (mips_rtx_cost_data): Add support for P6600.
19441 (mips_issue_rate): Likewise.
19442 (mips_multipass_dfa_lookahead): Likewise.
19443 (mips_avoid_hazard): Likewise.
19444 (mips_reorg_process_insns): Likewise.
19445 (mips_classify_branch_p6600): New function.
19446 * config/mips/mips.h (TUNE_P6600): New define.
19447 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
19448 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
19449 * config/mips/mips.md: Include p6600.md.
19450 (processor): Add p6600.
19451 * config/mips/p6600.md: New file.
19452 * doc/invoke.texi: Add p6600 to supported architectures.
19453
19454 2018-06-13 Martin Sebor <msebor@redhat.com>
19455
19456 PR tree-optimization/86114
19457 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
19458 of integer types.
19459 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
19460
19461 2018-06-13 Richard Biener <rguenther@suse.de>
19462
19463 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
19464 Properly set vector type of the intermediate stmt.
19465 * tree-vect-stmts.c (vectorizable_operation): The destination
19466 var always has vectype_out type.
19467
19468 2018-06-13 Jeff Law <law@redhat.com>
19469
19470 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
19471 integer 0 for argument to print_rtl_with_bb.
19472 (rl78_reorg): Likewise.
19473
19474 2018-06-13 David Malcolm <dmalcolm@redhat.com>
19475
19476 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
19477 from rtx to rtx_insn *.
19478 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
19479 "label".
19480 (add_sched_insns_for_speculation): Likewise for local "target",
19481 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19482 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
19483 from rtx_insn ** to rtx_code_label **.
19484 (reorg_emit_nops): Likewise.
19485 (c6x_reorg): Likewise for local "call_labels".
19486 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
19487 rtx to rtx_insn *.
19488 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
19489 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
19490 the loops over LABEL_REFS.
19491 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
19492 braf_label.
19493 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19494 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
19495 (split_branches): Strengthen local "olabel" from rtx to
19496 rtx_insn *, adding a safe_as_a cast.
19497 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
19498 to "rtx_insn *".
19499 (add_insn_after): Likewise for first two params.
19500 (add_insn_before): Likewise.
19501 (remove_insn): Likewise for param.
19502 (emit_pattern_before_noloc): Likewise for second and third params.
19503 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
19504 (emit_call_insn_before_noloc): Likewise.
19505 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
19506 to "rtx_insn *".
19507 (emit_barrier_before): Likewise.
19508 (emit_label_before): Strengthen "label" param from "rtx" to
19509 "rtx_code_label *". Strengthen "before" param from "rtx" to
19510 "rtx_insn *".
19511 (emit_insn_after_1): Strengthen "after" param from "rtx" to
19512 "rtx_insn *".
19513 (emit_pattern_after_noloc): Likewise.
19514 (emit_insn_after_noloc): Likewise.
19515 (emit_jump_insn_after_noloc): Likewise.
19516 (emit_call_insn_after_noloc): Likewise.
19517 (emit_debug_insn_after_noloc): Likewise.
19518 (emit_barrier_after): Likewise.
19519 (emit_label_after): Likewise for both params.
19520 (emit_pattern_after_setloc): Likewise for "after" param. Convert
19521 "loc" param from "int" to "location_t".
19522 (emit_insn_after_setloc): Likewise.
19523 (emit_jump_insn_after_setloc): Likewise.
19524 (emit_call_insn_after_setloc): Likewise.
19525 (emit_debug_insn_after_setloc): Likewise.
19526 (emit_pattern_before_setloc): Likewise for "before" param. Convert
19527 "loc" param from "int" to "location_t".
19528 (emit_pattern_before): Convert NULL_RTX to NULL.
19529 (emit_insn_before_setloc): Convert "loc" param from "int" to
19530 "location_t".
19531 (emit_jump_insn_before_setloc): Likewise.
19532 (emit_call_insn_before_setloc): Likewise.
19533 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
19534 rtx_insn *. Convert "loc" param from "int" to "location_t".
19535 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
19536 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
19537 Convert 3rd param from "int" to "location_t".
19538 (emit_barrier_before, emit_barrier_after, next_real_insn):
19539 Strengthen param from rtx to rtx_insn *.
19540 (emit_label_before): Strengthen 1st param from "rtx" to
19541 "rtx_code_label *". Strengthen 2nd param from "rtx" to
19542 "rtx_insn *".
19543 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
19544 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
19545 Strengthen 2nd param from "rtx" to "rtx_insn *".
19546 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
19547 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
19548 Likewise. Convert 3rd param from "int" to "location_t".
19549 (emit_label_after): Strengthen 1st param from "rtx" to
19550 "rtx_code_label *".
19551 (next_real_insn, remove_insn): Strengthen param from "rtx" to
19552 "rtx_insn *".
19553 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
19554 from "rtx" to "rtx_insn *".
19555
19556 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
19557
19558 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
19559 bodies streamed in with -Q.
19560 * dumpfile.c (dump_files): Add lto-stream-out dump file.
19561 * dumpfile.h (tree_dump_index): Add lto_stream_out.
19562 * gimple-streamer-out.c: Include gimple-pretty-print.h
19563 (output_bb): Dump stmts streamed.
19564 * lto-section-out.c: Include print-tree.h
19565 (lto_begin_section): Dump sections created.
19566 (lto_output_decl_index): Dump decl encoded.
19567 * lto-streamer-out.c: Include print-tree.h
19568 (create_output_block): Dump output block created.
19569 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
19570 (output_function): Dump function output.
19571 (output_constructor): Dump constructor streamed.
19572 (write_global_stream): Output indexes encoded.
19573 (produce_asm_for_decls): Dump streams encoded.
19574 * lto-streamer.c (streamer_dump_file): New global var.
19575 * lto-streamer.h (streamer_dump_file): Declare.
19576 * passes.c (ipa_write_summaries): Initialize streamer dump.
19577 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
19578 in.
19579
19580 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
19581
19582 PR target/86048
19583 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
19584 offsets for register save directives. Emit a second batch of save
19585 directives, if need be, when the function accesses prior frames.
19586
19587 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19588
19589 * config/arc/fpu.md (fmasf4): Force operand to register.
19590 (fnmasf4): Likewise.
19591
19592 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19593
19594 * config/arc/arc-protos.h (arc_pad_return): Remove.
19595 * config/arc/arc.c (machine_function): Remove force_short_suffix
19596 and size_reason.
19597 (arc_print_operand): Adjust printing of '&'.
19598 (arc_verify_short): Remove conditional printing of short suffix.
19599 (arc_final_prescan_insn): Remove reference to size_reason.
19600 (pad_return): New function.
19601 (arc_reorg): Call pad_return.
19602 (arc_pad_return): Remove.
19603 (arc_init_machine_status): Remove reference to force_short_suffix.
19604 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
19605 (attr length): When attribute iscompact is true force to 2
19606 regardless; in the case of maybe check if we want to force the
19607 instruction to have 4 bytes length.
19608 (nopv): Change it to generate 4 byte long nop as well.
19609 (blockage): New pattern.
19610 (simple_return): Remove call to arc_pad_return.
19611 (p_return_i): Likewise.
19612
19613 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19614
19615 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
19616
19617 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19618
19619 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
19620 ARC cores.
19621
19622 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19623
19624 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
19625 for ARC700 and ARCv2.
19626
19627 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
19628
19629 PR target/86076
19630 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
19631 operands[2] instead of operands[1].
19632
19633
19634 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19635
19636 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
19637 case, check whether the outer register overlaps an unallocatable
19638 register, not just whether it fits the required class.
19639
19640 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19641
19642 * poly-int.h (can_div_trunc_p): Add new overload in which all values
19643 are poly_ints.
19644 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
19645 (memrefs_conflict_p): Likewise.
19646 (init_alias_analysis): Likewise.
19647 * cfgexpand.c (expand_debug_expr): Likewise.
19648 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
19649 * cse.c (fold_rtx): Likewise.
19650 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
19651 * expr.c (emit_block_move_hints): Likewise.
19652 (clear_storage_hints, push_block, emit_push_insn): Likewise.
19653 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
19654 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
19655 (emit_group_store): Likewise.
19656 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
19657 to read the PRE/POST_MODIFY increment.
19658 * calls.c (store_one_arg): Use strip_offset.
19659 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
19660 poly_int_rtx_p.
19661 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
19662 by a VEC_SELECT.
19663 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
19664 (simplify_binary_operation_1): Extend CONST_INT handling to
19665 poly_int_rtx_p.
19666 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
19667 than a HOST_WIDE_INT.
19668 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
19669 poly_int64.
19670 (adjust_mems, add_stores): Update accodingly.
19671 (vt_canonicalize_addr): Track polynomial offsets.
19672 (emit_note_insn_var_location): Likewise.
19673 (vt_add_function_parameter): Likewise.
19674 (vt_initialize): Likewise.
19675
19676 2018-06-12 Jeff Law <law@redhat.com>
19677
19678 * config.gcc (alpha*-*-freebsd*): Remove.
19679 * config/alpha/freebsd.h: Remove.
19680
19681 2018-06-12 David Malcolm <dmalcolm@redhat.com>
19682
19683 PR other/69968
19684 * spellcheck-tree.c (levenshtein_distance): Rename to...
19685 (get_edit_distance): ...this, and update for underlying renaming.
19686 * spellcheck-tree.h (levenshtein_distance): Rename to...
19687 (get_edit_distance): ...this.
19688 * spellcheck.c (levenshtein_distance): Rename to...
19689 (get_edit_distance): ...this. Convert from Levenshtein distance
19690 to Damerau-Levenshtein distance by supporting transpositions of
19691 adjacent characters. Rename "v1" to "v_next" and "v0" to
19692 "v_one_ago".
19693 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
19694 (selftest::test_edit_distance_unit_test_oneway): ...this, and
19695 update for underlying renaming.
19696 (selftest::levenshtein_distance_unit_test): Rename to...
19697 (selftest::test_get_edit_distance_unit): ...this, and update for
19698 underlying renaming.
19699 (selftest::test_find_closest_string): Add example from PR 69968
19700 where transposition helps
19701 (selftest::test_metric_conditions): Update for renaming.
19702 (selftest::test_metric_conditions): Likewise.
19703 (selftest::spellcheck_c_tests): Likewise.
19704 * spellcheck.h (levenshtein_distance): Rename both overloads to...
19705 (get_edit_distance): ...this.
19706 (best_match::consider): Update for renaming.
19707
19708 2018-06-12 Martin Sebor <msebor@redhat.com>
19709
19710 PR tree-optimization/85259
19711 * builtins.c (compute_objsize): Handle constant offsets.
19712 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
19713 true iff a warning has been issued.
19714 * gimple.h (gimple_nonartificial_location): New function.
19715 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
19716 gimple_nonartificial_location and handle -Wno-system-headers.
19717 (handle_builtin_stxncpy): Same.
19718
19719 2018-06-12 Martin Sebor <msebor@redhat.com>
19720
19721 PR c/85931
19722 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
19723
19724 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
19725
19726 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19727 BUILTIN_VEC_XST entries for pointer to double and long long.
19728
19729 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
19730
19731 PR target/85990
19732 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19733 Update comments.
19734 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19735 Likewise.
19736
19737 2018-06-12 Martin Liska <mliska@suse.cz>
19738
19739 * doc/options.texi: Document IntegerRange.
19740
19741 2018-06-12 Martin Liska <mliska@suse.cz>
19742
19743 * config/i386/i386.opt: Make MPX-related options as Deprecated.
19744 * opt-functions.awk: Handle Deprecated flag.
19745 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
19746 and report error.
19747 (read_cmdline_option): Report warning for a deprecated option.
19748 * opts.h (struct cl_option): Add new field cl_deprecated.
19749 (CL_ERR_DEPRECATED): New.
19750
19751 2018-06-12 Martin Liska <mliska@suse.cz>
19752
19753 * doc/options.texi: Document Deprecated option flag.
19754
19755 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19756
19757 * config/arc/arc-arch.h (arc_extras): New enum.
19758 (arc_cpu_t):Add field extra.
19759 (arc_cpu_types): Consider the extras.
19760 * config/arc/arc-cpus.def: Add extras info.
19761 * config/arc/arc-opts.h (processor_type): Consider extra field.
19762 * config/arc/arc.c (arc_override_options): Handle extra field.
19763
19764 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19765
19766 * config/arc/arc-arch.h: Update ARC_OPTX macro.
19767 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
19768 field.
19769 * config/arc/arc.c (arc_init): Update pic warning.
19770 (irq_range): Update irq range parsing warnings.
19771 (arc_override_options): Update various warning messages.
19772 (arc_handle_aux_attribute): Likewise.
19773
19774 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
19775
19776 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
19777
19778 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19779
19780 * doc/sourcebuild.texi: Document usage of line number 0 in verify
19781 compiler messages directives.
19782
19783 2018-06-12 Matthew Fortune <mfortune@gmail.com>
19784
19785 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
19786 * config/mips/mips-tables.opt: Regenerate.
19787 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
19788 mips64r6.
19789 * doc/invoke.texi: Document -march=i6500.
19790
19791 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
19792
19793 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
19794 (i6400_gpmul): Add cpu_unit.
19795 (i6400_gpdiv): Likewise.
19796 (i6400_msa_add_d): Update reservations.
19797 (i6400_msa_int_add) Likewise.
19798 (i6400_msa_short_logic3) Likewise.
19799 (i6400_msa_short_logic2) Likewise.
19800 (i6400_msa_short_logic) Likewise.
19801 (i6400_msa_move) Likewise.
19802 (i6400_msa_cmp) Likewise.
19803 (i6400_msa_short_float2) Likewise.
19804 (i6400_msa_div_d) Likewise.
19805 (i6400_msa_long_logic1) Likewise.
19806 (i6400_msa_long_logic2) Likewise.
19807 (i6400_msa_mult) Likewise.
19808 (i6400_msa_long_float2) Likewise.
19809 (i6400_msa_long_float4) Likewise.
19810 (i6400_msa_long_float5) Likewise.
19811 (i6400_msa_long_float8) Likewise.
19812 (i6400_fpu_fadd): Include frint type.
19813 (i6400_fpu_store): New define_insn_reservation.
19814 (i6400_fpu_load): Likewise.
19815 (i6400_fpu_move): Likewise.
19816 (i6400_fpu_fcmp): Likewise.
19817 (i6400_fpu_fmadd): Likewise.
19818 (i6400_int_mult): Include imul3nc type and update reservation.
19819 (i6400_int_div): Include idiv3 type and update reservation.
19820 (i6400_int_load): Update to check type not move_type.
19821 (i6400_int_store): Likewise.
19822 (i6400_int_prefetch): Set zero latency.
19823
19824 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
19825
19826 * gcc.c: Document new %@{...} sequence.
19827 (LINK_COMMAND_SPEC): Use it for the -L switches.
19828 (cpp_unique_options): Use it for the -I switches.
19829 (at_file_argbuf): New global variable.
19830 (in_at_file): Likewise.
19831 (alloc_args): Create at_file_argbuf.
19832 (clear_args): Truncate at_file_argbuf.
19833 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
19834 (open_at_file): New function.
19835 (close_at_file): Likewise.
19836 (create_at_file): Delete.
19837 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
19838 <'o'>: Likewise.
19839 <'@'>: New case.
19840 (validate_switches_from_spec): Deal with %@{...} sequence.
19841 (validate_switches): Likewise.
19842 (driver::finalize): Call clear_args.
19843
19844 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
19845
19846 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
19847
19848 2018-06-11 Martin Sebor <msebor@redhat.com>
19849
19850 * doc/invoke.texi (-Wall): List -Wc++17-compat.
19851 (Wno-class-memaccess): Add @opindex.
19852 (Wno-templates, Wno-multiple-inheritance): Same.
19853 (Wno-virtual-inheritance, Wno-namespaces): Same.
19854 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
19855 (Wno-format-overflow, Wno-format-truncation): Same.
19856 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
19857 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
19858 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
19859 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
19860 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
19861 (Wno-misspelled-isr): Same.
19862
19863 2018-06-11 Martin Sebor <msebor@redhat.com>
19864
19865 * PR tree-optimization/86083
19866 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
19867
19868 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
19869
19870 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
19871
19872 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
19873
19874 PR target/85755
19875 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
19876 on the correct operand.
19877 (*movdi_internal64): Ditto.
19878
19879 2018-06-11 Martin Liska <mliska@suse.cz>
19880
19881 PR tree-optimization/86089
19882 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
19883
19884 2018-06-11 Julia Koval <julia.koval@intel.com>
19885
19886 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
19887 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
19888 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
19889
19890 2018-06-11 Olivier Hainque <hainque@adacore.com>
19891
19892 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
19893 for Ada with strict dwarf2.
19894
19895 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
19896
19897 PR target/85755
19898 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
19899 addresses.
19900
19901 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
19902
19903 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
19904
19905 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
19906
19907 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
19908 TARGET_ELF.
19909
19910 2018-06-08 Martin Liska <mliska@suse.cz>
19911
19912 * tree-cfg.h (debug_function): Fix argument type to match
19913 implementation.
19914
19915 2018-06-08 Martin Liska <mliska@suse.cz>
19916
19917 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
19918 Remove usage of MPX-related (and removed) fields.
19919 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
19920
19921 2018-06-08 David Malcolm <dmalcolm@redhat.com>
19922
19923 * cfg.c (debug): Use TDF_NONE rather than 0.
19924 * cfghooks.c (debug): Likewise.
19925 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
19926 (struct dump_option_value_info): Convert to...
19927 (struct kv_pair): ...this template type.
19928 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
19929 rather than 0.
19930 (optinfo_verbosity_options): Likewise.
19931 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
19932 OPTGROUP_NONE.
19933 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
19934 than int for "optgroup_flags" param.
19935 (dump_generic_expr_loc): Use dump_flags_t rather than int for
19936 "dump_kind" param.
19937 (dump_dec): Likewise.
19938 (dump_finish): Use TDF_NONE rather than 0.
19939 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
19940 rather than int for "optgroup_flags" param. Use TDF_NONE rather
19941 than 0. Update for change to option_ptr.
19942 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
19943 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
19944 0. Update for changes to optinfo_verbosity_options and
19945 optgroup_options.
19946 (opt_info_switch_p): Convert optgroup_flags from int to
19947 optgroup_flags_t.
19948 (dump_basic_block): Use dump_flags_t rather than int
19949 for "dump_kind" param.
19950 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
19951 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
19952 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
19953 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
19954 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
19955 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
19956 TDF_NONE): Convert from macros to...
19957 (enum dump_flag): ...this new enum.
19958 (dump_flags_t): Update to use enum.
19959 (operator|, operator&, operator~, operator|=, operator&=):
19960 Implement for dump_flags_t.
19961 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
19962 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
19963 Convert from macros to...
19964 (enum optgroup_flag): ...this new enum.
19965 (optgroup_flags_t): New typedef.
19966 (operator|, operator|=): Implement for optgroup_flags_t.
19967 (struct dump_file_info): Convert field "alt_flags" to
19968 dump_flags_t. Convert field "optgroup_flags" to
19969 optgroup_flags_t.
19970 (dump_basic_block): Use dump_flags_t rather than int for param.
19971 (dump_generic_expr_loc): Likewise.
19972 (dump_dec): Likewise.
19973 (dump_register): Convert param "optgroup_flags" to
19974 optgroup_flags_t.
19975 (opt_info_enable_passes): Likewise.
19976 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
19977 than 0.
19978 * gimple-pretty-print.c (debug): Likewise.
19979 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
19980 (merged_store_group::apply_stores): Likewise.
19981 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
19982 * gimple.c (verify_gimple_pp): Likewise.
19983 * graphite-poly.c (print_pbb_body): Likewise.
19984 * passes.c (pass_manager::register_one_dump_file): Convert
19985 local "optgroup_flags" to optgroup_flags_t.
19986 * print-tree.c (print_node): Use TDF_NONE rather than 0.
19987 (debug): Likewise.
19988 (debug_body): Likewise.
19989 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
19990 to optgroup_flags_t.
19991 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
19992 than 0.
19993 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
19994 (convert_mult_to_fma): Likewise.
19995 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
19996 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
19997 * tree-vect-data-refs.c (dump_lower_bound): Convert param
19998 "dump_kind" to dump_flags_t.
19999
20000 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20001
20002 * config/rs6000/rs6000.c (min, max): Delete.
20003
20004 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20005
20006 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
20007 -mabi=spe and -mabi=no-spe.
20008
20009 2018-06-08 Martin Liska <mliska@suse.cz>
20010
20011 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
20012 where we expect an existing summary.
20013
20014 2018-06-08 Martin Liska <mliska@suse.cz>
20015
20016 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
20017 * ipa-inline.h (estimate_edge_growth): Likewise.
20018
20019 2018-06-08 Martin Liska <mliska@suse.cz>
20020
20021 * cgraph.c (function_version_hasher::hash): Use
20022 cgraph_node::get_uid ().
20023 (function_version_hasher::equal):
20024 * cgraph.h (cgraph_node::get_uid): New method.
20025 * ipa-inline.c (update_caller_keys): Use
20026 cgraph_node::get_uid ().
20027 (update_callee_keys): Likewise.
20028 * ipa-utils.c (searchc): Likewise.
20029 (ipa_reduced_postorder): Likewise.
20030 * lto-cgraph.c (input_node): Likewise.
20031 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
20032 * symbol-summary.h (symtab_insertion): Likewise.
20033 (symtab_removal): Likewise.
20034 (symtab_duplication): Likewise.
20035 * tree-pretty-print.c (dump_function_header): Likewise.
20036 * tree-sra.c (convert_callers_for_node): Likewise.
20037
20038 2018-06-08 Martin Liska <mliska@suse.cz>
20039
20040 * cgraph.c (symbol_table::create_edge): Always assign a new
20041 unique number.
20042 (symbol_table::free_edge): Do not recycle numbers.
20043 * cgraph.h (cgraph_edge::get): New method.
20044 * symbol-summary.h (symtab_removal): Use it.
20045 (symtab_duplication): Likewise.
20046 (call_summary::hashable_uid): Remove.
20047
20048 2018-06-08 Martin Liska <mliska@suse.cz>
20049
20050 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
20051 (initialize_growth_caches): Remove.
20052 (free_growth_caches): Likewise.
20053 (do_estimate_edge_time): Use edge_growth_cache.
20054 (do_estimate_edge_size): Likewise.
20055 (do_estimate_edge_hints): Likewise.
20056 * ipa-inline.c (reset_edge_caches): Likewise.
20057 (recursive_inlining): Likewise.
20058 (inline_small_functions): Likewise.
20059 * ipa-inline.h (initialize_growth_caches): Remove.
20060 (estimate_edge_size): Likewise.
20061 (estimate_edge_time): Likewise.
20062 (estimate_edge_hints): Likewise.
20063 (reset_edge_growth_cache): Likewise.
20064 * symbol-summary.h (call_summary::remove): New method.
20065
20066 2018-06-08 Martin Liska <mliska@suse.cz>
20067
20068 * ipa-cp.c (class edge_clone_summary): New summary.
20069 (grow_edge_clone_vectors): Remove.
20070 (ipcp_edge_duplication_hook): Remove.
20071 (class edge_clone_summary_t): New call_summary class.
20072 (ipcp_edge_removal_hook): Remove.
20073 (edge_clone_summary_t::duplicate): New function.
20074 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
20075 (create_specialized_node): Likewise.
20076 (ipcp_driver): Initialize edge_clone_summaries and do not
20077 register hooks.
20078
20079 2018-06-08 Martin Liska <mliska@suse.cz>
20080
20081 * symbol-summary.h (get): New function.
20082 (call_summary::m_initialize_when_cloning): New class member.
20083
20084 2018-06-08 Martin Liska <mliska@suse.cz>
20085
20086 * cgraph.c (cgraph_node::remove): Do not recycle uid.
20087 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
20088 (symbol_table::allocate_cgraph_symbol): Do not set uid.
20089 * passes.c (uid_hash_t): Record removed_nodes by their uids.
20090 (remove_cgraph_node_from_order): Use the removed_nodes set.
20091 (do_per_function_toporder): Likwise.
20092 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
20093 instead of summary_uid.
20094 (symtab_removal): Likewise.
20095 (symtab_duplication): Likewise.
20096
20097 2018-06-08 Martin Liska <mliska@suse.cz>
20098
20099 * ipa-cp.c (ipcp_store_bits_results): Use
20100 ipcp_transformation_sum.
20101 (ipcp_store_vr_results): Likewise.
20102 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
20103 to ...
20104 (ipcp_transformation_initialize): ... this.
20105 (ipa_set_node_agg_value_chain):
20106 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
20107 (write_ipcp_transformation_info): Likewise.
20108 (read_ipcp_transformation_info): Likewise.
20109 (ipcp_update_bits): Likewise.
20110 (ipcp_update_vr): Likewise.
20111 (ipcp_transform_function): Likewise.
20112 * ipa-prop.h: Rename ipcp_transformation_summary to
20113 ipcp_transformation.
20114 (class ipcp_transformation_t): New function summary.
20115 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
20116 (ipa_get_agg_replacements_for_node): Likewise.
20117
20118 2018-06-08 Martin Liska <mliska@suse.cz>
20119
20120 * ipa-pure-const.c (struct funct_state_d): Do it class instead
20121 of struct.
20122 (class funct_state_summary_t): New function_summary class.
20123 (has_function_state): Remove.
20124 (get_function_state): Likewise.
20125 (set_function_state): Likewise.
20126 (add_new_function): Likewise.
20127 (funct_state_summary_t::insert): New function.
20128 (duplicate_node_data): Remove.
20129 (remove_node_data): Remove.
20130 (funct_state_summary_t::duplicate): New function.
20131 (register_hooks): Create new funct_state_summaries.
20132 (pure_const_generate_summary): Use it.
20133 (pure_const_write_summary): Likewise.
20134 (pure_const_read_summary): Likewise.
20135 (propagate_pure_const): Likewise.
20136 (propagate_nothrow): Likewise.
20137 (dump_malloc_lattice): Likewise.
20138 (propagate_malloc): Likewise.
20139 (execute): Do not register hooks, just remove summary
20140 instead.
20141 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
20142 constructor.
20143
20144 2018-06-08 Martin Liska <mliska@suse.cz>
20145
20146 * ipa-reference.c (remove_node_data): Remove.
20147 (duplicate_node_data): Likewise.
20148 (class ipa_ref_var_info_summary_t): New class.
20149 (class ipa_ref_opt_summary_t): Likewise.
20150 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
20151 (get_reference_optimization_summary): Use
20152 ipa_ref_opt_sum_summaries.
20153 (set_reference_vars_info): Remove.
20154 (set_reference_optimization_summary): Likewise.
20155 (ipa_init): Create summaries.
20156 (init_function_info): Use function summary.
20157 (ipa_ref_opt_summary_t::duplicate): New function.
20158 (ipa_ref_opt_summary_t::remove): New function.
20159 (get_read_write_all_from_node): Fix GNU coding style.
20160 (propagate): Use function summary.
20161 (write_node_summary_p): Fix GNU coding style.
20162 (stream_out_bitmap): Likewise.
20163 (ipa_reference_read_optimization_summary): Use function summary.
20164 (ipa_reference_c_finalize): Do not release hooks.
20165
20166 2018-06-08 Martin Liska <mliska@suse.cz>
20167
20168 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
20169 (analyze_function_body): Extract multiple calls of get_create.
20170 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20171 * ipa-inline.c (recursive_inlining): Use ::get method.
20172 * ipa-inline.h (estimate_edge_growth): Likewise.
20173
20174 2018-06-08 Martin Liska <mliska@suse.cz>
20175
20176 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
20177 HSA_INVALID.
20178 (hsa_function_summary::hsa_function_summary): Use the new enum
20179 value.
20180 (hsa_gpu_implementation_p): Use hsa_summaries::get.
20181 * hsa-gen.c (hsa_get_host_function): Likewise.
20182 (get_brig_function_name): Likewise.
20183 * ipa-hsa.c (process_hsa_functions): Likewise.
20184 (ipa_hsa_write_summary): Likewise.
20185 * symbol-summary.h (symtab_duplication): Use ::get function/
20186 (get): New function.
20187
20188 2018-06-08 Martin Liska <mliska@suse.cz>
20189
20190 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
20191 of get.
20192 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
20193 (hsa_register_kernel): Likewise.
20194 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
20195 * hsa-gen.c (hsa_get_host_function): Likewise.
20196 (get_brig_function_name): Likewise.
20197 (generate_hsa): Likewise.
20198 (pass_gen_hsail::execute): Likewise.
20199 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
20200 (devirtualization_time_bonus): Likewise.
20201 (ipcp_propagate_stage): Likewise.
20202 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
20203 (edge_set_predicate): Likewise.
20204 (evaluate_conditions_for_known_args): Likewise.
20205 (evaluate_properties_for_edge): Likewise.
20206 (ipa_fn_summary::reset): Likewise.
20207 (ipa_fn_summary_t::duplicate): Likewise.
20208 (dump_ipa_call_summary): Likewise.
20209 (ipa_dump_fn_summary): Likewise.
20210 (analyze_function_body): Likewise.
20211 (compute_fn_summary): Likewise.
20212 (estimate_edge_devirt_benefit): Likewise.
20213 (estimate_edge_size_and_time): Likewise.
20214 (estimate_calls_size_and_time): Likewise.
20215 (estimate_node_size_and_time): Likewise.
20216 (inline_update_callee_summaries): Likewise.
20217 (remap_edge_change_prob): Likewise.
20218 (remap_edge_summaries): Likewise.
20219 (ipa_merge_fn_summary_after_inlining): Likewise.
20220 (ipa_update_overall_fn_summary): Likewise.
20221 (read_ipa_call_summary): Likewise.
20222 (inline_read_section): Likewise.
20223 (write_ipa_call_summary): Likewise.
20224 (ipa_fn_summary_write): Likewise.
20225 (ipa_free_fn_summary): Likewise.
20226 * ipa-hsa.c (process_hsa_functions): Likewise.
20227 (ipa_hsa_write_summary): Likewise.
20228 (ipa_hsa_read_section): Likewise.
20229 * ipa-icf.c (sem_function::merge): Likewise.
20230 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20231 (do_estimate_edge_time): Likewise.
20232 (estimate_size_after_inlining): Likewise.
20233 (estimate_growth): Likewise.
20234 (growth_likely_positive): Likewise.
20235 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
20236 (inline_call): Likewise.
20237 * ipa-inline.c (caller_growth_limits): Likewise.
20238 (can_inline_edge_p): Likewise.
20239 (can_inline_edge_by_limits_p): Likewise.
20240 (compute_uninlined_call_time): Likewise.
20241 (compute_inlined_call_time): Likewise.
20242 (want_inline_small_function_p): Likewise.
20243 (edge_badness): Likewise.
20244 (update_caller_keys): Likewise.
20245 (update_callee_keys): Likewise.
20246 (recursive_inlining): Likewise.
20247 (inline_small_functions): Likewise.
20248 (inline_to_all_callers_1): Likewise.
20249 (dump_overall_stats): Likewise.
20250 (early_inline_small_functions): Likewise.
20251 (early_inliner): Likewise.
20252 * ipa-inline.h (estimate_edge_growth): Likewise.
20253 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
20254 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
20255 * ipa-prop.h (IPA_NODE_REF): Likewise.
20256 (IPA_EDGE_REF): Likewise.
20257 * ipa-pure-const.c (malloc_candidate_p): Likewise.
20258 (propagate_malloc): Likewise.
20259 * ipa-split.c (execute_split_functions): Likewise.
20260 * symbol-summary.h: Rename get to get_create.
20261 (get): Likewise.
20262 (get_create): Likewise.
20263 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
20264
20265 2018-06-08 Martin Liska <mliska@suse.cz>
20266
20267 * symbol-summary.h (release): Move definition out of class
20268 declaration.
20269 (symtab_removal): Likewise.
20270 (symtab_duplication): Likewise.
20271
20272 2018-06-08 Martin Liska <mliska@suse.cz>
20273
20274 * symbol-summary.h (function_summary): Move constructor
20275 implementation out of class declaration.
20276 (release): Likewise.
20277 (symtab_insertion): Likewise.
20278 (symtab_removal): Likewise.
20279 (symtab_duplication): Likewise.
20280 (get): Likewise.
20281
20282 2018-06-08 Martin Liska <mliska@suse.cz>
20283
20284 * Makefile.in: Remove support for MPX (macros, related functions,
20285 fields in cgraph_node, ...).
20286 * builtin-types.def (BT_BND): Likewise.
20287 (BT_FN_BND_CONST_PTR): Likewise.
20288 (BT_FN_CONST_PTR_BND): Likewise.
20289 (BT_FN_VOID_PTR_BND): Likewise.
20290 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
20291 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
20292 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
20293 (expand_builtin_mempcpy_with_bounds): Likewise.
20294 (expand_builtin_memset_with_bounds): Likewise.
20295 (expand_builtin_memset_args): Likewise.
20296 (std_expand_builtin_va_start): Likewise.
20297 (expand_builtin): Likewise.
20298 (expand_builtin_with_bounds): Likewise.
20299 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
20300 (DEF_LIB_BUILTIN_CHKP): Likewise.
20301 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
20302 (DEF_CHKP_BUILTIN): Likewise.
20303 (BUILT_IN_MEMCPY): Likewise.
20304 (BUILT_IN_MEMMOVE): Likewise.
20305 (BUILT_IN_MEMPCPY): Likewise.
20306 (BUILT_IN_MEMSET): Likewise.
20307 (BUILT_IN_STPCPY): Likewise.
20308 (BUILT_IN_STRCAT): Likewise.
20309 (BUILT_IN_STRCHR): Likewise.
20310 (BUILT_IN_STRCPY): Likewise.
20311 (BUILT_IN_STRLEN): Likewise.
20312 (BUILT_IN_MEMCPY_CHK): Likewise.
20313 (BUILT_IN_MEMMOVE_CHK): Likewise.
20314 (BUILT_IN_MEMPCPY_CHK): Likewise.
20315 (BUILT_IN_MEMSET_CHK): Likewise.
20316 (BUILT_IN_STPCPY_CHK): Likewise.
20317 (BUILT_IN_STRCAT_CHK): Likewise.
20318 (BUILT_IN_STRCPY_CHK): Likewise.
20319 * calls.c (store_bounds): Likewise.
20320 (emit_call_1): Likewise.
20321 (special_function_p): Likewise.
20322 (maybe_warn_nonstring_arg): Likewise.
20323 (initialize_argument_information): Likewise.
20324 (finalize_must_preallocate): Likewise.
20325 (compute_argument_addresses): Likewise.
20326 (expand_call): Likewise.
20327 * cfgexpand.c (expand_call_stmt): Likewise.
20328 (expand_return): Likewise.
20329 (expand_gimple_stmt_1): Likewise.
20330 (pass_expand::execute): Likewise.
20331 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
20332 (cgraph_node::remove): Likewise.
20333 (cgraph_node::dump): Likewise.
20334 (cgraph_node::verify_node): Likewise.
20335 * cgraph.h (chkp_function_instrumented_p): Likewise.
20336 (symtab_node::get_alias_target): Likewise.
20337 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
20338 (cgraph_local_p): Likewise.
20339 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
20340 (cgraph_edge::rebuild_references): Likewise.
20341 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
20342 (walk_polymorphic_call_targets): Likewise.
20343 (cgraph_node::expand_thunk): Likewise.
20344 (symbol_table::output_weakrefs): Likewise.
20345 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
20346 (ix86_handle_option): Likewise.
20347 * config/i386/constraints.md: Likewise.
20348 * config/i386/i386-builtin-types.def (BND): Likewise.
20349 (VOID): Likewise.
20350 (PVOID): Likewise.
20351 (ULONG): Likewise.
20352 * config/i386/i386-builtin.def (BDESC_END): Likewise.
20353 (BDESC_FIRST): Likewise.
20354 (BDESC): Likewise.
20355 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
20356 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
20357 * config/i386/i386.c (enum reg_class): Likewise.
20358 (ix86_target_string): Likewise.
20359 (ix86_option_override_internal): Likewise.
20360 (ix86_conditional_register_usage): Likewise.
20361 (ix86_valid_target_attribute_inner_p): Likewise.
20362 (ix86_set_indirect_branch_type): Likewise.
20363 (ix86_set_current_function): Likewise.
20364 (ix86_function_arg_regno_p): Likewise.
20365 (init_cumulative_args): Likewise.
20366 (ix86_function_arg_advance): Likewise.
20367 (ix86_function_arg): Likewise.
20368 (ix86_pass_by_reference): Likewise.
20369 (ix86_function_value_regno_p): Likewise.
20370 (ix86_function_value_1): Likewise.
20371 (ix86_function_value_bounds): Likewise.
20372 (ix86_return_in_memory): Likewise.
20373 (ix86_setup_incoming_vararg_bounds): Likewise.
20374 (ix86_va_start): Likewise.
20375 (indirect_thunk_need_prefix): Likewise.
20376 (print_reg): Likewise.
20377 (ix86_print_operand): Likewise.
20378 (ix86_expand_call): Likewise.
20379 (ix86_output_function_return): Likewise.
20380 (reg_encoded_number): Likewise.
20381 (BDESC_VERIFYS): Likewise.
20382 (ix86_init_mpx_builtins): Likewise.
20383 (ix86_init_builtins): Likewise.
20384 (ix86_emit_cmove): Likewise.
20385 (ix86_emit_move_max): Likewise.
20386 (ix86_expand_builtin): Likewise.
20387 (ix86_builtin_mpx_function): Likewise.
20388 (ix86_get_arg_address_for_bt): Likewise.
20389 (ix86_load_bounds): Likewise.
20390 (ix86_store_bounds): Likewise.
20391 (ix86_load_returned_bounds): Likewise.
20392 (ix86_store_returned_bounds): Likewise.
20393 (ix86_class_likely_spilled_p): Likewise.
20394 (ix86_hard_regno_mode_ok): Likewise.
20395 (x86_order_regs_for_local_alloc): Likewise.
20396 (ix86_mitigate_rop): Likewise.
20397 (ix86_bnd_prefixed_insn_p): Likewise.
20398 (ix86_mpx_bound_mode): Likewise.
20399 (ix86_make_bounds_constant): Likewise.
20400 (ix86_initialize_bounds): Likewise.
20401 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
20402 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
20403 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
20404 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
20405 (TARGET_CHKP_BOUND_MODE): Likewise.
20406 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
20407 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
20408 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
20409 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
20410 * config/i386/i386.h (TARGET_MPX): Likewise.
20411 (TARGET_MPX_P): Likewise.
20412 (VALID_BND_REG_MODE): Likewise.
20413 (FIRST_BND_REG): Likewise.
20414 (LAST_BND_REG): Likewise.
20415 (enum reg_class): Likewise.
20416 (BND_REG_P): Likewise.
20417 (BND_REGNO_P): Likewise.
20418 (BNDmode): Likewise.
20419 (ADJUST_INSN_LENGTH): Likewise.
20420 * config/i386/i386.md: Likewise.
20421 * config/i386/i386.opt: Likewise.
20422 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
20423 (defined): Likewise.
20424 (LINK_MPX): Likewise.
20425 (MPX_SPEC): Likewise.
20426 (LIBMPX_SPEC): Likewise.
20427 (LIBMPXWRAPPERS_SPEC): Likewise.
20428 (CHKP_SPEC): Likewise.
20429 * config/i386/predicates.md: Likewise.
20430 * dbxout.c (dbxout_type): Likewise.
20431 * doc/extend.texi: Likewise.
20432 * doc/invoke.texi: Likewise.
20433 * doc/md.texi: Likewise.
20434 * doc/tm.texi: Likewise.
20435 * doc/tm.texi.in: Likewise.
20436 * dwarf2out.c (is_base_type): Likewise.
20437 (gen_formal_types_die): Likewise.
20438 (gen_subprogram_die): Likewise.
20439 (gen_type_die_with_usage): Likewise.
20440 (gen_decl_die): Likewise.
20441 (dwarf2out_late_global_decl): Likewise.
20442 * expr.c (expand_assignment): Likewise.
20443 (emit_storent_insn): Likewise.
20444 (store_expr_with_bounds): Likewise.
20445 (store_expr): Likewise.
20446 (expand_expr_real_1): Likewise.
20447 * expr.h (store_expr_with_bounds): Likewise.
20448 * function.c (use_register_for_decl): Likewise.
20449 (struct bounds_parm_data): Likewise.
20450 (assign_parms_augmented_arg_list): Likewise.
20451 (assign_parm_find_entry_rtl): Likewise.
20452 (assign_parm_is_stack_parm): Likewise.
20453 (assign_parm_load_bounds): Likewise.
20454 (assign_bounds): Likewise.
20455 (assign_parms): Likewise.
20456 (expand_function_start): Likewise.
20457 * gcc.c (CHKP_SPEC): Likewise.
20458 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
20459 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
20460 (wrestrict_dom_walker::check_call): Likewise.
20461 * gimple.c (gimple_build_call_from_tree): Likewise.
20462 * gimple.h (enum gf_mask): Likewise.
20463 (gimple_call_with_bounds_p): Likewise.
20464 (gimple_call_set_with_bounds): Likewise.
20465 * gimplify.c (gimplify_init_constructor): Likewise.
20466 * ipa-cp.c (initialize_node_lattices): Likewise.
20467 (propagate_constants_across_call): Likewise.
20468 (find_more_scalar_values_for_callers_subset): Likewise.
20469 * ipa-hsa.c (process_hsa_functions): Likewise.
20470 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
20471 * ipa-icf.c (sem_function::merge): Likewise.
20472 * ipa-inline.c (early_inliner): Likewise.
20473 * ipa-pure-const.c (warn_function_noreturn): Likewise.
20474 (warn_function_cold): Likewise.
20475 (propagate_pure_const): Likewise.
20476 * ipa-ref.h (enum GTY): Likewise.
20477 * ipa-split.c (find_retbnd): Likewise.
20478 (consider_split): Likewise.
20479 (split_function): Likewise.
20480 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
20481 * ipa.c (walk_polymorphic_call_targets): Likewise.
20482 (symbol_table::remove_unreachable_nodes): Likewise.
20483 (process_references): Likewise.
20484 (cgraph_build_static_cdtor_1): Likewise.
20485 * lto-cgraph.c (lto_output_node): Likewise.
20486 (output_refs): Likewise.
20487 (compute_ltrans_boundary): Likewise.
20488 (input_overwrite_node): Likewise.
20489 (input_node): Likewise.
20490 (input_cgraph_1): Likewise.
20491 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
20492 * passes.c (pass_manager::execute_early_local_passes): Likewise.
20493 (class pass_chkp_instrumentation_passes): Likewise.
20494 (make_pass_chkp_instrumentation_passes): Likewise.
20495 * passes.def: Likewise.
20496 * rtl.h (struct GTY): Likewise.
20497 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
20498 * stor-layout.c (layout_type): Likewise.
20499 * symtab.c: Likewise.
20500 * target.def: Likewise.
20501 * targhooks.c (default_chkp_bound_type): Likewise.
20502 (default_chkp_bound_mode): Likewise.
20503 (default_builtin_chkp_function): Likewise.
20504 (default_chkp_function_value_bounds): Likewise.
20505 (default_chkp_make_bounds_constant): Likewise.
20506 (default_chkp_initialize_bounds): Likewise.
20507 * targhooks.h (default_chkp_bound_type): Likewise.
20508 (default_chkp_bound_mode): Likewise.
20509 (default_builtin_chkp_function): Likewise.
20510 (default_chkp_function_value_bounds): Likewise.
20511 (default_chkp_make_bounds_constant): Likewise.
20512 (default_chkp_initialize_bounds): Likewise.
20513 * toplev.c (compile_file): Likewise.
20514 (process_options): Likewise.
20515 * tree-core.h (DEF_BUILTIN): Likewise.
20516 (DEF_BUILTIN_CHKP): Likewise.
20517 * tree-inline.c (declare_return_variable): Likewise.
20518 (remap_gimple_stmt): Likewise.
20519 (copy_bb): Likewise.
20520 (initialize_inlined_parameters): Likewise.
20521 (expand_call_inline): Likewise.
20522 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
20523 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
20524 (make_pass_ipa_chkp_produce_thunks): Likewise.
20525 (make_pass_chkp): Likewise.
20526 (make_pass_chkp_opt): Likewise.
20527 (make_pass_chkp_instrumentation_passes): Likewise.
20528 * tree-pretty-print.c (dump_generic_node): Likewise.
20529 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
20530 * tree-ssa-dce.c (propagate_necessity): Likewise.
20531 (eliminate_unnecessary_stmts): Likewise.
20532 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
20533 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
20534 * tree-ssa-sccvn.h: Likewise.
20535 * tree-ssa-strlen.c (get_string_length): Likewise.
20536 (valid_builtin_call): Likewise.
20537 (adjust_last_stmt): Likewise.
20538 (handle_builtin_strchr): Likewise.
20539 (handle_builtin_strcpy): Likewise.
20540 (handle_builtin_stxncpy): Likewise.
20541 (handle_builtin_memcpy): Likewise.
20542 (handle_builtin_strcat): Likewise.
20543 (strlen_check_and_optimize_stmt): Likewise.
20544 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
20545 * tree-streamer-in.c: Likewise.
20546 * tree-streamer.c (record_common_node): Likewise.
20547 * tree.c (tree_code_size): Likewise.
20548 (wide_int_to_tree_1): Likewise.
20549 (type_contains_placeholder_1): Likewise.
20550 (build_common_tree_nodes): Likewise.
20551 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
20552 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
20553 (POINTER_BOUNDS_P): Likewise.
20554 (BOUNDED_TYPE_P): Likewise.
20555 (BOUNDED_P): Likewise.
20556 (CALL_WITH_BOUNDS_P): Likewise.
20557 (pointer_bounds_type_node): Likewise.
20558 * value-prof.c (gimple_ic): Likewise.
20559 * var-tracking.c (vt_add_function_parameters): Likewise.
20560 * varasm.c (make_decl_rtl): Likewise.
20561 (assemble_start_function): Likewise.
20562 (output_constant): Likewise.
20563 (maybe_assemble_visibility): Likewise.
20564 * varpool.c (ctor_for_folding): Likewise.
20565 * chkp-builtins.def: Remove.
20566 * ipa-chkp.c: Remove.
20567 * ipa-chkp.h: Remove.
20568 * rtl-chkp.c: Remove.
20569 * rtl-chkp.h: Remove.
20570 * tree-chkp-opt.c: Remove.
20571 * tree-chkp.c: Remove.
20572 * tree-chkp.h: Remove.
20573
20574 2018-06-07 Carl Love <cel@us.ibm.com>
20575
20576 * config/rs6000/vsx.md (vextract_fp_from_shorth,
20577 vextract_fp_from_shortl): Add BE support.
20578
20579 2018-06-07 Paul Koning <ni1d@arrl.net>
20580
20581 * compare-elim.c (try_merge_compare): Don't merge compare if
20582 address contains a side effect.
20583 (try_eliminate_compare): Likewise.
20584
20585 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
20586
20587 * config.gcc: Support "tremont".
20588 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
20589 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20590 PROCESSOR_TREMONT.
20591 * config/i386/i386.c (m_TREMONT): Define.
20592 (processor_target_table): Add "tremont".
20593 (PTA_TREMONT): Define.
20594 (ix86_lea_outperforms): Add TARGET_TREMONT.
20595 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
20596 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
20597 and M_INTEL_GOLDMONT_PLUS.
20598 (fold_builtin_cpu): Add "tremont".
20599 (ix86_add_stmt_cost): Add TARGET_TREMONT.
20600 (ix86_option_override_internal): Add "tremont".
20601 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
20602 (processor_type): Add PROCESSOR_TREMONT.
20603 * config/i386/x86-tune.def: Add m_TREMONT.
20604 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
20605
20606 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20607
20608 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
20609 symbol defined for msp430i* devices to be lower case.
20610
20611 2018-06-07 Richard Biener <rguenther@suse.de>
20612
20613 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
20614 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
20615 Properly wrap signed arithmetic if overflow wraps.
20616
20617 2018-06-07 Jakub Jelinek <jakub@redhat.com>
20618
20619 PR tree-optimization/69615
20620 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
20621 of a cast from a same precision integral SSA_NAME in a bb dominated
20622 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
20623 cast to utype if rhs2 has already a compatible type.
20624
20625 2018-06-07 Richard Biener <rguenther@suse.de>
20626
20627 PR tree-optimization/85935
20628 * graphite-scop-detection.c (find_params_in_bb): Analyze
20629 condition operands with respect to the correct loop. Assert
20630 the analysis doesn't fail.
20631
20632 2018-06-04 Carl Love <cel@us.ibm.com>
20633
20634 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
20635 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
20636 as it is slightly cheaper.
20637 (first_match_or_eos_index_<mode>):
20638 Calculate index using natural element order.
20639 (first_match_index_<mode>):
20640 Calculate index using natural element order.
20641 (first_match_or_eos_index_<mode>):
20642 Calculate index using natural order.
20643 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
20644 for BE and LE modes.
20645 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
20646 P9V_BUILTIN_VCLZLSBB_V16QI.
20647 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
20648 specific.
20649
20650 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20651
20652 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
20653 indentation and line wrap for many prototypes. Add missing
20654 @smallexample directives around block of prototypes for vec_xl and
20655 vec_xst.
20656
20657 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
20658
20659 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
20660 track if we pass or return IEEE 128-bit floating point.
20661 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
20662 C++ mangling that is compatible with GCC 8.1.
20663 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
20664 (init_cumulative_args): Note if we pass or return IEEE 128-bit
20665 floating point types.
20666 (rs6000_function_arg_advance_1): Likewise.
20667 (rs6000_mangle_type): Optionally generate mangled names that match
20668 what GCC 8.1 generated for IEEE 128-bit floating point types.
20669 (rs6000_globalize_decl_name): If we have an external function that
20670 passes or returns IEEE 128-bit types, generate a weak reference
20671 from the mangled name used in GCC 8.1 to the current mangled
20672 name.
20673 (rs6000_init_builtins): Make __ibm128 use the long double type if
20674 long double is IBM extended double. Make __float128 use the long
20675 double type if long double is IEEE 128-bit.
20676
20677 PR target/85657
20678 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
20679 macro for __ibm128 built-in functions.
20680 (PACK_IF): Add __ibm128 pack/unpack functions.
20681 (UNPACK_IF): Likewise.
20682 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
20683 enable long double built-in functions if long double is IEEE
20684 128-bit floating point.
20685 (rs6000_invalid_builtin): Update long double built-in function
20686 error message.
20687 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
20688 functions, adjust the built-in function to use the long double
20689 built-in function if __ibm128 and long double are the same type.
20690 * doc/extend.texi (PowerPC builtins): Update documention for
20691 __builtin_{,un}pack_longdouble. Add documentation for
20692 __builtin_{,un}pack_ibm128.
20693
20694 2018-06-06 Jim Wilson <jimw@sifive.com>
20695
20696 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
20697 (struct machine_function): New field interrupt_mode.
20698 (riscv_handle_type_attribute): New function. Add forward declaration.
20699 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
20700 (riscv_expand_epilogue): Check interrupt_mode field.
20701 (riscv_set_current_function): Check interrupt attribute args and
20702 set interrupt_mode field.
20703 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
20704 (riscv_sret, riscv_uret): New.
20705 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
20706 new arguments to interrupt attribute.
20707
20708 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
20709
20710 PR target/63177
20711 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
20712 Don't handle -mcpu=power8 if -mpower9-vector is also used.
20713
20714 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20715
20716 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
20717 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
20718 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
20719 several redundant entries.
20720
20721 2018-06-06 David Malcolm <dmalcolm@redhat.com>
20722
20723 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
20724 type from "rtx" to "rtx_insn *".
20725 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
20726 for local "call_insn", removing cast.
20727 (ix86_expand_call): Likewise, introducing a "call_insn" local.
20728
20729 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
20730
20731 PR tree-optimization/86066
20732 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
20733 for BIT_INSERT_EXPR stores.
20734
20735 2018-06-06 Richard Biener <rguenther@suse.de>
20736
20737 PR tree-optimization/86062
20738 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20739 component refs ontop
20740 of to be offsetted base.
20741
20742 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20743
20744 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
20745 to be static and remove check on interrupt attribute name.
20746
20747 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
20748
20749 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20750 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
20751
20752 2018-06-05 Steve Ellcey <sellcey@cavium.com>
20753
20754 PR target/79924
20755 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
20756 second argument.
20757 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
20758 Remove second argument, change how error is called.
20759 (aarch64_layout_arg): Remove second argument from
20760 aarch64_err_no_fpadvsimd call.
20761 (aarch64_init_cumulative_args): Ditto.
20762 (aarch64_gimplify_va_arg_expr): Ditto.
20763 * config/aarch64/aarch64.md (mov<mode>): Ditto.
20764
20765 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
20766
20767 * config/i386/i386.md (simple_return_indirect_internal): New expander.
20768 (*simple_return_indirect_internal<mode>): Rename from
20769 simple_return_indirect_internal. Use W mode iterator.
20770 (rstorssp): New expander.
20771 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
20772 (clrssbsy): New expander.
20773 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
20774
20775 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
20776
20777 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
20778 __typeof__.
20779 (cmse_check_pointed_object): Likewise.
20780
20781 2018-06-05 Martin Liska <mliska@suse.cz>
20782
20783 PR gcov-profile/47618
20784 * doc/invoke.texi: Document how -fprofile-dir format
20785 is extended.
20786
20787 2018-06-05 Richard Biener <rguenther@suse.de>
20788
20789 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
20790 removal pretend DOM info isn't available so we do not update
20791 it and only remove edges, not dominated blocks. Actually free
20792 DOM info in case we removed something. Remove unreachable blocks.
20793 (mfb_keep_latches): Work with either DOM info or marked backedges.
20794 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
20795 first. Mark backedges if DOM info isn't available.
20796 (Re-)compute DOM info after cleanup_control_flow_pre.
20797
20798 2018-06-05 Richard Biener <rguenther@suse.de>
20799
20800 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
20801 (locus_discrim_hasher::hash): Adjust.
20802 (locus_discrim_hasher::equal): Likewise.
20803 (next_discriminator_for_locus): Work on line directly.
20804 (same_line_p): Pass in expanded locus1 as well.
20805 (assign_discriminators): Avoid redundant location expansions.
20806
20807 2018-06-05 Richard Biener <rguenther@suse.de>
20808
20809 PR tree-optimization/86046
20810 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
20811 if required after clearing TREE_ADDRESSABLE.
20812
20813 2018-06-05 Richard Biener <rguenther@suse.de>
20814
20815 PR tree-optimization/86047
20816 * tree-ssa-loop.c (for_each_index): Glob handling of all
20817 decls and constants and really handle all of them.
20818
20819 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20820
20821 PR target/81497
20822 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
20823 qualifier_void_pointer and qualifier_const_void_pointer.
20824 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
20825 (arm_init_builtins): Handle the above.
20826 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
20827 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
20828 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
20829 void intrinsics.
20830
20831 2018-06-05 Martin Liska <mliska@suse.cz>
20832
20833 * auto-profile.c (read_autofdo_file): Do not use
20834 gcov_ctr_summary struct.
20835 (afdo_callsite_hot_enough_for_early_inline): Likewise.
20836 * coverage.c (struct counts_entry): Likewise.
20837 (read_counts_file): Read just single summary entry.
20838 (get_coverage_counts): Use gcov_summary struct.
20839 * coverage.h (get_coverage_counts): Likewise.
20840 * gcov-dump.c (dump_working_sets): Likewise.
20841 (tag_summary): Dump just single summary.
20842 * gcov-io.c (gcov_write_summary): Write just histogram
20843 summary.
20844 (gcov_read_summary): Read just single summary.
20845 (compute_working_sets): Use gcov_summary struct.
20846 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
20847 of GCOV_COUNTERS_SUMMABLE.
20848 (GCOV_COUNTERS_SUMMABLE): Remove.
20849 (GCOV_FIRST_VALUE_COUNTER): Replace with
20850 GCOV_COUNTER_V_INTERVAL.
20851 (struct gcov_ctr_summary): Remove.
20852 (struct gcov_summary): Directly use fields of former
20853 gcov_ctr_summary.
20854 (compute_working_sets): Use gcov_summary struct.
20855 * gcov.c (read_count_file): Do not use ctrs fields.
20856 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
20857 struct.
20858 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
20859 struct.
20860 * profile.c: Likewise.
20861 * profile.h: Likewise.
20862
20863 2018-06-05 Martin Liska <mliska@suse.cz>
20864
20865 PR gcov-profile/84846
20866 * gcov.c (output_lines): Print working directory only
20867 in intermediate format.
20868
20869 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
20870
20871 * config/s390/s390-builtin-types.def: Add void function type.
20872 * config/s390/s390-builtins.def: Use the function type for the
20873 tbeginc builtin.
20874
20875 2018-06-04 Jim Wilson <jimw@sifive.com>
20876
20877 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
20878 to int.
20879 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
20880 and maybe_eh_return. Change regno to unsigned int. Use new args to
20881 handle EH_RETURN_DATA_REGNO registers properly.
20882 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
20883 (riscv_expand_epilogue): Update comment. Change argument name and
20884 type. Update code to use new name and type. Pass new args to
20885 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
20886 EXCEPTION_RETURN.
20887 * config/riscv/riscv.md (NORMAL_RETURN): New.
20888 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
20889 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
20890 (eh_return): Call gen_eh_return_internal and emit barrier.
20891 (eh_return_internal): Call riscv_expand_epilogue.
20892
20893 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
20894
20895 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
20896 bit_insertion field and declare can_be_merged_into method.
20897 (merged_store_group::can_be_merged_into): New method.
20898 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
20899 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
20900 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
20901
20902 2018-06-04 Richard Biener <rguenther@suse.de>
20903
20904 PR tree-optimization/85955
20905 * builtins.c (fold_builtin_sincos): Convert pointers to
20906 destination to appropriate type before dereferencing.
20907
20908 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
20909
20910 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
20911
20912 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
20913
20914 * expr.c (expand_expr_real_1): Force the operand into memory if
20915 its TYPE_MODE is BLKmode and if there is no integer mode for
20916 the number of bits being extracted.
20917
20918 2018-06-04 Jakub Jelinek <jakub@redhat.com>
20919
20920 PR target/85832
20921 PR target/86036
20922 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20923 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
20924
20925 2018-06-04 Richard Biener <rguenther@suse.de>
20926
20927 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
20928 (cleanup_tree_cfg_noloop): ... single caller. Do
20929 start_recording_case_labels later.
20930
20931 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
20932
20933 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
20934 to _IMMINTRIN_H_INCLUDED.
20935 * config/i386/pconfigintrin.h: Ditto.
20936 * config/i386/waitpkgintrin.h: Ditto.
20937 * config/i386/immintrin.h: Add includes for sgxintrin.h,
20938 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
20939 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
20940 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
20941 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
20942 waitpkgintrin.h and cldemoteintrin.h.
20943
20944 2018-06-04 Richard Biener <rguenther@suse.de>
20945
20946 PR tree-optimization/86038
20947 * tracer.c (find_best_successor): Check probability for
20948 being initialized, bail out if not.
20949
20950 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
20951
20952 PR target/86003
20953 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
20954 of bits to ignore when comparing architectures.
20955
20956 2018-06-04 Jakub Jelinek <jakub@redhat.com>
20957
20958 PR tree-optimization/69615
20959 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
20960 maximum or minimum of the type, try to merge it also as if
20961 range1 is + [-, x - 1] or + [x + 1, -].
20962
20963 PR c++/86025
20964 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
20965
20966 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
20967
20968 PR tree-optimization/86034
20969 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
20970 the unsigned bitfield type in a bit insertion sequence if it does not
20971 have a larger precision than the bitfield size.
20972 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
20973
20974 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
20975
20976 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
20977
20978 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
20979
20980 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
20981 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
20982 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
20983 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
20984
20985 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
20986
20987 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
20988 Disable -fdelete-null-pointer-checks for ELF toolchain.
20989
20990 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
20991 Kito Cheng <kito.cheng@gmail.com>
20992
20993 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
20994 (nds32le-*-*, nds32be-*-*): Integrate checking process.
20995 (nds32*-*-*): Add glibc and uclibc conditions.
20996 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
20997 (TARGET_EXCEPT_UNWIND_INFO): Define.
20998 * config/nds32/elf.h: New file.
20999 * config/nds32/linux.h: New file.
21000 * config/nds32/nds32-elf.opt: New file.
21001 * config/nds32/nds32-linux.opt: New file.
21002 * config/nds32/nds32-fp-as-gp.c
21003 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
21004 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
21005 TARGET_LINUX_ABI.
21006 (nds32_asm_file_end): Ditto.
21007 (nds32_print_operand): Ditto.
21008 (nds32_insert_attributes): Ditto.
21009 (nds32_init_libfuncs): New function.
21010 (TARGET_HAVE_TLS): Define.
21011 (TARGET_INIT_LIBFUNCS): Define.
21012 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
21013 spec content.
21014 (TARGET_ELF): Apply different mcmodel setting.
21015 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
21016 been migrated into elf.h and linux.h files.
21017 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
21018 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
21019 (mcmodel): The content has been migrated into nds32-elf.opt and
21020 nds32-linux.opt files.
21021 * config/nds32/t-elf: New file.
21022 * config/nds32/t-linux: New file.
21023
21024 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
21025 Shiva Chen <shiva0217@gmail.com>
21026
21027 * config/nds32/constants.md (unspec_volatile_element): Add
21028 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
21029 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
21030 optimization.
21031 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
21032 (make_pass_nds32_fp_as_gp): Declare.
21033 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
21034 optmization pass.
21035 (nds32_asm_function_end_prologue): Remove unused asm output.
21036 (nds32_asm_function_begin_epilogue): Remove unused asm output.
21037 (nds32_asm_file_start): Output necessary fp_as_gp information.
21038 (nds32_option_override): Adjust register usage.
21039 (nds32_expand_prologue): Consider fp_as_gp situation.
21040 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
21041 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
21042 (epilogue): Ditto.
21043 (return): Ditto.
21044 (simple_return): Ditto.
21045 (omit_fp_begin): Output special directive for fp_as_gp.
21046 (omit_fp_end): Output special directive for fp_as_gp.
21047 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
21048 mforbid-fp-as-gp): New options.
21049
21050 2018-06-01 Mark Wielaard <mark@klomp.org>
21051
21052 * dwarf2out.c (dwarf2out_finish): Remove generation of
21053 DW_AT_loclists_base.
21054
21055 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
21056
21057 * gimple-ssa-store-merging.c: Include gimple-fold.h.
21058 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
21059 (struct merged_store_group): Add bit_insertion field.
21060 (dump_char_array): Use standard hexadecimal format.
21061 (merged_store_group::merged_store_group): Set bit_insertion to false.
21062 (merged_store_group::apply_stores): Use optimal buffer size. Deal
21063 with BIT_INSERT_EXPR stores. Move up code updating the mask and
21064 also print the mask in the dump file.
21065 (pass_store_merging::gate): Minor tweak.
21066 (imm_store_chain_info::coalesce_immediate): Fix wrong association
21067 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
21068 stores with INTEGER_CST stores.
21069 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
21070 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
21071 and use it throughout. Generate bit insertion sequences if need be.
21072 (pass_store_merging::process_store): Remove redundant condition.
21073 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
21074
21075 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
21076
21077 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
21078 the 128-bit floating point types. Fix function comment.
21079
21080 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21081
21082 * config/aarch64/aarch64-simd.md
21083 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
21084 mnemonics.
21085 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
21086 mnemonics.
21087
21088 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21089
21090 PR tree-optimization/85989
21091 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
21092 variable.
21093 (backprop::intersect_uses): Check it when deciding whether this
21094 is a backedge reference.
21095 (backprop::process_block): Add each phi to m_visited_phis
21096 after visiting it, then clear it at the end.
21097
21098 2018-06-01 Richard Biener <rguenther@suse.de>
21099
21100 * tree-vectorizer.h (vect_dr_stmt): New function.
21101 (vect_get_load_cost): Adjust.
21102 (vect_get_store_cost): Likewise.
21103 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
21104 Use vect_dr_stmt instead of DR_SMTT.
21105 (vect_record_base_alignments): Likewise.
21106 (vect_calculate_target_alignment): Likewise.
21107 (vect_compute_data_ref_alignment): Likewise and make static.
21108 (vect_update_misalignment_for_peel): Likewise.
21109 (vect_verify_datarefs_alignment): Likewise.
21110 (vector_alignment_reachable_p): Likewise.
21111 (vect_get_data_access_cost): Likewise. Pass down
21112 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
21113 (vect_get_peeling_costs_all_drs): Likewise.
21114 (vect_peeling_hash_get_lowest_cost): Likewise.
21115 (vect_enhance_data_refs_alignment): Likewise.
21116 (vect_find_same_alignment_drs): Likewise.
21117 (vect_analyze_data_refs_alignment): Likewise.
21118 (vect_analyze_group_access_1): Likewise.
21119 (vect_analyze_group_access): Likewise.
21120 (vect_analyze_data_ref_access): Likewise.
21121 (vect_analyze_data_ref_accesses): Likewise.
21122 (vect_vfa_segment_size): Likewise.
21123 (vect_small_gap_p): Likewise.
21124 (vectorizable_with_step_bound_p): Likewise.
21125 (vect_prune_runtime_alias_test_list): Likewise.
21126 (vect_analyze_data_refs): Likewise.
21127 (vect_supportable_dr_alignment): Likewise.
21128 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
21129 (vect_gen_prolog_loop_niters): Likewise.
21130 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
21131 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
21132 modify DR_STMT.
21133 (vect_recog_mask_conversion_pattern): Likewise.
21134 (vect_try_gather_scatter_pattern): Likewise.
21135 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
21136 to vect_get_store_cost.
21137 (vect_get_store_cost): Get stmt_info instead of DR.
21138 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
21139 (vect_get_load_cost): Get stmt_info instead of DR.
21140
21141 2018-06-01 Richard Biener <rguenther@suse.de>
21142
21143 PR middle-end/86017
21144 * gimple-fold.c (var_decl_component_p): Also allow offsetted
21145 vars wrapped in MEM_REFs.
21146
21147 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21148
21149 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21150 Fix subreg tests so that we only return a choice between
21151 GENERAL_REGS and FP_REGS if the original classes included both.
21152
21153 2018-06-01 Richard Biener <rguenther@suse.de>
21154
21155 PR ipa/85960
21156 * tree-ssa-structalias.c (get_function_part_constraint):
21157 Handle NULL fi->decl.
21158 (find_func_aliases_for_call): Properly handle indirect
21159 fi from direct call.
21160 (find_func_clobbers): Likewise.
21161 (ipa_pta_execute): Likewise.
21162 (create_variable_info_for): For functions that are ifunc_resolver
21163 resolve to a varinfo that contains the result of the resolver call.
21164 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
21165 aliases.
21166
21167 2018-05-31 Michael Collison <michael.collison@arm.com>
21168
21169 * config/aarch64/aarch64.md:
21170 (*fix_to_zero_extenddfdi2): New pattern.
21171 * gcc.target/aarch64/fix_extend1.c: New testcase.
21172
21173 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
21174
21175 PR middle-end/78809
21176 PR middle-end/83026
21177 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
21178 and BUILT_IN_STRNCMP_EQ.
21179 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
21180 BUILT_IN_STRNCMP_EQ.
21181 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
21182 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21183 (gimple_fold_builtin): Likewise.
21184 * tree-ssa-strlen.c (compute_string_length): New function.
21185 (determine_min_obsize): New function.
21186 (handle_builtin_string_cmp): New function to handle calls to
21187 string compare functions.
21188 (strlen_optimize_stmt): Add handling to builtin string compare
21189 calls.
21190 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
21191 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21192 * tree.c (build_common_builtin_nodes): Add new defines of
21193 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
21194
21195 2018-05-31 Jakub Jelinek <jakub@redhat.com>
21196
21197 PR target/85984
21198 * bb-reorder.c (pass_partition_blocks::gate): Return false for
21199 functions with naked attribute.
21200
21201 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
21202
21203 * config/i386/sse.md (avx_vec_concat<mode>):
21204 Substitute concat_tg_mode mode attribute with xtg_mode.
21205 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
21206 (concat_tg_mode): Remove mode attribute.
21207
21208 2018-05-31 Martin Sebor <msebor@redhat.com>
21209
21210 PR c/82063
21211 * calls.c (alloc_max_size): Correct a logic error/typo.
21212 Treat excessive arguments as infinite. Warn for invalid arguments.
21213 * doc/invoke.texi (-Walloc-size-larger-than): Update.
21214
21215 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
21216
21217 PR target/85829
21218 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
21219 and movx for Haswell.
21220
21221 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
21222 Cesar Philippidis <cesar@codesourcery.com>
21223
21224 PR middle-end/85879
21225 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
21226 when emitting error on private/firstprivate reductions.
21227 * omp-low.c (lower_omp_target): Avoid reference-type processing
21228 on pointers for firstprivate clause.
21229
21230 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21231
21232 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
21233 (st1x2): Likewise.
21234 (st1x3): Likewise.
21235 * config/aarch64/aarch64-simd.md
21236 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
21237 (aarch64_ld1_x3_<mode>): Likewise
21238 (aarch64_st1x2<VALLDIF:mode>): Likewise
21239 (aarch64_st1_x2_<mode>): Likewise
21240 (aarch64_st1x3<VALLDIF:mode>): Likewise
21241 (aarch64_st1_x3_<mode>): Likewise
21242 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
21243 (vld1_s8_x3): Likewise.
21244 (vld1_u16_x3): Likewise.
21245 (vld1_s16_x3): Likewise.
21246 (vld1_u32_x3): Likewise.
21247 (vld1_s32_x3): Likewise.
21248 (vld1_u64_x3): Likewise.
21249 (vld1_s64_x3): Likewise.
21250 (vld1_f16_x3): Likewise.
21251 (vld1_f32_x3): Likewise.
21252 (vld1_f64_x3): Likewise.
21253 (vld1_p8_x3): Likewise.
21254 (vld1_p16_x3): Likewise.
21255 (vld1_p64_x3): Likewise.
21256 (vld1q_u8_x3): Likewise.
21257 (vld1q_s8_x3): Likewise.
21258 (vld1q_u16_x3): Likewise.
21259 (vld1q_s16_x3): Likewise.
21260 (vld1q_u32_x3): Likewise.
21261 (vld1q_s32_x3): Likewise.
21262 (vld1q_u64_x3): Likewise.
21263 (vld1q_s64_x3): Likewise.
21264 (vld1q_f16_x3): Likewise.
21265 (vld1q_f32_x3): Likewise.
21266 (vld1q_f64_x3): Likewise.
21267 (vld1q_p8_x3): Likewise.
21268 (vld1q_p16_x3): Likewise.
21269 (vld1q_p64_x3): Likewise.
21270 (vst1_s64_x2): Likewise.
21271 (vst1_u64_x2): Likewise.
21272 (vst1_f64_x2): Likewise.
21273 (vst1_s8_x2): Likewise.
21274 (vst1_p8_x2): Likewise.
21275 (vst1_s16_x2): Likewise.
21276 (vst1_p16_x2): Likewise.
21277 (vst1_s32_x2): Likewise.
21278 (vst1_u8_x2): Likewise.
21279 (vst1_u16_x2): Likewise.
21280 (vst1_u32_x2): Likewise.
21281 (vst1_f16_x2): Likewise.
21282 (vst1_f32_x2): Likewise.
21283 (vst1_p64_x2): Likewise.
21284 (vst1q_s8_x2): Likewise.
21285 (vst1q_p8_x2): Likewise.
21286 (vst1q_s16_x2): Likewise.
21287 (vst1q_p16_x2): Likewise.
21288 (vst1q_s32_x2): Likewise.
21289 (vst1q_s64_x2): Likewise.
21290 (vst1q_u8_x2): Likewise.
21291 (vst1q_u16_x2): Likewise.
21292 (vst1q_u32_x2): Likewise.
21293 (vst1q_u64_x2): Likewise.
21294 (vst1q_f16_x2): Likewise.
21295 (vst1q_f32_x2): Likewise.
21296 (vst1q_f64_x2): Likewise.
21297 (vst1q_p64_x2): Likewise.
21298 (vst1_s64_x3): Likewise.
21299 (vst1_u64_x3): Likewise.
21300 (vst1_f64_x3): Likewise.
21301 (vst1_s8_x3): Likewise.
21302 (vst1_p8_x3): Likewise.
21303 (vst1_s16_x3): Likewise.
21304 (vst1_p16_x3): Likewise.
21305 (vst1_s32_x3): Likewise.
21306 (vst1_u8_x3): Likewise.
21307 (vst1_u16_x3): Likewise.
21308 (vst1_u32_x3): Likewise.
21309 (vst1_f16_x3): Likewise.
21310 (vst1_f32_x3): Likewise.
21311 (vst1_p64_x3): Likewise.
21312 (vst1q_s8_x3): Likewise.
21313 (vst1q_p8_x3): Likewise.
21314 (vst1q_s16_x3): Likewise.
21315 (vst1q_p16_x3): Likewise.
21316 (vst1q_s32_x3): Likewise.
21317 (vst1q_s64_x3): Likewise.
21318 (vst1q_u8_x3): Likewise.
21319 (vst1q_u16_x3): Likewise.
21320 (vst1q_u32_x3): Likewise.
21321 (vst1q_u64_x3): Likewise.
21322 (vst1q_f16_x3): Likewise.
21323 (vst1q_f32_x3): Likewise.
21324 (vst1q_f64_x3): Likewise.
21325 (vst1q_p64_x3): Likewise.
21326
21327 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
21328
21329 * config/msp430/msp430.c (msp430_output_labelref): Prepend
21330 user_label_prefix to name.
21331
21332 * tree-core.h: Update comment about the format of NAME string
21333 passed to handler in attribute_spec.
21334
21335 * config/msp430/msp430.md: Remove erroneous subreg expression from
21336 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
21337 zero_extend{q,h}isi2.
21338
21339 2018-05-30 Borislav Petkov <bp@suse.de>
21340
21341 * doc/extend.texi: Document some architecture specific
21342 constraints and sort entries.
21343
21344 2018-05-30 Martin Sebor <msebor@redhat.com>
21345
21346 PR middle-end/85369
21347 * builtins.c (expand_builtin_stpcpy_1): New function.
21348 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
21349 only if the former succeeds.
21350
21351 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21352
21353 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
21354 in saphira.
21355
21356 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21357
21358 * doc/invoke.texi (-flinker-output): Document
21359
21360 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21361
21362 * passes.c (ipa_write_summaries): Only modify statements if body
21363 is in memory.
21364 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
21365 incrementally linking.
21366 (ipa_passes): Likewise.
21367 * lto-cgraph.c (lto_output_node): When incrementally linking do not
21368 pass down resolution info.
21369 * common.opt (flag_incremental_link): Update info.
21370 * gcc.c (plugin specs): Turn flinker-output=* to
21371 -plugin-opt=-linker-output-known
21372 * toplev.c (compile_file): Also cut compilation when doing incremental
21373 link.
21374 * flag-types. (enum lto_partition_model): Add
21375 LTO_LINKER_OUTPUT_NOLTOREL.
21376 (invoke.texi): Add -flinker-output docs.
21377 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
21378 link same way as WPA; do not stream in dead initializers.
21379
21380 * dwarf2out.c (dwarf2out_die_ref_for_decl,
21381 darf2out_register_external_decl): Support incremental link.
21382
21383 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21384
21385 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
21386
21387 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21388
21389 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
21390 it down to simple_object_copy_lto_debug_sections.
21391 (run_gcc): Determine incremental LTO link time and configure
21392 lto1 into non-wpa mode, disable renaming of debug sections.
21393
21394 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
21395
21396 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
21397 descriptions of various incorrectly documented functions.
21398
21399 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
21400
21401 Revert:
21402 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
21403 address check not strict.
21404
21405 2018-05-30 Richard Biener <rguenther@suse.de>
21406
21407 PR tree-optimization/85964
21408 * tracer.c (better_p): Drop initialized count check, we only
21409 call the function with initialized counts now.
21410 (find_best_successor): Do find a best edge if one
21411 has uninitialized count.
21412 (find_best_predecessor): Likewise. Do BB frequency check only
21413 if count is initialized.
21414
21415 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
21416
21417 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
21418 (aarch64_ldrstr_offset_compare): New.
21419 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
21420 load/store orderings.
21421 (aarch64_gen_adjusted_ldpstp): Likewise.
21422
21423 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
21424
21425 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21426 Check for subset of GENERAL_REGS and FP_REGS.
21427 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
21428 r=w alternative.
21429
21430 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
21431
21432 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
21433 and wi::to_poly_offset. Add the current offset and then check
21434 whether the sum fits, rather than using an unchecked addition of
21435 a checked term. Check for a shwi rather than a uhwi.
21436 * expr.c (get_bit_range): Use tree_to_poly_uint64.
21437 (store_constructor): Use poly_int_tree_p.
21438 (expand_expr_real_1): Likewise.
21439 * function.c (assign_temp): Likewise.
21440 * fold-const.c (const_binop): Use poly_int_tree_p and
21441 wi::to_poly_offset.
21442 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
21443 division.
21444 * ipa-icf-gimple.c (func_checker::compare_operand): Use
21445 to_poly_offset for MEM offsets.
21446 * ipa-icf.c (sem_variable::equals): Likewise.
21447 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
21448 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
21449 wi::to_poly_offset for BIT_FIELD_REF offsets.
21450 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
21451 wi::to_poly_offset.
21452 * var-tracking.c (emit_note_insn_var_location): Use
21453 tree_to_poly_uint64.
21454
21455 2018-05-29 Jim Wilson <jimw@sifive.com>
21456
21457 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
21458
21459 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
21460
21461 PR target/85950
21462 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
21463 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
21464 sequence.
21465 (sse4_1_round<mode>2): Use nonimmediate_operand
21466 for operand 1 predicate.
21467
21468 2018-05-29 Martin Sebor <msebor@redhat.com>
21469 Richard Biener <rguenther@suse.de>
21470
21471 PR testsuite/85888
21472 * calls.c (get_size_range): Call determine_value_range instead
21473 of get_value_range..
21474 * tree-vrp.h (determine_value_range): Declared new function.
21475 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
21476
21477 2018-05-29 Richard Biener <rguenther@suse.de>
21478
21479 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
21480 sure to use non-pattern stmts for get_earlier_stmt arguments.
21481 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
21482 called on pattern stmts.
21483 (get_later_stmt): Likewise.
21484
21485 2018-05-29 Martin Liska <mliska@suse.cz>
21486
21487 PR gcov-profile/85759
21488 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
21489 env variables.
21490
21491 2018-05-29 Jakub Jelinek <jakub@redhat.com>
21492
21493 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
21494 VEC_UNPACK_*_EXPR.
21495 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
21496 VEC_PACK_*_EXPR.
21497
21498 PR target/85918
21499 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21500 VEC_PACK_FLOAT_EXPR): New tree codes.
21501 * tree-pretty-print.c (op_code_prio): Handle
21502 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21503 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21504 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21505 * tree-inline.c (estimate_operator_cost): Likewise.
21506 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
21507 * fold-const.c (const_binop): Likewise.
21508 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
21509 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21510 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
21511 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
21512 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21513 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21514 * expr.c (expand_expr_real_2): Likewise.
21515 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
21516 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
21517 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
21518 optabs.
21519 * optabs.c (expand_widen_pattern_expr): For
21520 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
21521 sign from result type rather than operand's type.
21522 (expand_binop_directly): For vec_packu_float_optab and
21523 vec_packs_float_optab allow result type to be different from operand's
21524 type.
21525 * optabs-tree.c (optab_for_tree_code): Handle
21526 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21527 VEC_PACK_FLOAT_EXPR. Formatting fixes.
21528 * tree-vect-generic.c (expand_vector_operations_1): Handle
21529 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21530 VEC_PACK_FLOAT_EXPR.
21531 * tree-vect-stmts.c (supportable_widening_operation): Handle
21532 FIX_TRUNC_EXPR.
21533 (supportable_narrowing_operation): Handle FLOAT_EXPR.
21534 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
21535 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
21536 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
21537 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
21538 mode attributes.
21539 (vec_pack<floatprefix>_float_<mode>): New expander.
21540 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
21541 attributes.
21542 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
21543 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
21544 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
21545 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
21546 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
21547 Document.
21548 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
21549 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
21550 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21551 VEC_PACK_FLOAT_EXPR): Document.
21552
21553 2018-05-29 Richard Biener <rguenther@suse.de>
21554
21555 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
21556 member.
21557 (stmt_vec_info_vec): Make pointer.
21558 (init_stmt_vec_info_vec): Remove.
21559 (free_stmt_vec_info_vec): Likewise.
21560 (set_stmt_vec_info_vec): New function.
21561 (free_stmt_vec_infos): Likewise.
21562 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
21563 (set_vinfo_for_stmt): Likewise.
21564 (get_earlier_stmt): Likewise.
21565 (get_later_stmt): Likewise.
21566 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
21567 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
21568 (vec_info::~vec_info): Free stmt_vec_infos.
21569 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
21570 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
21571 (pass_slp_vectorize::execute): Likewise.
21572 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
21573 (free_stmt_vec_info_vec): Likewise.
21574 (set_stmt_vec_info_vec): New function.
21575 (free_stmt_vec_infos): Likewise.
21576 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
21577 the global stmt_vec_info_vec.
21578 * tree-parloops.c (gather_scalar_reductions): Use
21579 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
21580 vector.
21581
21582 2018-05-29 Richard Biener <rguenther@suse.de>
21583
21584 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
21585
21586 2018-05-29 Martin Liska <mliska@suse.cz>
21587 David Malcolm <dmalcolm@redhat.com>
21588
21589 * vec.c (test_reverse): New.
21590 (vec_c_tests): Add new test.
21591 * vec.h (vl_ptr>::reverse): New function.
21592
21593 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
21594
21595 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
21596
21597 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
21598 and later.
21599
21600 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
21601
21602 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
21603
21604 2018-05-28 Richard Biener <rguenther@suse.de>
21605
21606 PR tree-optimization/85933
21607 * tree-vect-data-refs.c (vect_record_base_alignments): Only
21608 look at stmts marked as vectorizable.
21609
21610 2018-05-28 Richard Biener <rguenther@suse.de>
21611
21612 PR tree-optimization/85934
21613 * tree-vect-generic.c (expand_vector_operations_1): Hoist
21614 vector boolean check before scalar optimization.
21615
21616 2018-05-28 Jakub Jelinek <jakub@redhat.com>
21617
21618 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
21619 for armv5te.
21620
21621 2018-05-28 Mark Wielaard <mark@klomp.org>
21622
21623 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
21624 if it is an expression containing a minus sign.
21625
21626 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
21627
21628 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
21629
21630 2018-05-27 Paul Koning <ni1d@arrl.net>
21631
21632 * config/pdp11/pdp11.md (truncsihi2): Remove.
21633
21634 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
21635 Chung-Ju Wu <jasonwucj@gmail.com>
21636
21637 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
21638 implementation.
21639 (unaligned_store_dw): Ditto.
21640 * config/nds32/nds32-memory-manipulation.c
21641 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
21642 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
21643 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
21644 (emit_setmem_word_loop): Rename to ...
21645 (emit_setmem_doubleword_loop): ... this.
21646 (nds32_gen_dup_4_byte_to_word_value): New function.
21647 (nds32_gen_dup_8_byte_to_double_word_value): New function.
21648 (nds32_expand_setmem_loop): Refine implementation.
21649 (nds32_expand_setmem_loop_v3m): Ditto.
21650 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
21651 pattern.
21652
21653 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21654
21655 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
21656
21657 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21658
21659 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
21660 (nds32_init_machine_status): Initialize machine->attr_naked_p and
21661 machine->attr_no_prologue_p.
21662 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
21663 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
21664 (nds32_expand_epilogue): Consider attr_naked_p.
21665 (nds32_expand_epilogue_v3pop): Likewise.
21666 (nds32_can_use_return_insn): Likewise.
21667 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
21668 attr_no_prologue_p fields.
21669 * config/nds32/nds32.opt (mret-in-naked-func): New option.
21670
21671 2018-05-27 Jakub Jelinek <jakub@redhat.com>
21672
21673 PR target/85918
21674 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
21675 attributes.
21676 * config/i386/sse.md
21677 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
21678 Rename to ...
21679 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
21680 ... this.
21681 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
21682 Rename to ...
21683 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
21684 ... this.
21685 (*<floatsuffix>floatv2div2sf2): Rename to ...
21686 (*float<floatunssuffix>v2div2sf2): ... this.
21687 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
21688 (float<floatunssuffix>v2div2sf2_mask): ... this.
21689 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
21690 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
21691 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
21692 to ...
21693 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
21694 ... this.
21695 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21696 Rename to ...
21697 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21698 ... this.
21699 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21700 Rename to ...
21701 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21702 ... this.
21703 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
21704 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
21705 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
21706 gen_ufix_truncv8dfv8si2.
21707 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
21708 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
21709 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
21710 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
21711 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
21712 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
21713 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
21714 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
21715
21716 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
21717
21718 PR target/85900
21719 PR target/85345
21720 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
21721
21722 2018-05-25 Jim Wilson <jimw@sifive.com>
21723
21724 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
21725 * config/riscv/riscv.c (struct machine_function): Add
21726 interrupt_handler_p and attribute_checked_p fields.
21727 (riscv_attribute_table): Add interrupt.
21728 (riscv_interrupt_type_p): New.
21729 (riscv_save_reg_p): Save extra regs for interrupt handler.
21730 (riscv_use_save_libcall): Return false for interrupt handler.
21731 (riscv_first_stack_step): Add forward declaration.
21732 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
21733 for interrupt handler with large frame. Use it for saved reg list.
21734 (riscv_expand_prologue): Move flag_stack_usage_info support to
21735 eliminate duplication.
21736 (riscv_expand_epilogue): Generate mret for interrupt handler.
21737 (riscv_epilogue_uses): New.
21738 (riscv_can_use_return_insn): Return false for interrupt handler.
21739 (riscv_function_ok_for_sibcall): Likewise.
21740 (riscv_set_current_function): Add interrupt handler support.
21741 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
21742 * config/riscv/riscv.md (UNSPECV_MRET): New.
21743 (GP_REGNUM): New.
21744 (riscv_frflags, riscv_fsflags): Use tab after opcode.
21745 (riscv_mret): New.
21746 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
21747
21748 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
21749
21750 PR tree-optimization/85712
21751 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
21752 this candidate has already been replaced in-situ by a copy.
21753
21754 2018-05-25 Jason Merrill <jason@redhat.com>
21755
21756 PR c++/80485 - inline function non-zero address.
21757 * symtab.c (nonzero_address): Check DECL_COMDAT.
21758
21759 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
21760
21761 PR target/83628
21762 * config/alpha/alpha.md (ashlsi3): New insn pattern.
21763 (*ashlsi_se): Rename from *ashldi_se. Define as sign
21764 extension of SImode operation. Use const123_operand predicate.
21765 (*saddsi_1): Remove.
21766 (*saddl_se_1): Ditto.
21767 (*ssubsi_1): Ditto.
21768 (*ssubl_se_1): Ditto.
21769 * config/alpha/predicates.md (const123_operand): New predicate.
21770 * config/alpha/constraints.md (P): Use IN_RANGE.
21771
21772 2018-05-25 Richard Biener <rguenther@suse.de>
21773
21774 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
21775 defaulted to true.
21776 (ref_maybe_used_by_stmt_p): Likewise.
21777 (stmt_may_clobber_ref_p): Likewise.
21778 (stmt_may_clobber_ref_p_1): Likewise.
21779 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
21780 and pass it along.
21781 (ref_maybe_used_by_stmt_p): Likewise.
21782 (stmt_may_clobber_ref_p): Likewise.
21783 (stmt_may_clobber_ref_p_1): Likewise.
21784 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
21785 the alias oracle to disambiguate DRs with stmts DR analysis
21786 couldn't handle.
21787 (vect_analyze_data_refs): Do not give up on not analyzable
21788 DRs for BB vectorization. Remove code truncating the dataref
21789 vector.
21790
21791 2018-05-25 Jakub Jelinek <jakub@redhat.com>
21792
21793 PR target/85832
21794 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
21795 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
21796 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
21797
21798 2018-05-25 Richard Biener <rguenther@suse.de>
21799
21800 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
21801 function, combining stmt data ref gathering and fatal analysis
21802 parts.
21803 (vect_analyze_data_refs): Remove now redudnant code and simplify.
21804 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
21805 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
21806 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
21807 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
21808
21809 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21810
21811 PR tree-optimization/85720
21812 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
21813 SCC if all partitions are builtins.
21814 (version_loop_by_alias_check): New parameter. Generate cancelable
21815 runtime alias check if all partitions are builtins.
21816 (distribute_loop): Update call to above function.
21817
21818 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21819
21820 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
21821 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
21822 (parm_default_def_partition_arg): Ditto.
21823 (set_parm_default_def_partition): Ditto.
21824 (get_parm_default_def_partitions): Ditto and make it static.
21825 (get_undefined_value_partitions): Ditto and make it static.
21826 (remove_ssa_form): Refactor call to init_var_map here.
21827 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
21828 computation for loop region.
21829 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
21830 (register_default_def): Delete.
21831 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
21832 (parm_default_def_partition_arg): Ditto.
21833 (set_parm_default_def_partition): Ditto.
21834 (get_parm_default_def_partitions): Ditto and make it static.
21835 (get_undefined_value_partitions): Ditto and make it static.
21836 (coalesce_with_default, coalesce_with_default): Update comment.
21837 (create_coalesce_list_for_region): New func factored out from
21838 create_outofssa_var_map.
21839 (populate_coalesce_list_for_outofssa): New func factored out from
21840 create_outofssa_var_map and coalesce_ssa_name.
21841 (create_outofssa_var_map): Delete.
21842 (coalesce_ssa_name): Refactor to support live range computation.
21843 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
21844 (get_parm_default_def_partitions): Delete.
21845 (get_undefined_value_partitions): Ditto.
21846 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
21847 computation for loop region.
21848 (new_tree_live_info, loe_visit_block): Ditto.
21849 (live_worklist, set_var_live_on_entry): Ditto.
21850 (calculate_live_on_exit, verify_live_on_entry): Ditto.
21851 * tree-ssa-live.h (struct _var_map): New fields.
21852 (init_var_map): Change decl.
21853 (region_contains_p): New.
21854
21855 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21856
21857 * tree-ssa-live.h (live_merge_and_clear): Delete.
21858
21859 2018-05-25 Richard Biener <rguenther@suse.de>
21860
21861 PR c++/85912
21862 * tree-dump.c (dequeue_and_dump): Remove access to removed
21863 operand 2 of a SWITCH_EXPR.
21864
21865 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21866
21867 * doc/sourcebuild.texi (vect_double_cond_arith): Include
21868 multiplication and division.
21869 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
21870 (cond_udiv@var{m}, cond_umod@var{m}): Document.
21871 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
21872 (cond_udiv_optab, cond_umod_optab): New optabs.
21873 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
21874 (IFN_COND_RDIV): New internal functions.
21875 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
21876 TRUNC_MOD_EXPR and RDIV_EXPR.
21877 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
21878 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
21879 New unspecs.
21880 (SVE_INT_BINARY): Include mult.
21881 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
21882 (optab, sve_int_op): Handle mult.
21883 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
21884 UNSPEC_COND_DIV.
21885 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
21886 for SVE_INT_BINARY_SD.
21887
21888 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21889
21890 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
21891 (optab, sve_int_op): Handle div and udiv.
21892 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
21893 for SVE_INT_BINARY_SD.
21894 (*<optab><mode>3): New insn for the same.
21895
21896 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21897
21898 * tree-vect-patterns.c: Include predict.h.
21899 (vect_recog_divmod_pattern): Restrict check for division support
21900 to when optimizing for size.
21901
21902 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21903
21904 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
21905 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
21906 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
21907 (gimple_match_op::set_op): Likewise.
21908 (gimple_resimplify4): Declare.
21909 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
21910 (expr::gen_transform): Likewise.
21911 (decision_tree::gen): Generate a simplification routine for 4 operands.
21912 * gimple-match-head.c (gimple_simplify): Add an overload for
21913 4 operands. In the top-level function, handle up to 4 call
21914 arguments and call gimple_resimplify4.
21915 (gimple_resimplify4): New function.
21916 (build_call_internal): Pass a fourth operand.
21917 (maybe_push_to_seq): Likewise.
21918 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
21919 Fold VEC_COND_EXPRs of an operation and a default value into
21920 an IFN_COND_* function if possible.
21921 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
21922 New unspecs.
21923 (SVE_COND_FP_BINARY): Include them.
21924 (optab, sve_fp_op): Handle them.
21925 (SVE_INT_BINARY_REV): New code iterator.
21926 (SVE_COND_FP_BINARY_REV): New int iterator.
21927 (commutative): New int attribute.
21928 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
21929 Declare.
21930 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
21931 function.
21932 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
21933 (*cond_<optab><mode>): New patterns for reversed operands.
21934
21935 2018-05-25 Richard Biener <rguenther@suse.de>
21936
21937 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
21938 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
21939 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
21940 (STMT_VINFO_GROUPED_ACCESS): Adjust.
21941 * tree-vect-data-refs.c (everywhere): Adjust users.
21942 * tree-vect-loop.c (everywhere): Likewise.
21943 * tree-vect-slp.c (everywhere): Likewise.
21944 * tree-vect-stmts.c (everywhere): Likewise.
21945 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
21946
21947 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21948
21949 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
21950 Rename to...
21951 (gcc_cv_as_section_exclude): ... this.
21952 Try Solaris as #exclude syntax.
21953 * configure: Regenerate.
21954 * config.in: Regenerate.
21955 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
21956 SECTION_EXCLUDE.
21957 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
21958 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
21959
21960 * varasm.c (default_elf_asm_named_section): Don't check if
21961 HAVE_GAS_SECTION_EXCLUDE is defined.
21962
21963 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21964
21965 * doc/md.texi: Update the documentation of the cond_* optabs
21966 to mention the new final operand. Fix GET_MODE_NUNITS call.
21967 Describe the scalar case too.
21968 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
21969 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
21970 instead of 2.
21971 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
21972 (get_conditional_internal_fn): Update comment.
21973 * tree-vect-loop.c (vectorizable_reduction): Pass the original
21974 accumulator value as a final argument to conditional functions.
21975 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
21976 a define_expand and add an "else" operand. Assert for now that
21977 the else operand is equal to operand 2. Use SVE_INT_BINARY and
21978 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
21979 (*cond_<optab><mode>): New patterns.
21980 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
21981 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21982 (UNSPEC_COND_EOR): Delete.
21983 (optab): Remove associated mappings.
21984 (SVE_INT_BINARY): New code iterator.
21985 (sve_int_op): Remove int attribute and add "minus" to the code
21986 attribute.
21987 (SVE_COND_INT_OP): Delete.
21988 (SVE_COND_FP_OP): Rename to...
21989 (SVE_COND_FP_BINARY): ...this.
21990
21991 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21992
21993 * optabs.c (can_reuse_operands_p): New function.
21994 (maybe_legitimize_operands): Try to reuse the results for
21995 earlier operands.
21996
21997 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
21998
21999 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
22000 Add {q} suffix to insn mnemonic.
22001
22002 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
22003
22004 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
22005 (msp430_warn_func_return): New.
22006
22007 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
22008
22009 * fold-const.c (tree_nonzero_bits): New function.
22010 * fold-const.h (tree_nonzero_bits): Likewise.
22011 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
22012 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
22013
22014 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
22015
22016 PR target/85900
22017 PR target/85345
22018 * varasm.c (assemble_alias): Check ifunc_resolver only on
22019 FUNCTION_DECL.
22020
22021 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
22022
22023 PR target/85903
22024 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
22025 when memory input operand is handled.
22026
22027 2018-05-24 Luis Machado <luis.machado@linaro.org>
22028
22029 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
22030 global.
22031 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
22032
22033 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22034
22035 * match.pd: Delay FMA folds until after vectorization.
22036
22037 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
22038
22039 PR target/83009
22040 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
22041 address check not strict.
22042
22043 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22044
22045 * gimple-match.h (gimple_match_op): New class.
22046 (mprts_hook): Replace parameters with a gimple_match_op *.
22047 (maybe_build_generic_op): Likewise.
22048 (gimple_simplified_result_is_gimple_val): Replace parameters with
22049 a const gimple_match_op *.
22050 (gimple_simplify): Replace code_helper * and tree * parameters with
22051 a gimple_match_op * parameter.
22052 (gimple_resimplify1): Replace code_helper *, tree and tree *
22053 parameters with a gimple_match_op * parameter.
22054 (gimple_resimplify2): Likewise.
22055 (gimple_resimplify3): Likewise.
22056 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
22057 parameters with a gimple_match_op * parameter.
22058 * gimple-match-head.c (gimple_simplify): Change prototypes of
22059 auto-generated functions to take a gimple_match_op * instead of
22060 separate code_helper * and tree * parameters. Make the same
22061 change in the top-level overload and update calls to the
22062 gimple_resimplify routines. Update calls to the auto-generated
22063 functions and to maybe_push_res_to_seq in the publicly-facing
22064 operation-specific gimple_simplify overloads.
22065 (gimple_match_op::MAX_NUM_OPS): Define.
22066 (gimple_resimplify1): Replace rcode and ops with a single res_op
22067 parameter. Update call to gimple_simplify.
22068 (gimple_resimplify2): Likewise.
22069 (gimple_resimplify3): Likewise.
22070 (mprts_hook): Replace parameters with a gimple_match_op *.
22071 (maybe_build_generic_op): Likewise.
22072 (build_call_internal): Replace type, nargs and ops with
22073 a gimple_match_op *.
22074 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
22075 with a single gimple_match_op *. Update calls to mprts_hook,
22076 build_call_internal and gimple_simplified_result_is_gimple_val.
22077 Factor out code that is common to the tree_code and combined_fn cases.
22078 * genmatch.c (expr::gen_transform): Replace tem_code and
22079 tem_ops with a gimple_match_op called tem_op. Update calls
22080 to the gimple_resimplify functions and maybe_push_res_to_seq.
22081 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
22082 res_ops. Update call to the gimple_resimplify functions.
22083 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
22084 (decision_tree::gen): Make the functions take a gimple_match_op *
22085 called res_op instead of separate res_code and res_ops parameters.
22086 Update call accordingly.
22087 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
22088 and ops with a single res_op parameter. Update calls to
22089 maybe_build_generic_op and maybe_push_res_to_seq.
22090 (fold_stmt_1): Update calls to gimple_simplify and
22091 replace_stmt_with_simplification.
22092 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
22093 and gimple_simplified_result_is_gimple_val.
22094 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
22095 gimple_simplify.
22096 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
22097 with a gimple_match_op *.
22098 (vn_nary_build_or_lookup): Likewise. Update call to
22099 vn_nary_build_or_lookup_1.
22100 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
22101 gimple_match_op *. Update calls to the gimple_resimplify routines
22102 and to gimple_simplified_result_is_gimple_val.
22103 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
22104 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
22105 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
22106 (visit_nary_op): Likewise.
22107 (visit_reference_op_load): Likewise.
22108
22109 2018-05-23 Luis Machado <luis.machado@linaro.org>
22110
22111 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
22112 modifier for printing the step amount.
22113
22114 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
22115
22116 PR target/78849
22117 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
22118 types.
22119
22120 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
22121
22122 * doc/sourcebuild.texi (Endianness): New subsubsection.
22123
22124 2018-05-23 Luis Machado <luis.machado@linaro.org>
22125
22126 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22127 <prefetch_dynamic_strides>: New const bool field.
22128 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22129 prefetch_dynamic_strides.
22130 (exynosm1_prefetch_tune): Likewise.
22131 (thunderxt88_prefetch_tune): Likewise.
22132 (thunderx_prefetch_tune): Likewise.
22133 (thunderx2t99_prefetch_tune): Likewise.
22134 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
22135 false.
22136 (aarch64_override_options_internal): Update to set
22137 PARAM_PREFETCH_DYNAMIC_STRIDES.
22138 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22139 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22140 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22141 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22142 prefetch-dynamic-strides setting.
22143
22144 2018-05-23 Luis Machado <luis.machado@linaro.org>
22145
22146 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22147 <minimum_stride>: New const int field.
22148 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22149 minimum_stride field defaulting to -1.
22150 (exynosm1_prefetch_tune): Likewise.
22151 (thunderxt88_prefetch_tune): Likewise.
22152 (thunderx_prefetch_tune): Likewise.
22153 (thunderx2t99_prefetch_tune): Likewise.
22154 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
22155 <default_opt_level>: Set to 3.
22156 (aarch64_override_options_internal): Update to set
22157 PARAM_PREFETCH_MINIMUM_STRIDE.
22158 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22159 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22160 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22161 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22162 stride is constant and is below the minimum stride threshold.
22163
22164 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22165
22166 * config/arm/arm-cpus.in (mode26): Delete.
22167 (armv4): Delete mode26 reference.
22168 * config/arm/arm.c (arm_configure_build_target): Delete use of
22169 isa_bit_mode26.
22170
22171 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22172
22173 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
22174 New insn pattern.
22175 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
22176 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
22177 for non-SSE modes.
22178 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
22179 (floatunsdidf2): Ditto.
22180
22181 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22182
22183 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
22184 (fixuns_trunc<mode>si2_avx512f): Ditto.
22185 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
22186 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
22187 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
22188
22189 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22190
22191 PR rtl-optimization/79985
22192 * df-scan.c (df_insn_refs_collect): Remove special case for
22193 global registers and asm statements.
22194
22195 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22196
22197 * extend.texi (Global Register Variables): Rewrite the bullet list.
22198 Note that the register is available for allocation. Note that access
22199 via inline asm must use constraints. Add note about async-signal
22200 handlers. Remove paragraph about automagic register selection.
22201
22202 2018-05-23 Richard Biener <rguenther@suse.de>
22203
22204 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
22205 of fixed offset from memset VN.
22206
22207 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
22208
22209 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
22210 first_interp field.
22211 (alloc_cand_and_find_basis): Initialize first_interp field.
22212 (slsr_process_mul): Modify first_interp field.
22213 (slsr_process_add): Likewise.
22214 (slsr_process_cast): Modify first_interp field for each new
22215 interpretation.
22216 (slsr_process_copy): Likewise.
22217 (dump_candidate): Dump first_interp field.
22218 (replace_mult_candidate): Process all interpretations, not just
22219 subsequent ones.
22220 (replace_rhs_if_not_dup): Likewise.
22221 (replace_one_candidate): Likewise.
22222
22223 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
22224
22225 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
22226 Add new boolean.
22227 (aarch64_needs_frame_chain): New function.
22228 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
22229
22230 2018-05-23 Sudakshina Das <sudi.das@arm.com>
22231
22232 PR target/84882
22233 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
22234 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
22235 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
22236 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
22237 as true for strict-align.
22238 (aarch64_can_inline_p): Perform checks even when callee has no
22239 attributes to check for strict alignment.
22240 * doc/extend.texi (AArch64 Function Attributes): Document
22241 no-strict-align.
22242 * doc/invoke.texi: (AArch64 Options): Likewise.
22243
22244 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
22245
22246 PR tree-optimization/85853
22247 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
22248 the handling of the root of the node to...
22249 (vect_slp_analyze_node_operations_1): ...this new function,
22250 and run the whole thing with the child nodes' def types
22251 set according to their SLP node's def type.
22252
22253 2018-05-23 Richard Biener <rguenther@suse.de>
22254
22255 PR middle-end/85874
22256 * tree-data-ref.c (create_runtime_alias_checks): Defer
22257 and ignore overflow warnings.
22258
22259 2018-05-23 Yury Gribov <tetra2005@gmail.com>
22260
22261 PR tree-optimization/85822
22262 * tree-vrp.c (is_masked_range_test): Fix handling of negative
22263 constants.
22264
22265 2018-05-23 Richard Biener <rguenther@suse.de>
22266
22267 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
22268 memset constants via native_interpret_expr.
22269
22270 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
22271
22272 PR target/85345
22273 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
22274 attribute.
22275 (cgraph_node::create_alias): Likewise.
22276 (cgraph_node::get_availability): Check ifunc_resolver instead
22277 of looking up ifunc attribute.
22278 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
22279 * varasm.c (do_assemble_alias): Likewise.
22280 (assemble_alias): Likewise.
22281 (default_binds_local_p_3): Likewise.
22282 * cgraph.h (cgraph_node): Add ifunc_resolver.
22283 (cgraph_node::only_called_directly_or_aliased_p): Return false
22284 for IFUNC resolver.
22285 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
22286 attribute.
22287 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
22288 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
22289 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
22290 instead of looking up ifunc attribute.
22291
22292 2018-05-22 Luis Machado <luis.machado@linaro.org>
22293
22294 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
22295
22296 2018-05-22 Martin Sebor <msebor@redhat.com>
22297
22298 PR middle-end/85359
22299 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
22300 only when expasion succeeds.
22301 (expand_builtin_strcmp): Same.
22302 (expand_builtin_strncmp): Same.
22303
22304 2018-05-22 Martin Sebor <msebor@redhat.com>
22305
22306 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
22307
22308 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22309 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22310
22311 * config/aarch64/aarch64-ldpstp.md: Replace uses of
22312 aarch64_mem_pair_operand with memory_operand and delete operand swapping
22313 code.
22314 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22315 Add check for legitimate_address.
22316 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
22317 (aarch64_swap_ldrstr_operands): New.
22318 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
22319 Define prototype.
22320
22321 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22322 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22323
22324 * config/aarch64/aarch64.md: New patterns to generate stp
22325 and ldp.
22326 (store_pair_sw, store_pair_dw): New patterns to generate stp for
22327 single words and double words.
22328 (load_pair_sw, load_pair_dw): Likewise.
22329 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
22330 Delete.
22331 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
22332 Delete.
22333 * config/aarch64/aarch64-ldpstp.md: Modify peephole
22334 for different mode ldpstp and add peephole for merged zero stores.
22335 Likewise for loads.
22336 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22337 Add size check.
22338 (aarch64_gen_store_pair): Rename calls to match new patterns.
22339 (aarch64_gen_load_pair): Rename calls to match new patterns.
22340 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
22341 (load_pair<DREG:mode><DREG2:mode>): ... This.
22342 (store_pair<mode>): Rename to...
22343 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
22344 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
22345 New mode iterators.
22346 (V_INT_EQUIV): Handle SImode.
22347 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
22348 New predicate.
22349
22350 2018-05-22 Martin Sebor <msebor@redhat.com>
22351
22352 PR c/85623
22353 * calls.c (maybe_warn_nonstring_arg): Use string length to set
22354 or ajust the presumed bound on an operation to avoid unnecessary
22355 warnings.
22356
22357 2018-05-22 Martin Sebor <msebor@redhat.com>
22358
22359 PR tree-optimization/85826
22360 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
22361 assuming that a DECL necesarily has a constant size.
22362
22363 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
22364
22365 PR middle-end/85862
22366 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
22367
22368 2018-05-22 Richard Biener <rguenther@suse.de>
22369
22370 PR tree-optimization/85834
22371 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
22372 non-constant and non-zero memset arguments.
22373
22374 2018-05-22 Martin Liska <mliska@suse.cz>
22375
22376 PR ipa/85607
22377 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
22378
22379 2018-05-22 Richard Biener <rguenther@suse.de>
22380
22381 PR tree-optimization/85863
22382 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
22383 comparisons when vectype is specified.
22384 (vectorizable_condition): Do not specify vectype for
22385 vect_is_simple_cond when SLP vectorizing.
22386
22387 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
22388
22389 PR target/85657
22390 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
22391 define __ibm128 as long double.
22392 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
22393 as a distinct type when IEEE 128-bit support is enabled.
22394 (init_float128_ieee): Fix up conversions between IFmode and IEEE
22395 128-bit types to use the correct functions.
22396 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
22397 convert between 128-bit floating point types that have different
22398 modes but the same representation, instead of using gen_lowpart to
22399 makean alias.
22400 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
22401 KFmode.
22402 (IFKF_reg): New attributes to give the register constraints for
22403 IFmode and KFmode.
22404 (extend<mode>tf2_internal): New insns to mark an explicit
22405 conversion between 128-bit floating point types that have a
22406 different mode but share the same representation.
22407
22408 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
22409
22410 PR tree-optimization/85814
22411 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
22412 a null return from get_strinfo when unsharing the next
22413 strinfo in the chain.
22414
22415 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22416
22417 PR gcc/84923
22418 * varasm.c (weak_finish): Clean up weak_decls.
22419
22420 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22421
22422 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
22423 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
22424 UNSPEC_UADALP values.
22425 * config/aarch64/iterators.md (ABAL): New int iterator.
22426 (ABDL2): Likewise.
22427 (ADALP): Likewise.
22428 (sur): Add mappings for the above.
22429 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
22430 New define_insn.
22431 (aarch64_<sur>abal<mode>_4): Likewise.
22432 (aarch64_<sur>adalp<mode>_3): Likewise.
22433 (<sur>sadv16qi): New define_expand.
22434
22435 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
22436
22437 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
22438 (*movdf_internal): Ditto.
22439 (*rcpsf2_sse): Ditto.
22440 (*rsqrtsf2_sse): Ditto.
22441 (*sqrt<mode>2_sse): Ditto.
22442
22443 2018-05-21 Tamar Christina <tamar.christina@arm.com>
22444
22445 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
22446 eor3q<mode>4.
22447 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
22448 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
22449 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
22450 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
22451 vbcaxq_s64): New.
22452 * config/aarch64/arm_neon.h: Likewise.
22453 * config/aarch64/iterators.md (VQ_I): New.
22454
22455 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
22456
22457 * config.gcc: Add arc/t-multilib-linux to tmake_file for
22458 arc*-*-linux*.
22459 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
22460 MULTILIB_DIRNAMES
22461
22462 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22463
22464 * config/nds32/constraints.md (S): New constraint.
22465 * config/nds32/nds32.md (call_internal): Use constraint S.
22466 (call_value_internal): Likewise.
22467 (sibcall_internal): Likewise.
22468 (sibcall_value_internal): Likewise.
22469
22470 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22471 Chung-Ju Wu <jasonwucj@gmail.com>
22472
22473 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
22474 into consideration.
22475
22476 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22477 Chung-Ju Wu <jasonwucj@gmail.com>
22478
22479 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
22480 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
22481 (nds32_rtx_costs_impl): Simplify.
22482 (nds32_address_cost_impl): Simplify.
22483 (nds32_init_rtx_costs): New function.
22484 (nds32_rtx_costs_speed_prefer): Likewise.
22485 (nds32_rtx_costs_size_prefer): Likewise.
22486 (nds32_address_cost_speed_prefer): Likewise.
22487 (nds32_address_cost_speed_fwprop): Likewise.
22488 (nds32_address_cost_size_prefer): Likewise.
22489 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
22490 * config/nds32/nds32.c (nds32_option_override): Use
22491 nds32_init_rtx_costs function.
22492
22493 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22494
22495 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
22496 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
22497 (TARGET_PIPELINE_N8): Likewise.
22498 (TARGET_PIPELINE_N10): Likewise.
22499 (TARGET_PIPELINE_N13): Likewise.
22500 (TARGET_PIPELINE_GRAYWOLF): Likewise.
22501
22502 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
22503
22504 * config/nds32/nds32-fpu.md: Update copyright year.
22505
22506 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22507
22508 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
22509
22510 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22511
22512 * config/nds32/nds32.c
22513 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
22514 * config/nds32/nds32.opt (minline-asm-r15): New option.
22515
22516 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22517
22518 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
22519 MASK_HW_ABS.
22520 * config/nds32/nds32.md (abssi2): New pattern.
22521
22522 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
22523
22524 * config/i386/i386.md (rex64namesuffix): New mode attribute.
22525 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
22526 Merge insn pattern from sse_cvtsi2ss<round_name> and
22527 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
22528 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
22529 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
22530 using SWI48 mode iterator.
22531 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
22532 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
22533 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
22534 pattern from sse_cvttss2si<round_saeonly_name>
22535 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
22536 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
22537 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
22538 using SWI48 mode iterator.
22539 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
22540 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
22541 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
22542 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
22543 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
22544 using SWI48 mode iterator.
22545 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
22546 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
22547 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
22548 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
22549 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
22550 SWI48 mode iterator.
22551 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
22552 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
22553 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
22554 pattern from sse_cvttsd2si<round_saeonly_name>
22555 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
22556
22557 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22558
22559 * config/nds32/nds32-md-auxiliary.c
22560 (nds32_valid_smw_lwm_base_p): Refine.
22561 (nds32_output_smw_single_word): Refine.
22562 (nds32_output_smw_double_word): New.
22563 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
22564
22565 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22566
22567 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
22568 (nds32_output_stack_pop): Refine.
22569 (nds32_expand_unaligned_load): Refine.
22570 (nds32_expand_unaligned_store): Refine.
22571
22572 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22573 Chung-Ju Wu <jasonwucj@gmail.com>
22574
22575 * config/nds32/constants.md: Add TP_REGNUM constant.
22576 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
22577 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
22578 UNSPEC_ADD32.
22579 * config/nds32/nds32-doubleword.md: Consider flag_pic.
22580 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
22581 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
22582 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
22583 and PIC code generation.
22584 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
22585 code generation.
22586 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
22587 optimization.
22588 * config/nds32/nds32.md: Support TLS and PIC.
22589 * config/nds32/nds32.c: Support TLS and PIC.
22590 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
22591 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
22592 predicate.
22593
22594 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22595
22596 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
22597 mode with E_ prefix.
22598
22599 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22600 Chung-Ju Wu <jasonwucj@gmail.com>
22601
22602 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
22603 * config/nds32/nds32-md-auxiliary.c
22604 (symbolic_reference_mentioned_p): New.
22605 (nds32_legitimize_ict_address): New.
22606 (nds32_expand_ict_move): New.
22607 (nds32_indirect_call_referenced_p): New.
22608 (nds32_symbol_binds_local_p): Delete.
22609 (nds32_long_call_p): Modify.
22610 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
22611 * config/nds32/nds32-protos.h
22612 (symbolic_reference_mentioned_p): Declare.
22613 (nds32_legitimize_ict_address): Declare.
22614 (nds32_expand_ict_move): Declare.
22615 (nds32_indirect_call_referenced_p): Declare.
22616 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
22617 (nds32_relax_group): Use nds32_ict_const_p as condition.
22618 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
22619 (nds32_asm_file_start): Output ict_model directive in asm code.
22620 (nds32_legitimate_address_p): Consider indirect call.
22621 (nds32_print_operand): Consider indirect call.
22622 (nds32_print_operand_address): Consider indirect call.
22623 (nds32_insert_attributes): Handle "indirect_call" attribute.
22624 (TARGET_LEGITIMATE_ADDRESS_P): Define.
22625 (TARGET_LEGITIMATE_CONSTANT_P): Define.
22626 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
22627 (TARGET_DELEGITIMIZE_ADDRESS): Define.
22628 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
22629 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
22630 (TARGET_ICT_MODEL_SMALL): Define.
22631 (TARGET_ICT_MODEL_LARGE): Define.
22632 * config/nds32/nds32.md (movsi): Consider ict model.
22633 (call, call_value): Consider ict model.
22634 (sibcall, sibcall_value): Consider ict model.
22635 * config/nds32/nds32.opt (mict-model): New option.
22636 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
22637 model.
22638
22639 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
22640 Monk Chiang <sh.chiang04@gmail.com>
22641 Jim Wilson <jimw@sifive.com>
22642
22643 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
22644 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
22645 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
22646 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
22647 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
22648 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
22649 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
22650 compute save_libcall_adjustment properly.
22651 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
22652 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
22653 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
22654 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
22655 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
22656 (ABI_SPEC): Handle mabi=ilp32e.
22657 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
22658 (RVE): Add RVE mask.
22659 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
22660 <-march>: Add rv32e as an example.
22661
22662 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
22663
22664 PR c++/82899
22665 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
22666 (intra_create_variable_infos): Handle C++ constructors.
22667
22668 2018-05-18 Martin Liska <mliska@suse.cz>
22669
22670 * passes.def: Remove a redundant pass.
22671
22672 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
22673
22674 PR bootstrap/85838
22675 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
22676
22677 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22678
22679 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
22680 (ARMv4): Update.
22681 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
22682 (ARMv6m): Update.
22683 (armv2, armv2a, armv3, armv3m): Delete architectures.
22684 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
22685 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
22686 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
22687 Delete cpus.
22688 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
22689 (*mulsidi3adddi): Likewise.
22690 (mulsidi3): Likewise.
22691 (*mulsidi3_nov6): Likewise.
22692 (umulsidi3): Likewise.
22693 (umulsidi3_nov6): Likewise.
22694 (umaddsidi4): Likewise.
22695 (*umulsidi3adddi): Likewise.
22696 (smulsi3_highpart): Likewise.
22697 (*smulsi3_highpart_nov6): Likewise.
22698 (umulsi3_highpart): Likewise.
22699 (*umulsi3_highpart_nov6): Likewise.
22700 * config/arm/arm.h (arm_arch3m): Delete.
22701 * config/arm/arm.c (arm_arch3m): Delete.
22702 (arm_option_override_internal): Update armv3-related comment.
22703 (arm_configure_build_target): Delete use of isa_bit_mode32.
22704 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
22705 (arm_rtx_costs_internal): Delete check of arm_arch3m.
22706 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
22707 (mulsa3): Likewise.
22708 (mulusa3): Likewise.
22709 * config/arm/arm-protos.h (arm_arch3m): Delete.
22710 * config/arm/arm-tables.opt: Regenerate.
22711 * config/arm/arm-tune.md: Likewise.
22712 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
22713 deleted architectures.
22714
22715 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22716
22717 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
22718 (armv5t, armv5te): New features.
22719 (ARMv5, ARMv5e): Delete fgroups.
22720 (ARMv5t, ARMv5te): Adjust for above changes.
22721 (ARMv6m): Likewise.
22722 (armv5, armv5e): Delete arches.
22723 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
22724 arm_arch5.
22725 (*call_reg_arm): Likewise.
22726 (*call_value_reg_armv5): Likewise.
22727 (*call_value_reg_arm): Likewise.
22728 (*call_symbol): Likewise.
22729 (*call_value_symbol): Likewise.
22730 (*sibcall_insn): Likewise.
22731 (*sibcall_value_insn): Likewise.
22732 (clzsi2): Likewise.
22733 (prefetch): Likewise.
22734 (define_split and define_peephole2 dependent on arm_arch5):
22735 Likewise.
22736 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
22737 arm_arch5e.
22738 (TARGET_ARM_QBIT): Likewise.
22739 (TARGET_DSP_MULTIPLY): Likewise.
22740 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
22741 (arm_arch5, arm_arch5e): Delete.
22742 (arm_arch5t, arm_arch5te): Declare.
22743 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
22744 (arm_arch5t): Declare.
22745 (arm_option_reconfigure_globals): Update for the above.
22746 (arm_options_perform_arch_sanity_checks): Update comment, replace
22747 use of arm_arch5 with arm_arch5t.
22748 (use_return_insn): Likewise.
22749 (arm_emit_call_insn): Likewise.
22750 (output_return_instruction): Likewise.
22751 (arm_final_prescan_insn): Likewise.
22752 (arm_coproc_builtin_available): Likewise.
22753 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
22754 arm_arch5e with arm_arch5t and arm_arch5te.
22755 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
22756 (arm_arch5t, arm_arch5te): Declare.
22757 * config/arm/arm-tables.opt: Regenerate.
22758 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
22759 * config/arm/t-multilib: Likewise.
22760 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
22761 instead of arm_arch5.
22762 (*call_reg_thumb1): Likewise.
22763 (*call_value_reg_thumb1_v5): Likewise.
22764 (*call_value_reg_thumb1): Likewise.
22765 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
22766 unreachable path.
22767 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
22768
22769 2018-05-18 Martin Liska <mliska@suse.cz>
22770
22771 PR gcov-profile/84846
22772 * doc/gcov.texi: Document -t option of gcov tool.
22773
22774 2018-05-18 Martin Liska <mliska@suse.cz>
22775
22776 PR gcov-profile/84846
22777 * gcov.c (print_usage): Add new -t option.
22778 (process_args): Handle the option.
22779 (generate_results): Use stdout as output when requested by
22780 the option.
22781
22782 2018-05-18 Martin Liska <mliska@suse.cz>
22783
22784 PR gcov-profile/84846
22785 * coverage.c (coverage_init): Write PWD to .gcno file.
22786 * doc/gcov.texi: Document how working directory is printed.
22787 * gcov-dump.c (dump_gcov_file): Print PWD.
22788 * gcov.c (output_intermediate_file): Likewise.
22789 (read_graph_file): Read PWD string.
22790 (output_lines): Print PWD.
22791
22792 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22793
22794 PR middle-end/85817
22795 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
22796 for retval and return false if all args to phi are zero.
22797
22798 2018-05-18 Richard Biener <rguenther@suse.de>
22799
22800 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
22801 method.
22802 (evrp_dom_walker::before_dom_children): Call it.
22803
22804 2018-05-18 Richard Biener <rguenther@suse.de>
22805
22806 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
22807 results when processing array refs with variable index.
22808
22809 2018-05-18 Toon Moene <toon@moene.org>
22810
22811 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
22812 directly after that of -floop-interchange. Indicate that both
22813 options are enabled by default when specifying -O3.
22814
22815 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22816
22817 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
22818 iterator. Delete separate integer-mode vec_set<mode> expander.
22819 (aarch64_simd_vec_setv2di): Delete.
22820 (vec_setv2di): Delete.
22821 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
22822 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
22823 the "w, r" alternative.
22824
22825 2018-05-18 Martin Liska <mliska@suse.cz>
22826
22827 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
22828 * tree-pass.h (make_pass_lower_switch_O0): New function.
22829 * tree-switch-conversion.c (node_has_low_bound): Remove.
22830 (node_has_high_bound): Likewise.
22831 (node_is_bounded): Likewise.
22832 (class pass_lower_switch): Make it a template type and create
22833 two instances.
22834 (pass_lower_switch::execute): Add template argument.
22835 (make_pass_lower_switch): New function.
22836 (make_pass_lower_switch_O0): New function.
22837 (do_jump_if_equal): Remove.
22838 (emit_case_nodes): Simplify to just handle all 3 cases and leave
22839 all the hard work to tree optimization passes.
22840
22841 2018-05-18 Martin Liska <mliska@suse.cz>
22842
22843 * dbgcnt.c (limit_low): Renamed from limit.
22844 (limit_high): New variable.
22845 (dbg_cnt_is_enabled): Check for upper limit.
22846 (dbg_cnt): Adjust dumping.
22847 (dbg_cnt_set_limit_by_index): Add new argument for high
22848 value.
22849 (dbg_cnt_set_limit_by_name): Likewise.
22850 (dbg_cnt_process_single_pair): Parse new format.
22851 (dbg_cnt_process_opt): Use strtok.
22852 (dbg_cnt_list_all_counters): Remove 'value' and add
22853 'limit_high'.
22854 * doc/invoke.texi: Document changes.
22855
22856 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
22857
22858 * doc/sourcebuild.texi (scalar_all_fma): Document.
22859 * tree.def (FMA_EXPR): Delete.
22860 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
22861 * internal-fn.c (ternary_direct): New macro.
22862 (expand_ternary_optab_fn): Likewise.
22863 (direct_ternary_optab_supported_p): Likewise.
22864 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
22865 * builtins.c (fold_builtin_fma): Delete.
22866 (fold_builtin_3): Don't call it.
22867 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
22868 * expr.c (expand_expr_real_2): Likewise.
22869 * fold-const.c (operand_equal_p): Likewise.
22870 (fold_ternary_loc): Likewise.
22871 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
22872 * gimple.c (DEFTREECODE): Likewise.
22873 * gimplify.c (gimplify_expr): Likewise.
22874 * optabs-tree.c (optab_for_tree_code): Likewise.
22875 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
22876 * tree-eh.c (operation_could_trap_p): Likewise.
22877 (stmt_could_throw_1_p): Likewise.
22878 * tree-inline.c (estimate_operator_cost): Likewise.
22879 * tree-pretty-print.c (dump_generic_node): Likewise.
22880 (op_code_prio): Likewise.
22881 * tree-ssa-loop-im.c (stmt_cost): Likewise.
22882 * tree-ssa-operands.c (get_expr_operands): Likewise.
22883 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
22884 * fold-const-call.h (fold_fma): Delete.
22885 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
22886 CFN_FNMA and CFN_FNMS.
22887 (fold_fma): Delete.
22888 * genmatch.c (combined_fn): New enum.
22889 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
22890 (commutative_op): New function.
22891 (commutate): Use it. Handle more than 2 operands.
22892 (dt_operand::gen_gimple_expr): Use commutative_op.
22893 (parser::parse_expr): Allow :c to be used with non-binary
22894 operators if the commutative operand is known.
22895 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
22896 CFN_FMS, CFN_FNMA and CFN_FNMS.
22897 (backprop::process_assign_use): Remove FMA_EXPR handling.
22898 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
22899 (gen_hsa_fma): New function.
22900 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
22901 IFN_FNMA and IFN_FNMS.
22902 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
22903 * gimple-fold.h (follow_all_ssa_edges): Declare.
22904 * gimple-fold.c (follow_all_ssa_edges): New function.
22905 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
22906 gimple_build interface and use follow_all_ssa_edges to fold the result.
22907 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
22908 instead of checking for optabs directly.
22909 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
22910 rather than FMA_EXPRs.
22911 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
22912 call to IFN_FMA instead of an FMA_EXPR.
22913
22914 2018-05-17 Jim Wilson <jimw@sifive.com>
22915
22916 * expr.c (do_tablejump): When converting index to Pmode, if we have a
22917 sign extended promoted subreg, and the range does not have the sign bit
22918 set, then do a sign extend.
22919
22920 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
22921 test, check for sign extended subreg and/or constant operands, and
22922 do a sign extend in that case.
22923
22924 2018-05-17 Steve Ellcey <sellcey@cavium.com>
22925
22926 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
22927 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
22928 Add untyped.
22929 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
22930 Change logics_shift_reg to logics_shift_imm.
22931 (thunderx2t99_fp_loadpair_basic): Delete.
22932 (thunderx2t99_fp_storepair_basic): Delete.
22933 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
22934 (thunderx2t99_asimd_polynomial): Delete.
22935 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
22936 and neon_fp_mul_d_scalar_q.
22937 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
22938 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
22939 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
22940 (thunderx2t99_asimd_lut): Add missing tbl types.
22941 (thunderx2t99_asimd_ext): Delete.
22942 (thunderx2t99_asimd_load1_1_mult): Delete.
22943 (thunderx2t99_asimd_load1_2_mult): Delete.
22944 (thunderx2t99_asimd_load1_ldp): New.
22945 (thunderx2t99_asimd_load1): New.
22946 (thunderx2t99_asimd_load2): Add missing *load2* types.
22947 (thunderx2t99_asimd_load3): New.
22948 (thunderx2t99_asimd_load4): New.
22949 (thunderx2t99_asimd_store1_1_mult): Delete.
22950 (thunderx2t99_asimd_store1_2_mult): Delete.
22951 (thunderx2t99_asimd_store2_mult): Delete.
22952 (thunderx2t99_asimd_store2_onelane): Delete.
22953 (thunderx2t99_asimd_store_stp): New.
22954 (thunderx2t99_asimd_store1): New.
22955 (thunderx2t99_asimd_store2): New.
22956 (thunderx2t99_asimd_store3): New.
22957 (thunderx2t99_asimd_store4): New.
22958
22959 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
22960
22961 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
22962 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
22963
22964 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
22965 Segher Boessenkool <segher@kernel.crashing.org>
22966
22967 PR target/85698
22968 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
22969 operand.
22970
22971 2018-05-17 Richard Biener <rguenther@suse.de>
22972
22973 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
22974 for pruning loop and prune defs feeding only already visited PHIs.
22975
22976 2018-05-17 Richard Biener <rguenther@suse.de>
22977
22978 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
22979
22980 2018-05-17 Bin Cheng <bin.cheng@arm.com>
22981 Richard Biener <rguenther@suse.de>
22982
22983 PR tree-optimization/85793
22984 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
22985 for VMAT_ELEMENTWISE.
22986
22987 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
22988
22989 * internal-fn.h (lookup_internal_fn): Declare
22990 * internal-fn.c (lookup_internal_fn): New function.
22991 * gimple.c (gimple_build_call_from_tree): Handle calls to
22992 internal functions.
22993 * gimple-pretty-print.c (dump_gimple_call): Print "." before
22994 internal function names.
22995 * tree-pretty-print.c (dump_generic_node): Likewise.
22996 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
22997
22998 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
22999
23000 * gimple-fold.h (gimple_build): Make the function forms take
23001 combined_fn rather than built_in_function.
23002 (gimple_simplify): Likewise.
23003 * gimple-match-head.c (gimple_simplify): Likewise.
23004 * gimple-fold.c (gimple_build): Likewise.
23005 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
23006 rather than gimple_build_call_internal.
23007 (get_initial_defs_for_reduction): Likewise.
23008 (vect_create_epilog_for_reduction): Likewise.
23009 (vectorizable_live_operation): Likewise.
23010
23011 2018-05-17 Martin Liska <mliska@suse.cz>
23012
23013 * gimple-ssa-sprintf.c (format_directive): Do not use
23014 space in between 'G_' and '('.
23015
23016 2018-05-17 Jakub Jelinek <jakub@redhat.com>
23017
23018 PR target/85323
23019 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
23020 even if the mask is not all ones.
23021
23022 PR target/85323
23023 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
23024 vector.
23025 (ix86_gimple_fold_builtin): Likewise.
23026
23027 PR target/85323
23028 * config/i386/i386.c: Include tree-vector-builder.h.
23029 (ix86_vector_shift_count): New function.
23030 (ix86_fold_builtin): Fold shift builtins by scalar count.
23031 (ix86_gimple_fold_builtin): Likewise.
23032
23033 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
23034 _mm512_setzero): New intrinsics.
23035
23036 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
23037 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23038
23039 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
23040 code generation for cases where splatting a value is not useful.
23041 * simplify-rtx.c (simplify_ternary_operation): Simplify
23042 vec_merge across a vec_duplicate and a paradoxical subreg forming
23043 a vector mode to a vec_concat.
23044
23045 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
23046
23047 * config.gcc: Support "goldmont-plus".
23048 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23049 "goldmont-plus".
23050 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23051 PROCESSOR_GOLDMONT_PLUS.
23052 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
23053 (processor_target_table): Add "goldmont-plus".
23054 (PTA_GOLDMONT_PLUS): Define.
23055 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
23056 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
23057 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
23058 (fold_builtin_cpu): Add "goldmont-plus".
23059 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
23060 (ix86_option_override_internal): Add "goldmont-plus".
23061 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
23062 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
23063 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
23064 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
23065
23066 2018-05-17 Richard Biener <rguenther@suse.de>
23067
23068 PR tree-optimization/85757
23069 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
23070 remove defs that only feed that PHI from further processing.
23071
23072 2018-05-16 Jim Wilson <jimw@sifive.com>
23073
23074 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
23075 asterisk to name.
23076 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
23077
23078 2018-05-16 Mark Wielaard <mark@klomp.org>
23079
23080 * dwarf2out.c (count_index_strings): New function.
23081 (output_indirect_strings): Call count_index_strings and generate
23082 header for dwarf_version >= 5.
23083
23084 2018-05-16 Mark Wielaard <mark@klomp.org>
23085
23086 * dwarf2out.c (dwarf_FORM): New function.
23087 (set_indirect_string): Use dwarf_FORM.
23088 (reset_indirect_string): Likewise.
23089 (size_of_die): Likewise.
23090 (value_format): Likewise.
23091 (output_die): Likewise.
23092 (add_skeleton_AT_string): Likewise.
23093 (output_macinfo_op): Likewise.
23094 (index_string): Likewise.
23095 (output_index_string_offset): Likewise.
23096 (output_index_string): Likewise.
23097 (count_index_strings): Likewise.
23098
23099 2018-05-16 Carl Love <cel@us.ibm.com>
23100
23101 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23102 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
23103
23104 2018-05-16 Martin Jambor <mjambor@suse.cz>
23105
23106 * ipa-prop.c (ipa_free_all_edge_args): Remove.
23107 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
23108
23109 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
23110
23111 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
23112 (fnma<mode>4): Likewise.
23113 (fms<mode>4): Likewise.
23114 (fnms<mode>4): Likewise.
23115 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
23116 (aarch64_fnma<mode>4): Likewise.
23117 (aarch64_fms<mode>4): Likewise.
23118 (aarch64_fnms<mode>4): Likewise.
23119 (aarch64_fnmadd<mode>4): Likewise.
23120
23121 2018-05-16 Jason Merrill <jason@redhat.com>
23122
23123 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
23124
23125 2018-05-16 Richard Biener <rguenther@suse.de>
23126
23127 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
23128 (dump_stmt_cost): Declare.
23129 (add_stmt_cost): Dump cost we add.
23130 (add_stmt_costs): New function.
23131 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
23132 No longer exported.
23133 (vect_analyze_stmt): Adjust prototype.
23134 (vectorizable_condition): Likewise.
23135 (vectorizable_live_operation): Likewise.
23136 (vectorizable_reduction): Likewise.
23137 (vectorizable_induction): Likewise.
23138 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
23139 cost vector to pass to vectorizable_ and record afterwards.
23140 (vect_model_reduction_cost): Take cost vector argument and adjust.
23141 (vect_model_induction_cost): Likewise.
23142 (vectorizable_reduction): Likewise.
23143 (vectorizable_induction): Likewise.
23144 (vectorizable_live_operation): Likewise.
23145 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
23146 SLP_TREE_NUMBER_OF_VEC_STMTS.
23147 (vect_analyze_slp_cost_1): Remove.
23148 (vect_analyze_slp_cost): Likewise.
23149 (vect_slp_analyze_node_operations): Take visited args and
23150 a target cost vector. Avoid processing already visited stmt sets.
23151 (vect_slp_analyze_operations): Use a local cost vector to gather
23152 costs and register those of non-discarded instances.
23153 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
23154 (vect_schedule_slp_instance): Remove copying of
23155 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
23156 zero.
23157 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
23158 adding cost. Record cost entry location.
23159 (vect_prologue_cost_for_slp_op): Function to compute cost of
23160 a constant or invariant generated for SLP vect in the prologue,
23161 split out from vect_analyze_slp_cost_1.
23162 (vect_model_simple_cost): Make static. Adjust for SLP costing.
23163 (vect_model_promotion_demotion_cost): Likewise.
23164 (vect_model_store_cost): Likewise, make static.
23165 (vect_model_load_cost): Likewise.
23166 (vectorizable_bswap): Add cost vector arg and adjust.
23167 (vectorizable_call): Likewise.
23168 (vectorizable_simd_clone_call): Likewise.
23169 (vectorizable_conversion): Likewise.
23170 (vectorizable_assignment): Likewise.
23171 (vectorizable_shift): Likewise.
23172 (vectorizable_operation): Likewise.
23173 (vectorizable_store): Likewise.
23174 (vectorizable_load): Likewise.
23175 (vectorizable_condition): Likewise.
23176 (vectorizable_comparison): Likewise.
23177 (can_vectorize_live_stmts): Likewise.
23178 (vect_analyze_stmt): Likewise.
23179 (vect_transform_stmt): Adjust calls to vectorizable_*.
23180 * tree-vectorizer.c: Include gimple-pretty-print.h.
23181 (dump_stmt_cost): New function.
23182
23183 2018-05-16 Richard Biener <rguenther@suse.de>
23184
23185 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
23186 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
23187 * tree-ssa-dse.c: Include tree-ssa-loop.h.
23188 (check_name): New callback.
23189 (dse_classify_store): Track cycles via a visited bitmap of PHI
23190 defs and simplify handling of in-loop and across loop dead stores
23191 and properly fail for loop-variant refs. Handle byte-tracking with
23192 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
23193 limiting the walk.
23194
23195 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
23196
23197 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
23198 (vect_get_mask_type_for_stmt): Likewise.
23199 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
23200 split out from...
23201 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
23202 to determine the statement's vector type and the vector type that
23203 should be used for calculating nunits. Deal with cases in which
23204 the type has to be deferred.
23205 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
23206 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
23207 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
23208 (vect_determine_vf_for_stmt): New functions, split out from...
23209 (vect_determine_vectorization_factor): ...here.
23210 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
23211 (vect_get_mask_type_for_stmt): New functions, split out from
23212 vect_determine_vectorization_factor.
23213
23214 2018-05-16 Richard Biener <rguenther@suse.de>
23215
23216 * tree-cfg.c (verify_gimple_assign_ternary): Properly
23217 verify the [VEC_]COND_EXPR embedded comparison.
23218
23219 2018-05-15 Martin Sebor <msebor@redhat.com>
23220
23221 PR tree-optimization/85753
23222 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
23223 RECORD_TYPE in addition to ARRAY_TYPE.
23224
23225 2018-05-15 Martin Sebor <msebor@redhat.com>
23226
23227 PR middle-end/85643
23228 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
23229
23230 2018-05-15 Richard Biener <rguenther@suse.de>
23231
23232 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
23233 add by_clobber_p one. Change algorithm to collect all defs
23234 representing uses we need to walk and try reducing them to
23235 a single one before failing.
23236 (dse_dom_walker::dse_optimize_stmt): Adjust.
23237
23238 2018-05-13 Mark Wielaard <mark@klomp.org>
23239
23240 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
23241 (size_of_loc_descr): Likewise.
23242 (output_loc_operands): Likewise.
23243 (output_loc_operands_raw): Likewise.
23244 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
23245 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
23246 (hash_loc_operands): Likewise.
23247 (compare_loc_operands): Likewise.
23248
23249 2018-05-14 Mark Wielaard <mark@klomp.org>
23250
23251 * dwarf2out.c (count_index_addrs): New function.
23252 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
23253
23254 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23255
23256 PR tree-optimization/83648
23257 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
23258 return value as malloc candidate.
23259
23260 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23261
23262 PR ipa/85734
23263 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
23264 param as true in call to suggest_attribute.
23265
23266 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
23267
23268 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
23269 -mreadonly-in-sdata.
23270
23271 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23272
23273 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
23274 New pattern.
23275 (aarch64_crypto_aesd_fused): Likewise.
23276
23277 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
23278
23279 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
23280 (movsi_aarch64): Likewise.
23281 (load_pairsi): Likewise.
23282 (load_pairdi): Likewise.
23283 (store_pairsi): Likewise.
23284 (store_pairdi): Likewise.
23285 (load_pairsf): Likewise.
23286 (load_pairdf): Likewise.
23287 (store_pairsf): Likewise.
23288 (store_pairdf): Likewise.
23289 (zero_extend): Likewise.
23290 (trunc): Swap alternatives.
23291 (fcvt_target): Add '?' to prefer w over r.
23292
23293 2018-05-14 Jakub Jelinek <jakub@redhat.com>
23294
23295 PR target/85756
23296 * config/i386/i386.md: Disallow non-commutative arithmetics in
23297 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
23298 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
23299 in the peephole2 before it.
23300
23301 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
23302
23303 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
23304 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
23305 (ix86_handle_option): Handle -mcldemote.
23306 * config.gcc: New header.
23307 * config/i386/cldemoteintrin.h: New file.
23308 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
23309 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23310 -mcldemote.
23311 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23312 OPTION_MASK_ISA_CLDEMOTE.
23313 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
23314 (ix86_valid_target_attribute_inner_p): Ditto.
23315 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
23316 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
23317 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
23318 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
23319 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
23320 (cldemote): New.
23321 * config/i386/i386.opt: Add -mcldemote.
23322 * config/i386/x86intrin.h: New header.
23323 * doc/invoke.texi: Add -mcldemote.
23324
23325 2018-05-14 Richard Biener <rguenther@suse.de>
23326
23327 * doc/match-and-simplify.texi: Adjust :s documentation.
23328
23329 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
23330
23331 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
23332 intended memcpy size.
23333 (REORDER_45): Likewise.
23334
23335 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
23336
23337 * sort.cc: New file.
23338 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
23339 * vec.c (qsort_chk): Use gcc_qsort.
23340 * Makefile.in (OBJS-libcommon): Add sort.o.
23341 (build/sort.o): New target. Use it...
23342 (BUILD_RTL): ... here, and...
23343 (build/gencfn-macros): ... here, and...
23344 (build/genmatch): ... here.
23345
23346 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23347 Chung-Ju Wu <jasonwucj@gmail.com>
23348
23349 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
23350 * config/nds32/nds32-graywolf.md: New file.
23351 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
23352 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
23353 pipeline.
23354 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
23355 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
23356 * config/nds32/nds32.md (pipeline_model): Add graywolf.
23357 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
23358 * config/nds32/pipelines.md: Include n15 settings.
23359
23360 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23361 Chung-Ju Wu <jasonwucj@gmail.com>
23362
23363 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
23364 * config/nds32/nds32-n13.md: New file.
23365 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
23366 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
23367 pipeline.
23368 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
23369 * config/nds32/nds32.md (pipeline_model): Add n13.
23370 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
23371 * config/nds32/pipelines.md: Include n13 settings.
23372
23373 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23374 Chung-Ju Wu <jasonwucj@gmail.com>
23375
23376 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
23377 * config/nds32/nds32-n10.md: New file.
23378 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
23379 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
23380 pipeline.
23381 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
23382 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
23383 * config/nds32/nds32.md (pipeline_model): Add n10.
23384 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
23385 * config/nds32/pipelines.md: Include n10 settings.
23386
23387 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
23388 Kito Cheng <kito.cheng@gmail.com>
23389 Chung-Ju Wu <jasonwucj@gmail.com>
23390
23391 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
23392 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23393 Add enum values for DSP extension instructions.
23394 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
23395 New constraints.
23396 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
23397 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
23398 New code iterators.
23399 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
23400 * config/nds32/nds32-dspext.md: New file for DSP implementation.
23401 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
23402 * config/nds32/nds32-intrinsic.md: Likewise.
23403 * config/nds32/nds32_intrinsic.h: Likewise.
23404 * config/nds32/nds32-md-auxiliary.c: Likewise.
23405 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
23406 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
23407 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
23408 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
23409 * config/nds32/nds32-protos.h: New declarations for DSP extension.
23410 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
23411 TYPE_DMAC in switch statement.
23412 * config/nds32/nds32.c: New checking and implementation for DSP
23413 extension instructions.
23414 * config/nds32/nds32.h: Likewise.
23415 * config/nds32/nds32.md: Likewise.
23416 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
23417 * config/nds32/predicates.md: Implement new predicates for DSP
23418 extension.
23419
23420 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23421
23422 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
23423 Reformat alternatives and attributes so it is easier to identify
23424 which constraints/attributes go with which instruction.
23425 (mov<mode>_hardfloat32, FMOVE64): Likewise.
23426 (mov<mode>_softfloat32, FMOVE64): Likewise.
23427 (mov<mode>_hardfloat64, FMOVE64): Likewise.
23428 (mov<mode>_softfloat64, FMOVE64): Likewise.
23429
23430 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
23431
23432 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23433 subsection.
23434 (Basic PowerPC Built-in Functions): The new name of the
23435 subsection previously known as "PowerPC Built-in Functions".
23436 (Basic PowerPC Built-in Functions Available on all Configurations):
23437 New subsubsection.
23438 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
23439 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
23440 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
23441 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
23442
23443 2018-05-11 Martin Jambor <mjambor@suse.cz>
23444
23445 PR ipa/85655
23446 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
23447 single const.
23448
23449 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23450
23451 PR target/85733
23452 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
23453
23454 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
23455
23456 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
23457 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
23458 (ix86_handle_option): Handle -mwaitpkg.
23459 * config.gcc: New header.
23460 * config/i386/cpuid.h (bit_WAITPKG): New bit.
23461 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
23462 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
23463 function type.
23464 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23465 OPTION_MASK_ISA_WAITPKG.
23466 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
23467 (ix86_option_override_internal): Add PTA_WAITPKG.
23468 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
23469 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
23470 IX86_BUILTIN_TPAUSE.
23471 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
23472 __builtin_ia32_umwait and __builtin_ia32_tpause.
23473 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
23474 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
23475 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
23476 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
23477 UNSPECV_TPAUSE): New.
23478 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
23479 * config/i386/i386.opt: Add -mwaitpkg.
23480 * config/i386/waitpkgintrin.h: New file.
23481 * config/i386/x86intrin.h: New header.
23482 * doc/invoke.texi: Add -mwaitpkg.
23483
23484 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23485
23486 PR target/85606
23487 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
23488 equivalent.
23489 (cortex-m0): Use armv6s-m isa.
23490 (cortex-m0plus): Likewise.
23491 (cortex-m1): Likewise.
23492 (cortex-m0.small-multiply): Likewise.
23493 (cortex-m0plus.small-multiply): Likewise.
23494 (cortex-m1.small-multiply): Likewise.
23495
23496 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
23497 Jakub Jelinek <jakub@redhat.com>
23498
23499 PR tree-optimization/85692
23500 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
23501 source permute as well.
23502
23503 2018-05-11 Martin Liska <mliska@suse.cz>
23504
23505 PR sanitizer/85556
23506 * doc/extend.texi: Document LLVM style format for no_sanitize
23507 attribute.
23508
23509 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23510
23511 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
23512 mode_supports_vsx_dform_quad to mode_supports_dq_form.
23513 (mode_supports_vsx_dform_quad): Likewise.
23514 (mode_supports_vmx_dform): Move these functions to be next to the
23515 other mode_supports functions.
23516 (mode_supports_dq_form): Likewise.
23517 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
23518 mode_supports_dq_form.
23519 (reg_offset_addressing_ok_p): Likewise.
23520 (offsettable_ok_by_alignment): Likewise.
23521 (rs6000_legitimate_offset_address_p): Likewise.
23522 (legitimate_lo_sum_address_p): Likewise.
23523 (rs6000_legitimize_address): Likewise.
23524 (rs6000_legitimize_reload_address): Likewise.
23525 (rs6000_secondary_reload_inner): Likewise.
23526 (rs6000_preferred_reload_class): Likewise.
23527 (rs6000_output_move_128bit): Likewise.
23528
23529 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23530
23531 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
23532 Generate SImode target register for null target.
23533 <case IX86_BUILTIN_XGETBV>: Ditto.
23534 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
23535 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
23536
23537 2018-05-10 Carl Love <cel@us.ibm.com>
23538
23539 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23540 dcbtt and dcbtstt if operands[2] is 0.
23541
23542 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23543
23544 PR target/85693
23545 * config/i386/sse.md (usadv64qi): New expander.
23546
23547 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
23548
23549 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
23550 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
23551 -maltivec=be support.
23552 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
23553 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
23554 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
23555 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
23556 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
23557 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
23558 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
23559 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
23560 altivec_vsumsws): Adjust.
23561 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
23562 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
23563 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
23564 support.
23565 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
23566 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
23567 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
23568 (altivec_lve<VI_char>x): Delete expand.
23569 (*altivec_lve<VI_char>x_internal): Rename to...
23570 (altivec_lve<VI_char>x): ... this.
23571 (altivec_lvxl_<mode>): Delete expand.
23572 (*altivec_lvxl_<mode>_internal): Rename to ...
23573 (altivec_lvxl_<mode>): ... this.
23574 (altivec_stvxl_<mode>): Delete expand.
23575 (*altivec_stvxl_<mode>_internal): Rename to ...
23576 (altivec_stvxl_<mode>): ... this.
23577 (altivec_stve<VI_char>x): Delete expand.
23578 (*altivec_stve<VI_char>x_internal): Rename to ...
23579 (altivec_stve<VI_char>x): ... this.
23580 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
23581 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
23582 reduc_plus_scal_<mode>): Adjust.
23583 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
23584 comment.
23585 (rs6000_cpu_cpp_builtins): Adjust.
23586 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
23587 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
23588 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
23589 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
23590 -maltivec=be support.
23591 (rs6000_split_vec_extract_var): Adjust.
23592 (rs6000_split_v4si_init): Adjust.
23593 (swap_selector_for_mode): Delete.
23594 (altivec_expand_lvx_be, altivec_expand_stvx_be,
23595 altivec_expand_stvex_be): Delete.
23596 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
23597 -maltivec=be support.
23598 (rs6000_gimple_fold_builtin): Ditto.
23599 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
23600 Adjust.
23601 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
23602 (TARGET_DIRECT_MOVE_64BIT): Adjust.
23603 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
23604 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
23605 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
23606 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
23607 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
23608 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
23609 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
23610 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
23611 anonymous split): Adjust.
23612 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
23613 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
23614
23615 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
23616
23617 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
23618 when --with-gxx-include-dir is also specified.
23619 * configure: Regenerate.
23620
23621 2018-05-09 Jim Wilson <jimw@sifive.com>
23622
23623 PR target/84797
23624 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
23625 * config/riscv/t-withmultilib: New.
23626 * config/riscv/withmultilib.h: New.
23627 * doc/install.texi: Document RISC-V --with-multilib-list support.
23628
23629 2018-05-09 Richard Biener <rguenther@suse.de>
23630
23631 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
23632 vector.
23633 (vect_bb_vectorization_profitable_p): Adjust. Compute
23634 actual scalar cost using the cost vector and the add_stmt_cost
23635 machinery.
23636
23637 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23638
23639 PR rtl-optimization/85645
23640 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
23641 in the REG_CFA_REGISTER note for LR, don't leave it empty.
23642
23643 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23644
23645 PR rtl-optimization/85645
23646 * shrink-wrap.c (spread_components): Return a boolean saying if
23647 anything was changed.
23648 (try_shrink_wrapping_separate): Iterate spread_components until
23649 nothing changes anymore.
23650
23651 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23652
23653 PR rtl-optimization/85645
23654 * regrename.c (build_def_use): Also kill the chains that include the
23655 destination of a REG_CFA_REGISTER note.
23656
23657 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23658
23659 PR rtl-optimization/85645
23660 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
23661 insn that has a REG_CFA_REGISTER note.
23662
23663 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
23664
23665 * cfgexpand.c (expand_clobber): New function.
23666 (expand_gimple_stmt_1): Use it.
23667 * tree-vect-stmts.c (vect_clobber_variable): New function,
23668 split out from...
23669 (vectorizable_simd_clone_call): ...here.
23670 (vectorizable_store): Emit a clobber either side of an
23671 IFN_STORE_LANES sequence.
23672 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
23673
23674 2018-05-09 Tom de Vries <tom@codesourcery.com>
23675
23676 PR target/85626
23677 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
23678 (define_insn "trap_if_false"): Add exit after trap.
23679
23680 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
23681
23682 PR rtl-optimization/85638
23683 * bb-reorder.c: Include common/common-target.h.
23684 (create_forwarder_block): New function extracted from...
23685 (fix_up_crossing_landing_pad): ...here. Rename into...
23686 (dw2_fix_up_crossing_landing_pad): ...this.
23687 (sjlj_fix_up_crossing_landing_pad): New function.
23688 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
23689 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
23690 from both partitions and exit the loop after one iteration.
23691
23692 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23693
23694 Revert:
23695 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23696 subsection.
23697 (Basic PowerPC Built-in Functions): The new name of the
23698 subsection previously known as "PowerPC Built-in Functions".
23699 (Basic PowerPC Built-in Functions Available on all Configurations):
23700 New subsubsection.
23701 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23702 subsubsection.
23703 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23704 subsubsection.
23705 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23706 subsubsection.
23707 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23708 subsubsection.
23709
23710 2018-05-08 Jim Wilson <jimw@sifive.com>
23711
23712 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
23713 (LD_EMUL_SUFFIX): New.
23714 (LINK_SPEC): Use it.
23715
23716 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23717
23718 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23719 subsection.
23720 (Basic PowerPC Built-in Functions): The new name of the
23721 subsection previously known as "PowerPC Built-in Functions".
23722 (Basic PowerPC Built-in Functions Available on all Configurations):
23723 New subsubsection.
23724 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23725 subsubsection.
23726 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23727 subsubsection.
23728 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23729 subsubsection.
23730 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23731 subsubsection.
23732
23733 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23734
23735 PR target/85683
23736 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
23737 after cmpelim optimization.
23738
23739 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
23740
23741 * config.gcc: Support "goldmont".
23742 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
23743 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23744 PROCESSOR_GOLDMONT.
23745 * config/i386/i386.c (m_GOLDMONT): Define.
23746 (processor_target_table): Add "goldmont".
23747 (PTA_GOLDMONT): Define.
23748 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
23749 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
23750 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
23751 (fold_builtin_cpu): Add "goldmont".
23752 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
23753 (ix86_option_override_internal): Add "goldmont".
23754 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
23755 (processor_type): Add PROCESSOR_GOLDMONT.
23756 * config/i386/i386.md: Add CPU "glm".
23757 * config/i386/glm.md: New file.
23758 * config/i386/x86-tune.def: Add m_GOLDMONT.
23759 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
23760
23761 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23762
23763 PR target/85572
23764 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
23765 E_V4DImode.
23766 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
23767 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
23768 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
23769
23770 PR target/85317
23771 * config/i386/i386.c (ix86_fold_builtin): Handle
23772 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
23773
23774 PR target/85480
23775 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
23776 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
23777
23778 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
23779
23780 PR target/85658
23781 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
23782 (check_arch): Likewise.
23783 (check_fpu): Return the result rather than printing it.
23784 (end arch): Fix operator precedence.
23785 (end cpu): Likewise.
23786 (END): Print the result from check_fpu.
23787
23788 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23789 Alan Hayward <alan.hayward@arm.com>
23790 David Sherwood <david.sherwood@arm.com>
23791
23792 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
23793 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
23794 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
23795 (*fcmuo<mode>_and): New patterns.
23796
23797 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23798
23799 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
23800 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
23801 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
23802 (cmp_op, sve_imm_con): New code attributes.
23803 (SVE_COND_INT_CMP, imm_con): Delete.
23804 (cmp_op): Remove above unspecs from int attribute.
23805 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
23806 to...
23807 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
23808 comparison-specific unspecs.
23809 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
23810 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
23811 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
23812 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
23813 (*vec_fcm<cmp_op><mode>): Rename to...
23814 (*fcm<cmp_op><mode>): ...this and adjust likewise.
23815 (*vec_fcmuo<mode>): Rename to...
23816 (*fcmuo<mode>): ...this and adjust likewise.
23817 (*pred_fcm<cmp_op><mode>): New pattern.
23818 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
23819 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
23820 functions.
23821 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
23822 and UNORDERED.
23823 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
23824 (aarch64_emit_sve_predicated_cond): New function.
23825 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
23826 (aarch64_emit_unspec_cond_or): Replace with...
23827 (aarch64_emit_sve_or_conds): ...this new function. Use
23828 aarch64_emit_sve_ptrue_op for the individual comparisons and
23829 aarch64_emit_binop to OR them together.
23830 (aarch64_emit_inverted_unspec_cond): Replace with...
23831 (aarch64_emit_sve_inverted_cond): ...this new function. Use
23832 aarch64_emit_sve_ptrue_op for the comparison and
23833 aarch64_emit_unop to invert the result.
23834 (aarch64_expand_sve_vec_cmp_float): Update after the above
23835 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
23836
23837 2018-05-07 Nathan Sidwell <nathan@acm.org>
23838
23839 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
23840 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
23841 (Backwards Compatibility): Likewise.
23842
23843 2018-05-07 Luis Machado <luis.machado@linaro.org>
23844
23845 PR bootstrap/85681
23846 Revert:
23847 2018-05-07 Luis Machado <luis.machado@linaro.org>
23848
23849 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23850 <prefetch_dynamic_strides>: New const bool field.
23851 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23852 prefetch_dynamic_strides.
23853 (exynosm1_prefetch_tune): Likewise.
23854 (thunderxt88_prefetch_tune): Likewise.
23855 (thunderx_prefetch_tune): Likewise.
23856 (thunderx2t99_prefetch_tune): Likewise.
23857 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
23858 to false.
23859 (aarch64_override_options_internal): Update to set
23860 PARAM_PREFETCH_DYNAMIC_STRIDES.
23861 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
23862 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
23863 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
23864 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
23865 prefetch-dynamic-strides setting.
23866
23867 2018-05-07 Luis Machado <luis.machado@linaro.org>
23868
23869 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23870 <minimum_stride>: New const int field.
23871 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23872 minimum_stride field.
23873 (exynosm1_prefetch_tune): Likewise.
23874 (thunderxt88_prefetch_tune): Likewise.
23875 (thunderx_prefetch_tune): Likewise.
23876 (thunderx2t99_prefetch_tune): Likewise.
23877 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
23878 (aarch64_override_options_internal): Update to set
23879 PARAM_PREFETCH_MINIMUM_STRIDE.
23880 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
23881 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
23882 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
23883 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
23884 stride is constant and is below the minimum stride threshold.
23885
23886 2018-05-07 Luis Machado <luis.machado@linaro.org>
23887
23888 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
23889 to 512.
23890
23891 2018-05-07 Luis Machado <luis.machado@linaro.org>
23892
23893 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23894 <prefetch_dynamic_strides>: New const bool field.
23895 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23896 prefetch_dynamic_strides.
23897 (exynosm1_prefetch_tune): Likewise.
23898 (thunderxt88_prefetch_tune): Likewise.
23899 (thunderx_prefetch_tune): Likewise.
23900 (thunderx2t99_prefetch_tune): Likewise.
23901 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
23902 to false.
23903 (aarch64_override_options_internal): Update to set
23904 PARAM_PREFETCH_DYNAMIC_STRIDES.
23905 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
23906 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
23907 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
23908 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
23909 prefetch-dynamic-strides setting.
23910
23911 2018-05-07 Luis Machado <luis.machado@linaro.org>
23912
23913 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23914 <minimum_stride>: New const int field.
23915 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23916 minimum_stride field.
23917 (exynosm1_prefetch_tune): Likewise.
23918 (thunderxt88_prefetch_tune): Likewise.
23919 (thunderx_prefetch_tune): Likewise.
23920 (thunderx2t99_prefetch_tune): Likewise.
23921 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
23922 (aarch64_override_options_internal): Update to set
23923 PARAM_PREFETCH_MINIMUM_STRIDE.
23924 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
23925 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
23926 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
23927 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
23928 stride is constant and is below the minimum stride threshold.
23929
23930 2018-05-06 Jakub Jelinek <jakub@redhat.com>
23931
23932 PR c++/85659
23933 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
23934 the type is addressable. Don't force op into register if it has
23935 BLKmode.
23936
23937 2018-05-05 Roland McGrath <mcgrathr@google.com>
23938
23939 PR other/77609
23940 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
23941 any section for which we don't know a specific type it should have,
23942 regardless of name. Previously this was done only for the exact
23943 names ".init_array", ".fini_array", and ".preinit_array".
23944 (default_elf_asm_named_section): Add comment about
23945 relationship with default_section_type_flags and SECTION_NOTYPE.
23946 (get_section): Don't consider it a type conflict if one side has
23947 SECTION_NOTYPE and the other doesn't, as long as neither has the
23948 SECTION_BSS et al used in the default_section_type_flags logic.
23949
23950 2018-05-05 Tom de Vries <tom@codesourcery.com>
23951
23952 PR target/85653
23953 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
23954 (workaround_barsyncs): New function.
23955 (nvptx_reorg): Use workaround_barsyncs.
23956 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23957 (define_expand "nvptx_membar_cta"): New define_expand.
23958 (define_insn "*nvptx_membar_cta"): New insn.
23959
23960 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
23961
23962 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
23963 To improve optimization opportunities.
23964 * builtin-types.def: The new needed builtin types for the above.
23965
23966 2018-05-04 Richard Biener <rguenther@suse.de>
23967
23968 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
23969 * gimple-ssa-store-merging.c
23970 (imm_store_chain_info::output_merged_store): Remove redundant create,
23971 release split_store vector contents on failure.
23972 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
23973 scalar stmt vector on cache hit.
23974
23975 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
23976
23977 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
23978 Xilinx FP support.
23979 * config.gcc (powerpc-xilinx-eabi*): Remove.
23980 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
23981 support.
23982 (fusion_addis_mem_combo_load): Ditto.
23983 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
23984 FP support.
23985 (rs6000_cpu_cpp_builtins): Ditto.
23986 * config/rs6000/rs6000-linux.c
23987 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
23988 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
23989 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
23990 support.
23991 (rs6000_setup_reg_addr_masks): Ditto.
23992 (rs6000_init_hard_regno_mode_ok): Ditto.
23993 (rs6000_option_override_internal): Ditto.
23994 (legitimate_lo_sum_address_p): Ditto.
23995 (rs6000_legitimize_address): Ditto.
23996 (rs6000_legitimize_reload_address): Ditto.
23997 (rs6000_legitimate_address_p): Ditto.
23998 (abi_v4_pass_in_fpr): Ditto.
23999 (setup_incoming_varargs): Ditto.
24000 (rs6000_gimplify_va_arg): Ditto.
24001 (rs6000_split_multireg_move): Ditto.
24002 (rs6000_savres_strategy): Ditto.
24003 (rs6000_emit_prologue_components): Ditto.
24004 (rs6000_emit_epilogue_components): Ditto.
24005 (rs6000_emit_prologue): Ditto.
24006 (rs6000_emit_epilogue): Ditto.
24007 (rs6000_elf_file_end): Ditto.
24008 (rs6000_function_value): Ditto.
24009 (rs6000_libcall_value): Ditto.
24010 * config/rs6000/rs6000.h: Ditto.
24011 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
24012 (TARGET_MINMAX): ... this. New.
24013 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
24014 * config/rs6000/rs6000.md: Remove Xilinx FP support.
24015 (*movsi_internal1_single): Delete.
24016 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
24017 mfpu=, mxilinx-fpu): Delete.
24018 * config/rs6000/singlefp.h: Delete.
24019 * config/rs6000/sysv4.h: Remove Xilinx FP support.
24020 * config/rs6000/t-rs6000: Ditto.
24021 * config/rs6000/t-xilinx: Delete.
24022 * config/rs6000/titan.md: Adjust for fp_type removal.
24023 * config/rs6000/vsx.md: Remove Xilinx FP support.
24024 (VStype_simple): Delete.
24025 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
24026 * config/rs6000/xfpu.h: Delete.
24027 * config/rs6000/xfpu.md: Delete.
24028 * config/rs6000/xilinx.h: Delete.
24029 * config/rs6000/xilinx.opt: Delete.
24030 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
24031 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
24032
24033 2018-05-04 Tom de Vries <tom@codesourcery.com>
24034
24035 PR libgomp/85639
24036 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
24037 if ignore == 0.
24038
24039 2018-05-04 Richard Biener <rguenther@suse.de>
24040
24041 PR middle-end/85627
24042 * tree-complex.c (update_complex_assignment): We are always in SSA form.
24043 (expand_complex_div_wide): Likewise.
24044 (expand_complex_operations_1): Likewise.
24045 (expand_complex_libcall): Preserve EH info of the original stmt.
24046 (tree_lower_complex): Handle removed blocks.
24047 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
24048 on complex multiplication and division libcall builtins.
24049
24050 2018-05-04 Richard Biener <rguenther@suse.de>
24051
24052 PR middle-end/85574
24053 * fold-const.c (negate_expr_p): Restrict negation of operand
24054 zero of a division to when we know that can happen without
24055 overflow.
24056 (fold_negate_expr_1): Likewise.
24057
24058 2018-05-04 Jakub Jelinek <jakub@redhat.com>
24059
24060 PR libstdc++/85466
24061 * real.h (real_nextafter): Declare.
24062 * real.c (real_nextafter): New function.
24063 * fold-const-call.c (fold_const_nextafter): New function.
24064 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
24065 CASE_CFN_NEXTTOWARD.
24066 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
24067 even when arg1_mode is different from arg0_mode.
24068
24069 2018-05-03 Nathan Sidwell <nathan@acm.org>
24070
24071 * doc/extend.texi (Deprecated Features): Remove
24072 -ffriend-injection.
24073 (Backwards Compatibility): Likewise.
24074 * doc/invoke.texi (C++ Language Options): Likewise.
24075 (C++ Dialect Options): Likewise.
24076
24077 2018-05-03 Jakub Jelinek <jakub@redhat.com>
24078
24079 PR target/85530
24080 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
24081 _mm512_mask_mullox_epi64): New intrinsics.
24082
24083 2018-05-03 Tom de Vries <tom@codesourcery.com>
24084
24085 PR testsuite/85106
24086 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24087 dump files): Add offload-tree.
24088
24089 2018-05-03 Richard Biener <rguenther@suse.de>
24090
24091 PR tree-optimization/85615
24092 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
24093 to loops not nested in BBs loop father to avoid creating multi-entry
24094 loops.
24095
24096 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24097
24098 PR tree-optimization/70291
24099 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
24100 arguments. Change return type to tree. Emit libcall as a new
24101 statement rather than replacing existing one when inplace_p is true.
24102 (expand_complex_multiplication_components): New function.
24103 (expand_complex_multiplication): Expand floating-point complex
24104 multiplication using the above.
24105 (expand_complex_division): Rename inner_type parameter to type.
24106 Update expand_complex_libcall call-site.
24107 (expand_complex_operations_1): Update expand_complex_multiplication
24108 and expand_complex_division call-sites.
24109
24110 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24111
24112 PR target/85582
24113 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24114 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24115 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
24116 the highest significant bit of the shift count mask is clear. In
24117 check whether and[sq]i3 is needed verify that all significant bits
24118 of the shift count other than the highest are set.
24119
24120 2018-05-02 Tom de Vries <tom@codesourcery.com>
24121
24122 PR libgomp/82428
24123 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
24124 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
24125 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
24126 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
24127 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
24128 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
24129 __builtin_goacc_parlevel_size.
24130
24131 2018-05-02 Richard Biener <rguenther@suse.de>
24132
24133 PR tree-optimization/85597
24134 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
24135 do not use split vect_get_vec_defs call but call vect_get_slp_defs
24136 directly.
24137
24138 2018-05-02 Tom de Vries <tom@codesourcery.com>
24139
24140 PR testsuite/85106
24141 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24142 dump files): Add ltrans-tree.
24143
24144 2018-05-02 Tom de Vries <tom@codesourcery.com>
24145
24146 PR testsuite/85106
24147 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24148 dump files): Add wpa-ipa.
24149
24150 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
24151
24152 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
24153 powerpc*-*-linux*paired* target.
24154 * config/rs6000/750cl.h: Delete.
24155 * config/rs6000/paired.h: Delete.
24156 * config/rs6000/paired.md: Delete.
24157 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
24158 float support.
24159 * config/rs6000/rs6000-builtin.def: Remove paired float support.
24160 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
24161 comment. Remove paired float support.
24162 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
24163 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
24164 VECTOR_PAIRED.
24165 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
24166 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
24167 declarations.
24168 * config/rs6000/rs6000.c: Remove paired float support.
24169 (paired_expand_vector_init, paired_expand_vector_move,
24170 paired_emit_vector_compare, paired_emit_vector_cond_expr,
24171 (paired_expand_lv_builtin, paired_expand_stv_builtin,
24172 paired_expand_builtin, paired_expand_predicate_builtin,
24173 paired_init_builtins): Delete.
24174 * config/rs6000/rs6000.h: Remove paired float support.
24175 * config/rs6000/rs6000.md: Remove paired float support.
24176 (move_from_CR_ov_bit): Delete.
24177 * config/rs6000/rs6000.opt (mpaired): Delete.
24178 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
24179 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
24180
24181 2018-05-02 Richard Biener <rguenther@suse.de>
24182
24183 PR middle-end/85567
24184 * gimplify.c (gimplify_save_expr): When in SSA form allow
24185 SAVE_EXPRs to compute to SSA vars.
24186
24187 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24188
24189 PR target/85582
24190 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24191 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24192 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
24193 clobber operands[2], instead use a new pseudo. Formatting fixes.
24194
24195 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
24196
24197 PR tree-optimization/85586
24198 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
24199 exit early for statements in the same group if the accesses are
24200 not strided.
24201
24202 2018-05-02 Tom de Vries <tom@codesourcery.com>
24203
24204 PR lto/85451
24205 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
24206 error message.
24207
24208 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
24209
24210 PR tree-optimization/85143
24211 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
24212
24213 2018-05-01 Tom de Vries <tom@codesourcery.com>
24214
24215 PR lto/85451
24216 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
24217 not found" error message.
24218
24219 2018-05-01 Tom de Vries <tom@codesourcery.com>
24220
24221 PR other/83786
24222 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
24223 * vec.c (test_ordered_remove_if): New function.
24224 (vec_c_tests): Call test_ordered_remove_if.
24225 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
24226 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
24227 * tree-vect-patterns.c (vect_pattern_recog_1): Use
24228 VEC_ORDERED_REMOVE_IF.
24229
24230 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24231
24232 PR tree-optimization/82665
24233 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
24234 pointer subtraction where arguments come from a memchr call.
24235
24236 2018-05-01 Jakub Jelinek <jakub@redhat.com>
24237
24238 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
24239 --push-state --as-needed and --pop-state instead of --as-needed and
24240 --no-as-needed if ld supports it.
24241 * configure: Regenerated.
24242
24243 PR web/85578
24244 * doc/install.texi2html: Replace _002d with - and _002a with * in
24245 generated html files using sed.
24246
24247 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24248
24249 PR c++/85523
24250 * gcc-rich-location.c (blank_line_before_p): New function.
24251 (use_new_line): New function.
24252 (gcc_rich_location::add_fixit_insert_formatted): New function.
24253 * gcc-rich-location.h
24254 (gcc_rich_location::add_fixit_insert_formatted): New function.
24255
24256 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24257
24258 * selftest.c (assert_streq): Rename "expected" and "actual" to
24259 "val1" and "val2". Extend NULL-handling to cover both inputs
24260 symmetrically, while still requiring both to be non-NULL for a pass.
24261 * selftest.h (assert_streq): Rename "expected" and "actual" to
24262 "val1" and "val2".
24263 (ASSERT_EQ): Likewise.
24264 (ASSERT_EQ_AT): Likewise.
24265 (ASSERT_KNOWN_EQ): Likewise.
24266 (ASSERT_KNOWN_EQ_AT): Likewise.
24267 (ASSERT_NE): Likewise.
24268 (ASSERT_MAYBE_NE): Likewise.
24269 (ASSERT_MAYBE_NE_AT): Likewise.
24270 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
24271 the assertion to pass.
24272 (ASSERT_STREQ_AT): Likewise.
24273
24274 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24275
24276 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
24277 interaction with -pie.
24278
24279 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24280
24281 * selftest.h: Fix alphabetization of per-source-file selftest
24282 declarations.
24283
24284 2018-04-30 Jason Merrill <jason@redhat.com>
24285
24286 PR c++/61982 - dead stores to destroyed objects.
24287 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
24288 of clobber.
24289
24290 2018-04-30 Jason Merrill <jason@redhat.com>
24291
24292 * tree.c (build_clobber): New.
24293 * tree.h: Declare it.
24294 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
24295
24296 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24297
24298 * diagnostic-show-locus.c (layout::layout): Update for
24299 location_get_source_line returning a char_span.
24300 (struct char_span): Move to input.h.
24301 (struct correction): Update for fields in char_span becoming
24302 private.
24303 (struct source_line): Update for location_get_source_line
24304 returning a char_span.
24305 (layout::print_line): Likewise.
24306 * edit-context.c (edited_file::print_content): Likewise.
24307 (edited_file::print_diff_hunk): Likewise.
24308 (edited_file::print_run_of_changed_lines): Likewise.
24309 (edited_file::get_num_lines): Likewise.
24310 (edited_line::edited_line): Likewise.
24311 * final.c (asm_show_source): Likewise.
24312 * input.c (location_get_source_line): Convert return type
24313 from const char * to char_span, losing the final "line_len"
24314 param.
24315 (dump_location_info): Update for the above.
24316 (get_substring_ranges_for_loc): Likewise. Use a char_span
24317 when handling the literal within the line.
24318 (test_reading_source_line): Update for location_get_source_line
24319 returning a char_span.
24320 * input.h (class char_span): Move here from
24321 diagnostic-show-locus.c, converting from a struct to a class.
24322 Make data members private.
24323 (char_span::operator bool): New.
24324 (char_span::length): New.
24325 (char_span::get_buffer): New.
24326 (char_span::operator[]): New.
24327 (char_span::subspan): Make const.
24328 (char_span::xstrdup): New.
24329 (location_get_source_line): Convert return type from const char *
24330 to char_span, losing the final "line_size" param.
24331
24332 2018-04-30 Jan Hubicka <jh@suse.cz>
24333
24334 * lto-wrapper.c (ltrans_priorities): New static var.
24335 (cmp_priority): New.
24336 (run_gcc): Read priorities and if doing parallel build order
24337 the Makefile by them.
24338
24339 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24340
24341 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
24342
24343 2018-04-30 Richard Biener <rguenther@suse.de>
24344
24345 * tree-cfg.c (verify_address): Remove base argument, add
24346 flag whether to check TREE_ADDRESSABLE and do that.
24347 (verify_expr): Remove.
24348 (verify_types_in_gimple_reference): Add pieces from verify_expr.
24349 (verify_gimple_assign_single): Likewise.
24350 (verify_gimple_switch): Likewise.
24351 (verify_expr_location_1): Dereference tp once. Add (disabled)
24352 piece from verify_expr.
24353 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
24354
24355 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24356
24357 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
24358
24359 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24360
24361 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
24362 (small_data_pattern): Likewise.
24363 (arc_rewrite_small_data): Likewise.
24364 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
24365 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
24366 (get_symbol_alignment): New function.
24367 (legitimate_small_data_address_p): Likewise.
24368 (legitimate_scaled_address): Update, call
24369 legitimate_small_data_address_p.
24370 (output_sdata): New static variable.
24371 (arc_print_operand): Update how we handle small data operands.
24372 (arc_print_operand_address): Likewise.
24373 (arc_legitimate_address_p): Update, use
24374 legitimate_small_data_address_p.
24375 (arc_rewrite_small_data_p): Remove.
24376 (arc_rewrite_small_data_1): Likewise.
24377 (arc_rewrite_small_data): Likewise.
24378 (small_data_pattern): Likewise.
24379 (compact_sda_memory_operand): Update to use
24380 legitimate_small_data_address_p and get_symbol_alignment.
24381 (prepare_move_operands): Don't rewite sdata pattern.
24382 (prepare_extend_operands): Remove.
24383 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
24384 pattern.
24385 (zero_extendqisi2): Likewise.
24386 (zero_extendhisi2): Likewise.
24387 (extendqihi2): Likewise.
24388 (extendqisi2): Likewise.
24389 (extendhisi2): Likewise.
24390 (addsi3): Likewise.
24391 (subsi3): Likewise.
24392 (andsi3): Likewise.
24393 * config/arc/constraints.md (Usd): Change it to memory constraint.
24394
24395 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24396
24397 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
24398 as source of std instructions.
24399 * config/arc/arc.md (movsi_insn): Update pattern predicate to
24400 allow 6-bit constants as source for store instructions.
24401 (movdi_insn): Update instruction pattern to allow 6-bit constants
24402 as source for store instructions.
24403
24404 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24405
24406 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
24407
24408 2018-04-30 Nathan Sidwell <nathan@acm.org>
24409 Sandra Loosemore <sandra@codesourcery.com>
24410
24411 * dumpfile.c (dump_open): Allow '-' for stdout.
24412 * doc/invoke.texi (Developer Options): Document dump filename
24413 determination early. Document stdin/stdout selection.
24414
24415 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
24416
24417 Microblaze Target: PIC data text relative
24418
24419 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
24420 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
24421 Add declaration.
24422 * config/microblaze/microblaze.h (microblaze_constant_address_p):
24423 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
24424 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
24425 New addressing mode for data-text relative position indepenedent code.
24426 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
24427 'ADDRESS_SYMBOLIC_TXT_REL'.
24428 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
24429 (microblaze_legitimate_pic_operand): Exclude function calls from
24430 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
24431 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
24432 addresses cases.
24433 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24434 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24435 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
24436 for 'address + offset'.
24437 (microblaze_expand_prologue): Add new function prologue call for
24438 'r20' assignation.
24439 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
24440 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
24441 table in case of TARGET_PIC_DATA_TEXT_REL.
24442 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
24443 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
24444 Add new macros 'UNSPEC_TEXT',
24445 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
24446 + exclude function calls from 'UNSPEC_PLT' in case of data text
24447 relative mode.
24448 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24449 new target hook for generating address diff vector tables in case of
24450 flag_pic.
24451 * doc/tm.texi : Regenerate.
24452 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
24453 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
24454 of addr diff vector generation.
24455 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24456 target hook definition.
24457 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
24458 Add default function for generate_pic_addr_diff_vec -> flag_pic.
24459 * doc/invoke.texi (Add new pic option): Add new microblaze pic
24460 option for data text relative.
24461
24462 2018-04-30 Richard Biener <rguenther@suse.de>
24463
24464 * tree-chrec.h (evolution_function_is_constant_p): Remove
24465 redundant check.
24466 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
24467
24468 2018-04-30 Richard Biener <rguenther@suse.de>
24469
24470 PR bootstrap/85571
24471 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
24472
24473 2018-04-30 Richard Biener <rguenther@suse.de>
24474
24475 PR tree-optimization/28364
24476 PR tree-optimization/85275
24477 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
24478 copying first exit test.
24479
24480 2018-04-28 Mark Wielaard <mark@klomp.org>
24481
24482 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
24483 dwarf_version >= 5.
24484 (dwarf_AT): Handle DW_AT_addr_base.
24485 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
24486
24487 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
24488
24489 PR target/84431
24490 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
24491 (*ashl<dwi>3_doubleword_mask_1): Ditto.
24492 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
24493 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
24494
24495 2018-04-28 Richard Biener <rguenther@suse.de>
24496
24497 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
24498 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
24499 to reflect use. Only add interesting stmts.
24500
24501 2018-04-27 Martin Jambor <mjambor@suse.cz>
24502
24503 PR ipa/85549
24504 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
24505 the jump function allows for passing through aggregate values.
24506
24507 2018-04-27 David Malcolm <dmalcolm@redhat.com>
24508
24509 * input.h (in_system_header_at): Convert from macro to inline
24510 function.
24511 (from_macro_expansion_at): Likewise.
24512 (from_macro_definition_at): Likewise.
24513
24514 2018-04-27 Jeff Law <law@redhat.com>
24515
24516 * config.gcc: Mark tile* targets as deprecated/obsolete.
24517
24518 2018-04-27 Richard Biener <rguenther@suse.de>
24519
24520 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
24521 fix for ILP32.
24522
24523 2018-04-27 Richard Biener <rguenther@suse.de>
24524
24525 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
24526
24527 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
24528
24529 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
24530 with Yd constraint. Set "preferred_for_speed" attribute from
24531 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
24532 with Yd constraint.
24533 (*movdi_internal): Ditto.
24534 (movti_interunit splitters): Remove
24535 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
24536 (movdi_interunit splitters): Ditto.
24537 * config/i386/constraints.md (Ye): Remove.
24538 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
24539
24540 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24541
24542 PR target/85512
24543 * config/aarch64/constraints.md (Usg): Limit to 31.
24544 (Usj): Limit to 63.
24545
24546 2018-04-27 Jakub Jelinek <jakub@redhat.com>
24547
24548 PR tree-optimization/85529
24549 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
24550 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
24551 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
24552 zero extension or masking of the MSB bit.
24553 (optimize_range_tests): Add FIRST_BB argument, pass it through
24554 to optimize_range_tests_var_bound.
24555 (maybe_optimize_range_tests, reassociate_bb): Adjust
24556 optimize_range_tests callers.
24557
24558 2018-04-26 Richard Biener <rguenther@suse.de>
24559 Jakub Jelinek <jakub@redhat.com>
24560
24561 * cgraph.h (symbol_table): Just declare debug method here.
24562 * symtab.c (symbol_table::debug): Define.
24563
24564 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
24565
24566 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
24567
24568 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
24569
24570 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
24571 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
24572 (*movdi_internal): Substitute Yi and Yj constraint with x
24573 and Ym and Yn constraint with y constraint. Update "isa"
24574 attribute and set "preferred_for_speed" attribute from
24575 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
24576 (*movsi_internal): Ditto.
24577 (*movdf_internal): Ditto.
24578 (*movsf_internal): Ditto.
24579 (*zero_extendsidi2): Ditto.
24580 * config/i386/sse.md (vec_set<mode>_0): Ditto.
24581 (sse2_loadld): Ditto.
24582 (*vec_extract<ssevecmodelower>_0): Ditto.
24583 (*vec_extractv4si_0_zext_sse4): Ditto.
24584 (vec_concatv2di): Ditto.
24585 (*vec_dup<mode>): Ditto.
24586 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
24587 * config/i386/constraints.md (Yi): Remove.
24588 (Yj): Remove.
24589 (Ym): Remove.
24590 (Yn): Remove.
24591
24592 2018-04-26 Nathan Sidwell <nathan@acm.org>
24593
24594 * dumpfile.c (dump_open): New.
24595 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
24596 (dump_finish): Detect stdio/stderr by value not name.
24597
24598 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
24599
24600 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
24601
24602 2018-04-26 Tom de Vries <tom@codesourcery.com>
24603
24604 PR target/84952
24605 * config/nvptx/nvptx.c (verify_neutering_jumps)
24606 (verify_neutering_labels): New function
24607 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
24608
24609 2018-04-26 Tom de Vries <tom@codesourcery.com>
24610
24611 PR target/84025
24612 * config/nvptx/nvptx.c (needs_neutering_p): New function.
24613 (nvptx_single): Use needs_neutering_p to skip over insns that do not
24614 need neutering.
24615
24616 2018-04-26 Richard Biener <rguenther@suse.de>
24617 Tom de Vries <tom@codesourcery.com>
24618
24619 PR lto/85422
24620 * lto-streamer-out.c (output_function): Fixup loops if required to match
24621 discovery done in the reader.
24622
24623 2018-04-26 Richard Biener <rguenther@suse.de>
24624
24625 PR tree-optimization/85116
24626 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
24627 have a loop exit from the single latch predecessor. Remove
24628 case of header with just condition.
24629 (ch_base::copy_headers): Exclude infinite loops from any
24630 processing.
24631 (pass_ch::execute): Record exits.
24632
24633 2018-04-26 Richard Biener <rguenther@suse.de>
24634
24635 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
24636 prologue cost vector and pass it to vect_get_load_cost.
24637 (vect_get_peeling_costs_all_drs): Likewise.
24638 (vect_peeling_hash_get_lowest_cost): Likewise.
24639 (vect_enhance_data_refs_alignment): Likewise.
24640
24641 2018-04-26 Richard Biener <rguenther@suse.de>
24642
24643 PR middle-end/85450
24644 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
24645 checking of integer<->pointer conversions.
24646 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
24647 sign-/zero-extending pointer types.
24648 (expand_omp_for_static_chunk): Likewise.
24649
24650 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
24651 Jean Lee <xiaoyur347@gmail.com>
24652
24653 * config/mips/mips.c (mips_asan_shadow_offset): New function.
24654 (TARGET_ASAN_SHADOW_OFFSET): Define.
24655 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
24656 true for -fsanitize=address.
24657
24658 2018-04-25 Mark Wielaard <mark@klomp.org>
24659
24660 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
24661 shorter ones.
24662
24663 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24664
24665 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
24666 than "alu", remove explicit "memory" and "imm_disp" attributes.
24667 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
24668
24669 PR middle-end/85414
24670 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
24671 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
24672 gen_lowpart_no_emit.
24673
24674 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
24675
24676 PR target/85473
24677 * config/i386/i386.c (ix86_expand_builtin): Change memory
24678 operand to XI, extend p0 to Pmode.
24679 * config/i386/i386.md: Change unspec volatile and operand
24680 1 mode to XI, change operand 0 mode to P.
24681
24682 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24683
24684 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
24685 GET_MODE_MASK before any checking.
24686 (nds32_can_use_bset_p): Likewise.
24687 (nds32_can_use_btgl_p): Likewise.
24688
24689 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24690
24691 * config/nds32/nds32-doubleword.md: New define_split pattern for
24692 illegal register number.
24693
24694 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24695
24696 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
24697
24698 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24699
24700 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
24701
24702 2018-04-25 Richard Biener <rguenther@suse.de>
24703
24704 * lto-streamer.h (LTO_major_version): Bump to 8.
24705
24706 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24707
24708 * BASE-VER: Set to 9.0.0.
24709
24710 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
24711
24712 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
24713 in __abskf2 and __powikf2.
24714
24715 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24716
24717 PR target/85512
24718 * config/aarch64/constraints.md (Usg, Usj): New constraints.
24719 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
24720 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
24721 Use the above on operand 2. Reindent.
24722 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
24723
24724 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24725
24726 PR target/85485
24727 * common/config/i386/i386-common.c (ix86_handle_option): Don't
24728 handle OPT_mcet.
24729 * config/i386/i386.opt (mcet): Removed.
24730 * doc/install.texi: Remove -mcet documentation.
24731 * doc/invoke.texi: Likewise.
24732
24733 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24734
24735 PR target/85485
24736 * doc/install.texi: Remove -mcet from bootstrap-cet.
24737
24738 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24739
24740 PR target/85511
24741 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
24742 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
24743 if TARGET_64BIT.
24744
24745 PR target/85503
24746 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
24747 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
24748 containing a CONST_VECTOR.
24749
24750 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
24751
24752 * doc/install.texi: Update newlib dependency for nvptx.
24753
24754 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24755
24756 PR target/85508
24757 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
24758 instead of INTVAL when shifting x left.
24759
24760 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
24761
24762 PR tree-optimization/85478
24763 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
24764 vect_grouped_store_supported for single element vectors.
24765
24766 2018-04-24 Richard Biener <rguenther@suse.de>
24767
24768 PR target/85491
24769 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
24770 load cost increase to the case of non-constant step.
24771
24772 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24773
24774 PR target/84828
24775 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
24776 destination if any_malformed_asm.
24777
24778 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
24779
24780 PR middle-end/85496
24781 * expr.c (store_field): In the bitfield case, if the value comes from
24782 a function call and is returned in registers by means of a PARALLEL,
24783 do not change the mode of the temporary unless BLKmode and VOIDmode.
24784
24785 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
24786
24787 PR rtl-optimization/85423
24788 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
24789 dependencies to debug insns when the previous insn is non-debug.
24790
24791 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24792
24793 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
24794 enums into a single definition.
24795 (fls): Fix predicates and printing.
24796 (seti): Likewise.
24797
24798 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24799
24800 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
24801 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
24802 and short u6 immediate.
24803 (check_if_valid_sleep_operand): Remove.
24804 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
24805
24806 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24807
24808 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
24809 flag_always_save_lp condition.
24810 * config/nds32/nds32.opt (malways-save-lp): New option.
24811
24812 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24813
24814 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
24815 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
24816 * config/nds32/nds32.h
24817 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
24818 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
24819
24820 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24821
24822 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
24823 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
24824
24825 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24826 Chung-Ju Wu <jasonwucj@gmail.com>
24827
24828 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
24829 Declare.
24830 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
24831 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
24832
24833 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24834
24835 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
24836
24837 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24838
24839 * config/nds32/nds32-protos.h (nds32_data_alignment,
24840 nds32_local_alignment): Declare.
24841 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
24842 nds32_local_alignment): New functions.
24843 (TARGET_CONSTANT_ALIGNMENT): Define.
24844 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
24845
24846 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24847
24848 * config/nds32/nds32.c
24849 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
24850 (TARGET_MODES_TIEABLE_P): Likewise.
24851
24852 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24853
24854 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
24855 level Ofast and Og.
24856
24857 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
24858 Chung-Ju Wu <jasonwucj@gmail.com>
24859
24860 * config/nds32/constants.md (unspec_volatile_element): Add enum values
24861 for unaligned access.
24862 * config/nds32/nds32-intrinsic.c: Implementation of expanding
24863 unaligned access.
24864 * config/nds32/nds32-intrinsic.md: Likewise.
24865 * config/nds32/nds32_intrinsic.h: Likewise.
24866 * config/nds32/nds32.h (nds32_builtins): Likewise.
24867 * config/nds32/nds32.opt (munaligned-access): New option.
24868 * config/nds32/nds32.c (nds32_asm_file_start): Display
24869 flag_unaligned_access status.
24870
24871 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
24872
24873 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
24874 -mno-relax is present.
24875 * config/riscv/linux.h (LINK_SPEC): Ditto.
24876
24877 2018-04-20 Martin Sebor <msebor@redhat.com>
24878
24879 PR c/85365
24880 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
24881 for null pointers.
24882 (gimple_fold_builtin_stxcpy_chk): Same.
24883 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
24884
24885 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
24886
24887 PR target/85456
24888 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
24889 __powikf2 when long double is IEEE 128-bit.
24890
24891 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
24892
24893 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
24894 step to make sure stack always aligned.
24895
24896 2018-04-20 Carl Love <cel@us.ibm.com>
24897
24898 PR target/83402
24899 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
24900 size check for arg0.
24901
24902 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
24903 Tom de Vries <tom@codesourcery.com>
24904
24905 PR target/85445
24906 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
24907 Emit insns for calls too.
24908 (nvptx_find_par): Always look for worker-level predecessor insn.
24909 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
24910 calls.
24911 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
24912 (nvptx_process_pars): Propagate frames for calls.
24913
24914 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
24915
24916 PR target/85469
24917 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
24918 Removed.
24919 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
24920 (ix86_handle_option): Don't handle OPT_mibt.
24921 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
24922 __SHSTK__.
24923 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
24924 has_ibt and ibt.
24925 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
24926 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
24927 (ix86_target_macros): Define __CET__ with flag_cf_protection
24928 for -fcf-protection.
24929 * config/i386/i386.c (isa2_opts): Remove -mibt.
24930 * config/i386/i386.h (TARGET_IBT): Removed.
24931 (TARGET_IBT_P): Likewise.
24932 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
24933 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
24934 * config/i386/i386.opt (mcet): Update help message.
24935 (mshstk): Likewise.
24936 (mibt): Removed.
24937 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
24938 -mcet as an alias for -mshstk.
24939
24940 2018-04-20 Richard Biener <rguenther@suse.de>
24941
24942 PR middle-end/85475
24943 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
24944 complexity by forcing a single use of the multiply operand.
24945
24946 2018-04-20 Martin Jambor <mjambor@suse.cz>
24947
24948 ipa/85449
24949 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
24950 recursion dependency to only apply to non-clones.
24951
24952 2018-04-20 Martin Jambor <mjambor@suse.cz>
24953
24954 ipa/85447
24955 * ipa-cp.c (create_specialized_node): Check that clones of
24956 self-recursive edges exist during IPA-CP.
24957
24958 2018-04-19 Toon Moene <toon@moene.org>
24959
24960 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
24961 by -O3.
24962
24963 2018-04-19 Jakub Jelinek <jakub@redhat.com>
24964
24965 PR tree-optimization/85467
24966 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
24967 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
24968 VECTOR_CST element to type.
24969
24970 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
24971
24972 PR target/85397
24973 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
24974 * config/i386/i386.md (builtin_setjmp_setup): Removed.
24975 (builtin_longjmp): Likewise.
24976 (save_stack_nonlocal): New pattern.
24977 (restore_stack_nonlocal): Likewise.
24978
24979 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
24980
24981 PR target/85404
24982 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
24983 Replace ASM_OUTPUT_LABEL with fprintf.
24984
24985 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
24986
24987 PR target/85417
24988 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
24989 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
24990 * config/i386/i386-c.c (ix86_target_macros_internal): Also
24991 define __IBT__ and __SHSTK__ for -fcf-protection.
24992 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
24993 TARGET_IBT.
24994 (ix86_trampoline_init): Likewise.
24995 (x86_output_mi_thunk): Likewise.
24996 (ix86_notrack_prefixed_insn_p): Likewise.
24997 (ix86_option_override_internal): Don't disallow -fcf-protection.
24998 * config/i386/i386.md (rdssp<mode>): Also enable for
24999 -fcf-protection.
25000 (incssp<mode>): Likewise.
25001 (nop_endbr): Likewise.
25002 * config/i386/i386.opt (mcet): Change help message to built-in
25003 functions only.
25004 (mibt): Likewise.
25005 (mshstk): Likewise.
25006 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
25007 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
25008 enable CET built-in functions.
25009
25010 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
25011
25012 * common/config/i386/i386-common.c
25013 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
25014 OPTION_MASK_ISA_MOVDIRI_UNSET,
25015 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
25016 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
25017 * config.gcc (movdirintrin.h): New header.
25018 * config/i386/cpuid.h (bit_MOVDIRI,
25019 bit_MOVDIR64B): New bits.
25020 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
25021 and -mmvodir64b.
25022 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
25023 (VOID, PVOID, PCVOID)): New function types.
25024 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
25025 __builtin_ia32_directstoreu_u64,
25026 __builtin_ia32_movdir64b): New builtins.
25027 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
25028 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
25029 and -mmovdiri.
25030 (ix86_valid_target_attribute_inner_p): Ditto.
25031 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
25032 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
25033 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
25034 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
25035 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
25036 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
25037 (movdiri<mode>, movdir64b_<mode>): New.
25038 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
25039 * config/i386/immintrin.h: Include movdirintrin.h.
25040 * config/i386/movdirintrin.h: New file.
25041 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
25042
25043 2018-04-19 Richard Biener <rguenther@suse.de>
25044
25045 PR middle-end/85455
25046 * cfg.c (clear_bb_flags): When loop state says we have
25047 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
25048
25049 2018-04-19 Richard Biener <rguenther@suse.de>
25050
25051 PR tree-optimization/84737
25052 * tree-vect-data-refs.c (vect_copy_ref_info): New function
25053 copying restrict info.
25054 (vect_setup_realignment): Use it.
25055 * tree-vectorizer.h (vect_copy_ref_info): Declare.
25056 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
25057 the first DR to all generated stores.
25058 (vectorizable_load): Likewise for loads.
25059
25060 2018-04-19 Jakub Jelinek <jakub@redhat.com>
25061
25062 PR tree-optimization/85446
25063 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
25064 the integral and pointer types to have the same precision.
25065
25066 * doc/install.texi: Document --disable-cet being the default and
25067 --enable-cet=auto.
25068
25069 2018-04-18 Martin Liska <mliska@suse.cz>
25070
25071 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
25072 style.
25073
25074 2018-04-18 Martin Liska <mliska@suse.cz>
25075
25076 Revert
25077 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25078
25079 PR ipa/83983
25080 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25081 arguments if they are comparable.
25082
25083 2018-04-18 Martin Liska <mliska@suse.cz>
25084
25085 Revert
25086 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
25087
25088 PR lto/84805
25089 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25090 incomplete types.
25091
25092 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
25093
25094 PR target/85388
25095 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
25096 ENDBR after calling __morestack.
25097
25098 2018-04-18 David Malcolm <dmalcolm@redhat.com>
25099
25100 PR jit/85384
25101 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
25102 by using gcc_base_ver to generate a gcc_driver_version, and use
25103 it when generating GCC_DRIVER_NAME.
25104 * configure: Regenerate.
25105
25106 2018-04-18 Jakub Jelinek <jakub@redhat.com>
25107
25108 PR target/81084
25109 * config.gcc: Obsolete powerpc*-*-*spe*.
25110
25111 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25112
25113 PR debug/84637
25114 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
25115 (stabstr_D): Change type of unum from unsigned int to
25116 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
25117 type.
25118
25119 2018-04-17 Jim Wilson <jimw@sifive.com>
25120
25121 PR 84856
25122 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
25123 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
25124 Set arg_pointer_offset after using pretend_args_size.
25125
25126 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25127
25128 PR rtl-optimization/85431
25129 * dse.c (record_store): Ignore zero width stores.
25130
25131 PR sanitizer/85230
25132 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
25133 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
25134 __builtin_stack_restore rather than after it.
25135 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
25136 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
25137 argument instead of virtual_dynamic_stack_rtx.
25138
25139 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
25140
25141 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
25142 New prototype.
25143 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
25144 Add note to error message to explain internal mapping of overloaded
25145 built-in function name to non-overloaded built-in function name.
25146 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
25147 function.
25148
25149 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25150
25151 PR target/85424
25152 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
25153 where the inputs overlap with the output.
25154
25155 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25156
25157 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
25158 (=v, v) alternative and explicit "memory" attribute.
25159 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
25160 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25161 attributes.
25162 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
25163 "sselog1" type instead of "sselog".
25164 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
25165 "sselog". Remove explicit "memory" attribute.
25166 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
25167 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25168 attributes.
25169 (vec_extract_hi_v32hi): Merge all alternatives into one, use
25170 "sselog1" type instead of "sselog". Remove explicit "memory"
25171 attribute.
25172 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
25173 use "sselog1" type instead of "sselog". Remove explicit "memory"
25174 attribute.
25175 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
25176 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25177 attributes.
25178 (vec_extract_hi_v64qi): Merge all alternatives into one, use
25179 "sselog1" type instead of "sselog". Remove explicit "memory"
25180 attribute.
25181 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
25182 use "sselog1" type instead of "sselog". Remove explicit "memory"
25183 attribute.
25184
25185 PR target/85430
25186 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
25187
25188 PR middle-end/85414
25189 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
25190 on a SUBREG.
25191
25192 2018-04-17 Martin Jambor <mjambor@suse.cz>
25193
25194 PR ipa/85421
25195 * ipa-cp.c (create_specialized_node): Call
25196 expand_all_artificial_thunks if necessary.
25197
25198 2018-04-17 Martin Liska <mliska@suse.cz>
25199
25200 PR lto/85405
25201 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
25202 in message, remote space in between '_G' and '('.
25203
25204 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25205
25206 PR target/85281
25207 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
25208 avx512f_vmcmp<mode>3<round_saeonly_name>,
25209 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
25210 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
25211 avx512f_rndscale<mode><round_saeonly_name>,
25212 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
25213 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
25214 Use %<iptr>2 instead of %2 for -masm=intel.
25215 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
25216 avx512f_vcvttss2usi<round_saeonly_name>,
25217 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
25218 -masm=intel.
25219 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
25220 avx512f_vcvttsd2usi<round_saeonly_name>,
25221 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
25222 Use %q1 instead of %1 for -masm=intel.
25223 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
25224 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
25225 of %3 for -masm=intel.
25226 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
25227 -masm=intel.
25228 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
25229 -masm=intel.
25230 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
25231 -masm=intel.
25232 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
25233 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
25234 %g1.
25235 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
25236 -masm=intel.
25237 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
25238 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
25239 %g1 and one with %0 and %1.
25240 (avx512er_vmrcp28<mode><round_saeonly_name>,
25241 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
25242 %1 for -masm=intel.
25243 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
25244 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
25245 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
25246 of %0 and %{%4%} for -masm=intel.
25247 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
25248 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
25249 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
25250 order of %0 and %{%5%}%{z%} for -masm=intel.
25251
25252 2018-04-17 Jan Hubicka <jh@suse.cz>
25253
25254 PR lto/85405
25255 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
25256
25257 2018-04-17 Martin Liska <mliska@suse.cz>
25258
25259 PR ipa/85329
25260 * multiple_target.c (create_dispatcher_calls): Set apostrophes
25261 for target_clone error message. Make default implementation
25262 clone to be a local declaration.
25263 (separate_attrs): Add new argument and check for an empty
25264 string.
25265 (expand_target_clones): Handle it.
25266 (ipa_target_clone): Make redirection just for target_clones
25267 functions.
25268
25269 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
25270 Tom de Vries <tom@codesourcery.com>
25271
25272 PR middle-end/84955
25273 * omp-expand.c (expand_oacc_for): Add dummy false branch for
25274 tiled basic blocks without omp continue statements.
25275
25276 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
25277
25278 PR target/83660
25279 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
25280 vec_extract expression as having side effects to make sure it gets
25281 a cleanup point.
25282
25283 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
25284
25285 PR target/85403
25286 * config/i386/i386.c (get_builtin_code_for_version): Check
25287 error_mark_node.
25288
25289 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
25290
25291 PR target/84331
25292 * config.gcc: Support "skylake".
25293 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
25294 PROCESSOR_SKYLAKE.
25295 * config/i386/i386.c (m_SKYLAKE): Define.
25296 (processor_target_table): Add "skylake".
25297 (ix86_option_override_internal): Add "skylake".
25298 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
25299 PROCESSOR_CANNONLAKE.
25300 (get_builtin_code_for_version): Fix priority for
25301 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
25302 PROCESSOR_SKYLAKE-AVX512.
25303 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
25304 (processor_type): Add PROCESSOR_SKYLAKE.
25305
25306 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
25307 Jason Merrill <jason@redhat.com>
25308
25309 PR c++/85112
25310 * convert.c (convert_to_integer_1): Use direct recursion for
25311 enumeral types and types with a precision less than the number
25312 of bits in their mode.
25313
25314 2018-04-16 Julia Koval <julia.koval@intel.com>
25315
25316 PR target/84413
25317 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
25318 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
25319
25320 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
25321
25322 PR target/85293
25323 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
25324 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
25325 and -mno-direct-move.
25326
25327 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
25328
25329 PR target/83402
25330 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
25331 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
25332 Ensure negative shifts result in {0}.
25333
25334 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
25335
25336 PR rtl-optimization/79916
25337 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
25338 regs (if any) to define how to gnerate SD moves when LRA is in
25339 progress.
25340
25341 2018-04-13 Jakub Jelinek <jakub@redhat.com>
25342
25343 PR rtl-optimization/85393
25344 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
25345 * except.c (expand_dw2_landing_pad_for_region): Make static.
25346 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
25347 a label and unconditional jump to old_bb, rather than
25348 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
25349 basic block.
25350
25351 PR rtl-optimization/85376
25352 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
25353 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
25354 instead of a specific value.
25355
25356 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25357 Bin Cheng <bin.cheng@arm.com>
25358
25359 PR tree-optimization/82965
25360 PR tree-optimization/83991
25361 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
25362 by_profile_only parameter.
25363 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
25364 information if the loop was predicted to iterate too many times.
25365 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
25366
25367 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25368
25369 PR lto/71991
25370 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
25371 always inline.
25372
25373 2018-04-13 Martin Liska <mliska@suse.cz>
25374 Jakub Jelinek <jakub@redhat.com>
25375
25376 PR middle-end/81657
25377 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
25378 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
25379 * builtins.c (expand_builtin_memory_copy_args): Use
25380 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
25381 handle dest_addr == pc_rtx.
25382
25383 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
25384
25385 PR target/85291
25386 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
25387 asked to not generate direct moves.
25388 (fix_trunc<mode>si2_stfiwx): Similar.
25389 (fix_trunc<mode>si2_internal): Similar.
25390
25391 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25392
25393 PR debug/83157
25394 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
25395 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
25396 lookup if dest in some wider mode is known to be const0_rtx and
25397 if so, record permanent equivalence for it to be ZERO_EXTEND of
25398 the narrower mode destination.
25399
25400 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25401
25402 * lto-streamer-out.c (output_function): Revert 259346.
25403 * omp-expand.c (expand_oacc_for): Likewise.
25404
25405 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
25406
25407 PR rtl-optimization/85354
25408 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
25409 * sel-sched.c (sel_global_init): ... here.
25410
25411 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
25412
25413 PR target/85238
25414 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
25415 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
25416 mode for PE-COFF targets.
25417 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
25418 (i386_pe_asm_lto_end): Likewise.
25419 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
25420 (TARGET_ASM_LTO_END): Likewise.
25421 * config/i386/winnt.c (saved_debug_info_level): New static variable.
25422 (i386_pe_asm_lto_start): New function.
25423 (i386_pe_asm_lto_end): Likewise.
25424
25425 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25426 Richard Biener <rguenther@suse.de>
25427
25428 PR middle-end/84955
25429 * lto-streamer-out.c (output_function): Fix CFG loop state before
25430 streaming out.
25431 * omp-expand.c (expand_oacc_for): Handle calls to internal
25432 functions like regular functions.
25433
25434 2018-04-12 Richard Biener <rguenther@suse.de>
25435
25436 PR lto/85371
25437 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
25438 for the early LTO debug to properly generate references to it
25439 during DIE emission. Do not re-use that for the skeleton for
25440 split-dwarf.
25441 (dwarf2out_early_finish): Likewise.
25442
25443 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25444
25445 PR target/85328
25446 * config/i386/sse.md
25447 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
25448 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
25449 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
25450 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
25451 and output is a reg, avoid creating invalid lowpart subreg, but
25452 instead split into a 512-bit move. Don't split if not AVX512VL,
25453 input is xmm16+ reg and output is a mem.
25454 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
25455 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
25456 xmm16+ reg and output is a mem.
25457
25458 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25459
25460 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
25461 also for flag_dwarf2_cfi_asm.
25462
25463 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25464
25465 PR rtl-optimization/85342
25466 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
25467 a bool scalar var inside of the loop instead. Don't try to update
25468 recog_data.operand after failed apply_change_group.
25469
25470 2018-04-12 Tom de Vries <tom@codesourcery.com>
25471
25472 PR target/85296
25473 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
25474 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
25475 array with flexible array member as array without given dimension.
25476 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
25477 argument for undefined param to true.
25478
25479 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
25480
25481 PR target/85321
25482 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25483 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
25484 from PowerPC section.
25485 * config/rs6000/sysv4.opt (mcall-): Improve help text.
25486 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
25487 help text that is too long.
25488 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
25489 help text that is too long.
25490 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
25491 help text that is too long.
25492
25493 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
25494
25495 * config/alpha/alpha.md (stack_probe_internal): Rename
25496 from "probe_stack". Update all callers.
25497
25498 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25499
25500 PR rtl-optimization/84566
25501 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
25502 sched_macro_fuse_insns.
25503
25504 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25505
25506 PR target/84301
25507 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
25508 (compute_block_dependences): ... from here.
25509
25510 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25511
25512 PR tree-optimization/85331
25513 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
25514 from int to HOST_WIDE_INT.
25515
25516 2018-04-11 Martin Jambor <mjambor@suse.cz>
25517
25518 PR ipa/84149
25519 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
25520 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
25521 not the same as the source val.
25522 (cgraph_edge_brings_value_p): New parameter.
25523 (gather_edges_for_value): Pass destination value to
25524 cgraph_edge_brings_value_p.
25525 (perhaps_add_new_callers): Likewise.
25526 (get_info_about_necessary_edges): Likewise and exclude values brought
25527 only by self-recursive edges.
25528 (create_specialized_node): Redirect only clones of self-calling edges.
25529 (+self_recursive_pass_through_p): New function.
25530 (find_more_scalar_values_for_callers_subset): Use it.
25531 (find_aggregate_values_for_callers_subset): Likewise.
25532 (known_aggs_to_agg_replacement_list): Removed.
25533 (decide_whether_version_node): Re-calculate known constants for all
25534 remaining context clones.
25535
25536 2018-04-11 Richard Biener <rguenther@suse.de>
25537
25538 PR lto/85339
25539 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
25540 from early DWARF output.
25541 (dwarf2out_early_finish): Output line info unconditionally into
25542 early DWARF and add reference to it.
25543
25544 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25545
25546 PR target/85281
25547 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
25548 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
25549 other than V2DFmode using iptr mode attribute.
25550 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
25551
25552 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25553
25554 PR rtl-optimization/84659
25555 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
25556
25557 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25558
25559 PR debug/85302
25560 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
25561 SIZEP is NULL.
25562 (output_loc_list): Pass address of a dummy size variable even in the
25563 locview handling loop.
25564 (index_location_lists): Add comment on why skip_loc_list_entry can't
25565 call size_of_locs.
25566
25567 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
25568
25569 PR target/85261
25570 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
25571 into register.
25572
25573 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
25574
25575 PR target/85321
25576 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25577 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
25578 and -mstring-compare-inline-limit.
25579
25580 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25581
25582 PR target/85287
25583 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
25584 for stack clash protection in a register whenever we need it to be in
25585 a register.
25586
25587 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25588
25589 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
25590 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
25591
25592 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25593
25594 PR target/85321
25595 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
25596 the help text.
25597 (mlong-double-): Ditto.
25598 * config/rs6000/sysv4.opt (msdata=): Ditto.
25599 (mtls-size=): Ditto.
25600
25601 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25602
25603 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
25604 erroneous entries for
25605 "vector int vec_ldl (int, long int *)", and
25606 "vector unsigned int vec_ldl (int, unsigned long int *)".
25607 Add comments and entries for
25608 "vector bool char vec_ldl (int, bool char *)",
25609 "vector bool short vec_ldl (int, bool short *)",
25610 "vector bool int vec_ldl (int, bool int *)",
25611 "vector bool long long vec_ldl (int, bool long long *)",
25612 "vector pixel vec_ldl (int, pixel *)",
25613 "vector long long vec_ldl (int, long long *)",
25614 "vector unsigned long long vec_ldl (int, unsigned long long *)".
25615 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
25616 type tree bool_long_long_type_node and correct definition of
25617 bool_V2DI_type_node to make reference to this new type tree.
25618 (rs6000_mangle_type): Replace erroneous reference to
25619 bool_long_type_node with bool_long_long_type_node.
25620 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
25621 comments to emphasize sign distinctions for char and int types and
25622 replace RS6000_BTI_bool_long constant with
25623 RS6000_BTI_bool_long_long constant. Also add comment to restrict
25624 use of RS6000_BTI_pixel.
25625 (bool_long_type_node): Remove this macro definition.
25626 (bool_long_long_type_node): New macro definition
25627
25628 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25629
25630 PR rtl-optimization/85300
25631 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
25632 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
25633 simplify_unary_operation fails.
25634
25635 2018-04-10 Martin Liska <mliska@suse.cz>
25636
25637 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
25638 cgraph_edge and ipa_ref.
25639
25640 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25641
25642 PR target/85177
25643 PR target/85255
25644 * config/i386/sse.md
25645 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
25646 computation of the VEC_MERGE selector from mask.
25647 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
25648 Fix decoding of the VEC_MERGE selector into mask.
25649
25650 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25651
25652 PR tree-optimization/85286
25653 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
25654
25655 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25656
25657 * final.c (final_1): Set insn_last_address as well as
25658 insn_current_address.
25659
25660 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25661
25662 PR target/85173
25663 * explow.c (emit_stack_probe): Call validize_mem on memory location
25664 before passing it to gen_probe_stack. Create address operand and
25665 legitimize it for the probe_stack_address case.
25666
25667 2018-04-09 Jan Hubicka <jh@suse.cz>
25668
25669 PR lto/85078
25670 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
25671 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
25672 * tree.c (free_lang_data_in_type): Fix handling of binfos;
25673 walk basetypes.
25674 (free_lang_data): Rebuild type inheritance graph.
25675
25676 2018-04-09 Martin Sebor <msebor@redhat.com>
25677
25678 * invoke.texi (-finline-small-functions): Mention other optimization
25679 options.
25680 (-findirect-inlining, -fpartial-inlining): Same.
25681 (-finline-functions-called-once): Same.
25682 (-freorder-blocks-and-partition): Same.
25683
25684 2018-04-09 Jan Hubicka <jh@suse.cz>
25685
25686 PR rtl/84058
25687 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
25688 jumps; choose last target that matches the criteria (i.e.
25689 no partition changes for non-crossing jumps).
25690 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
25691 support for redirecting crossing jumps to non-crossing.
25692
25693 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
25694
25695 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
25696 also for naked functions.
25697
25698 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
25699
25700 * config/arc/arc.md (add_shift): New pattern.
25701 (add_shift2): Likewise.
25702 (sub_shift): Likewise.
25703 (sub_shift_cmp0_noout): Likewise.
25704 (compare_si_ashiftsi): Likewise.
25705 (xbfu_cmp0_noout): New combine pattern.
25706 (xbfu_cmp0"): Likewise.
25707 (movsi_set_cc_insn): Place the predicable variant first.
25708 (commutative_binary_cmp0_noout): Remove clobber.
25709 (commutative_binary_cmp0): New pattern.
25710 (noncommutative_binary_cmp0): Likewise.
25711 (noncommutative_binary_cmp0_noout): Likewise.
25712 (noncommutative_binary_comparison_result_used): Removed.
25713 (rsub_cmp0): New pattern.
25714 (rsub_cmp0_noout): Likewise.
25715 (extzvsi): Changed, keep only meaningful variants.
25716 (SQH, SEZ): New iterators.
25717 (SQH_postfix): New mode attribute.
25718 (SEZ_prefix): New code attribute.
25719 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
25720 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
25721 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
25722 of numerical value.
25723 (noncommutative_operator): Check the availability of barrel
25724 shifter option.
25725
25726 2018-04-09 Richard Biener <rguenther@suse.de>
25727
25728 PR tree-optimization/85284
25729 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
25730 Only use the niter constraining form of simple_iv when the exit
25731 is always executed.
25732
25733 2018-04-09 Tom de Vries <tom@codesourcery.com>
25734
25735 PR target/84041
25736 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
25737 (define_expand "*memory_barrier"): New define_expand.
25738 (define_insn "memory_barrier"): New insn.
25739
25740 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25741
25742 PR rtl-optimization/80463
25743 PR rtl-optimization/83972
25744 PR rtl-optimization/83480
25745
25746 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
25747 correct producer for the insn.
25748 (tidy_control_flow): Fixup seqnos in case of debug insns.
25749
25750 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25751
25752 PR rtl-optimization/83913
25753
25754 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
25755 different sched-times when merging exprs.
25756
25757 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25758
25759 PR rtl-optimization/83962
25760
25761 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
25762 tidy_fallthru_edge and tidy_control_flow.
25763
25764 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25765
25766 PR rtl-optimization/83530
25767
25768 * sel-sched.c (force_next_insn): New global variable.
25769 (remove_insn_for_debug): When force_next_insn is true, also leave only
25770 next insn in the ready list.
25771 (sel_sched_region): When the region wasn't scheduled, make another pass
25772 over it with force_next_insn set to 1.
25773
25774 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
25775
25776 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
25777 into tm_file.
25778 * config/nds32/constants.md (unspec_volatile_element): Add enum values
25779 for interrupt control.
25780 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
25781 functions for interrupt control.
25782 * config/nds32/nds32-intrinsic.md: Likewise.
25783 * config/nds32/nds32_intrinsic.h: Likewise.
25784 * config/nds32/nds32.h (nds32_builtins): Likewise.
25785
25786 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
25787
25788 * config/nds32/nds32.c (nds32_init_machine_status,
25789 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
25790 strict_aligned_p field.
25791 (nds32_expand_to_rtl_hook): New function.
25792 (TARGET_EXPAND_TO_RTL_HOOK): Define.
25793 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
25794
25795 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25796 Chung-Ju Wu <jasonwucj@gmail.com>
25797
25798 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
25799 * config/nds32/nds32-n7.md: New file.
25800 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
25801 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
25802 pipeline.
25803 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
25804 * config/nds32/nds32.md (pipeline_model): Add n7.
25805 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
25806 * config/nds32/pipelines.md: Include n7 settings.
25807
25808 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25809 Chung-Ju Wu <jasonwucj@gmail.com>
25810
25811 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
25812 * config/nds32/nds32-e8.md: New file.
25813 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
25814 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
25815 pipeline.
25816 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
25817 * config/nds32/nds32.md (pipeline_model): Add e8.
25818 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
25819 * config/nds32/pipelines.md: Include e8 settings.
25820
25821 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25822 Chung-Ju Wu <jasonwucj@gmail.com>
25823
25824 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
25825 * config/nds32/nds32-n8.md: New file.
25826 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
25827 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
25828 pipeline.
25829 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
25830 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
25831 * config/nds32/nds32.md (pipeline_model): Add n8.
25832 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
25833 * config/nds32/pipelines.md: Include n8 settings.
25834
25835 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25836 Chung-Ju Wu <jasonwucj@gmail.com>
25837
25838 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
25839 * config/nds32/nds32-n9-2r1w.md: New file.
25840 * config/nds32/nds32-n9-3r2w.md: New file.
25841 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
25842 nds32_register_ports): New or modify for cpu n9.
25843 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
25844 pipeline.
25845 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
25846 * config/nds32/nds32-utils.c: New file.
25847 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
25848 TARGET_MUL_SLOW): Define.
25849 * config/nds32/nds32.md (pipeline_model): New attribute.
25850 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
25851 New options that support cpu n9.
25852 * config/nds32/pipelines.md: Include n9 settings.
25853 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
25854
25855 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
25856
25857 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
25858 information if necessary.
25859 (output_cond_branch_compare_zero): Likewise.
25860 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
25861 (nds32_target_alignment): Refine for alignment.
25862 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
25863 (FUNCTION_BOUNDARY): Modify.
25864 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
25865 align case.
25866 * config/nds32/nds32.opt (malways-align, malign-functions): New.
25867
25868 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
25869
25870 * config/nds32/constants.md (unspec_volatile_element): Add values for
25871 TLB operation and data prefetch.
25872 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
25873 functions for TLB operation and data prefetch.
25874 * config/nds32/nds32-intrinsic.md: Likewise.
25875 * config/nds32/nds32_intrinsic.h: Likewise.
25876 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
25877 (nds32_print_operand): Likewise.
25878 * config/nds32/nds32.h (nds32_builtins): Likewise.
25879
25880 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
25881 Andrew Pinski <pinsika@gcc.gnu.org>
25882
25883 PR middle-end/82976
25884 * match.pd: Use constant_boolean_node of correct type instead of
25885 boolean_true_node or boolean_false_node for simplifying
25886 pointer comparisons to zero.
25887
25888 2018-04-07 Jakub Jelinek <jakub@redhat.com>
25889
25890 PR tree-optimization/80021
25891 * tree.c (verify_type_variant): Make error call in verify_variant_match
25892 translatable and remove final full stop.
25893
25894 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
25895
25896 * config/nds32/constants.md (unspec_volatile_element): Add
25897 UNSPEC_VOLATILE_EH_RETURN.
25898 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
25899 nds32_output_stack_pop): Support dwarf exception handling process.
25900 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
25901 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
25902 exception handling process.
25903 (nds32_compute_stack_frame): Likewise.
25904 (nds32_return_addr_rtx): Likewise.
25905 (nds32_initial_elimination_offset): Likewise.
25906 (nds32_expand_prologue): Likewise.
25907 (nds32_expand_epilogue): Likewise.
25908 (nds32_dynamic_chain_address): New function.
25909 * config/nds32/nds32.h (machine_function): Add fields for dwarf
25910 exception handling.
25911 (DYNAMIC_CHAIN_ADDRESS): Define.
25912 (EH_RETURN_DATA_REGNO): Define.
25913 (EH_RETURN_STACKADJ_RTX): Define.
25914 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
25915 patterns for dwarf exception handling.
25916
25917 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
25918
25919 * config/nds32/nds32.h: Clean up obsolete macros.
25920
25921 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25922
25923 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
25924 Add enum values for particular instructions.
25925 * config/nds32/nds32-intrinsic.c: Implementation of expanding
25926 particular intrinsic functions.
25927 * config/nds32/nds32-intrinsic.md: Likewise.
25928 * config/nds32/nds32_intrinsic.h: Likewise.
25929 * config/nds32/nds32.h (nds32_builtins): Likewise.
25930 * config/nds32/nds32.md (type): Add pbsad and pbsada.
25931 (btst, ave): New patterns for particular instructions.
25932
25933 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25934
25935 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
25936 Add enum values for atomic load/store and memory sync.
25937 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
25938 and memory sync.
25939 * config/nds32/nds32-intrinsic.md: Likewise.
25940 * config/nds32/nds32_intrinsic.h: Likewise.
25941 * config/nds32/nds32.h (nds32_builtins): Likewise.
25942
25943 2018-04-07 Jakub Jelinek <jakub@redhat.com>
25944
25945 PR tree-optimization/85257
25946 * fold-const.c (native_encode_vector): If not all elts could fit
25947 and off is -1, return 0 rather than offset.
25948 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
25949 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
25950 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
25951 adjust buffer in native_interpret_expr call.
25952
25953 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25954
25955 * config/nds32/constants.md (unspec_volatile_element): Add cache
25956 control enum values.
25957 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
25958 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
25959 * config/nds32/nds32.c (nds32_cctl_names): New.
25960 (nds32_print_operand): Handle cache control register names.
25961 * config/nds32/nds32.h (nds32_builtins): New enum values.
25962 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
25963 macros.
25964 * config/nds32/nds32.md (type): Add mmu.
25965 * config/nds32/pipelines.md (simple_insn): Add mmu.
25966
25967 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
25968
25969 * config/nds32/nds32.md (type): Remove call.
25970 * config/nds32/pipelines.md (simple_insn): Likewise.
25971
25972 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25973
25974 * config/nds32/constants.md (unspec_volatile_element): Add
25975 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
25976 UNSPEC_VOLATILE_FMFCFG.
25977 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
25978 description for fmfcfg and fmfcsr.
25979 (bdesc_1arg): Add fmtcsr.
25980 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
25981 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
25982 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
25983 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
25984 unspec_fmfcfg): New patterns.
25985 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
25986 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
25987 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
25988 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
25989 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
25990 __nds32__fmfcfg): Define.
25991
25992 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25993
25994 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
25995 intrinsic register names.
25996 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
25997 intrinsic register enum values and macros.
25998
25999 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26000
26001 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
26002 for load/store addressing form.
26003 (nds32_print_operand_address): Likewise.
26004
26005 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
26006
26007 PR target/85196
26008 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
26009 based on LABEL_REF. Remove useless assertion.
26010 (pic_address_needs_scratch): Fix formatting.
26011 (sparc_legitimize_pic_address): Minor tweaks.
26012 (sparc_delegitimize_address): Adjust assertion accordingly.
26013 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
26014 into symbolic_operand.
26015 (movsi_high_pic_label_ref): Likewise.
26016 (movsi_lo_sum_pic_label_ref): Likewise.
26017 (movdi_pic_label_ref): Likewise.
26018 (movdi_high_pic_label_ref): Likewise.
26019 (movdi_lo_sum_pic_label_ref): Likewise.
26020
26021 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
26022
26023 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
26024 custom LIB_SPEC setup.
26025
26026 2018-04-06 Ruslan Bukin <br@bsdpad.com>
26027 Kito Cheng <kito.cheng@gmail.com>
26028
26029 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
26030 * config/riscv/freebsd.h: New.
26031
26032 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26033
26034 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
26035 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
26036 file.
26037
26038 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26039 Kito Cheng <kito.cheng@gmail.com>
26040
26041 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
26042 nds32_output_call, nds32_symbol_binds_local_p): New functions.
26043 * config/nds32/nds32-protos.h (nds32_output_call,
26044 nds32_output_return): Declare.
26045 * config/nds32/nds32.md: Refine all the call and return patterns.
26046
26047 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26048
26049 PR debug/85252
26050 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
26051 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
26052
26053 PR rtl-optimization/84872
26054 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
26055 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
26056 EDGE_CROSSING edge.
26057
26058 2018-04-06 Tamar Christina <tamar.christina@arm.com>
26059
26060 * expr.c (copy_blkmode_to_reg): Revert 254862.
26061 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
26062
26063 2018-04-06 Richard Biener <rguenther@suse.de>
26064
26065 PR middle-end/85244
26066 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
26067 after seeing a component reference with an adjacent field. Treat
26068 refs to arrays at struct end of external decls similar to
26069 refs to unconstrained commons.
26070
26071 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26072
26073 PR sanitizer/85213
26074 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
26075 look through SAVE_EXPRs with non-side-effects argument. Adjust
26076 recursive calls.
26077 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
26078 save_p here.
26079
26080 2018-04-06 Richard Biener <rguenther@suse.de>
26081
26082 PR middle-end/85180
26083 * alias.c (find_base_term): New wrapper around find_base_term
26084 unwinding CSELIB_VAL_PTR changes.
26085 (find_base_term): Do not restore CSELIB_VAL_PTR during the
26086 recursion.
26087
26088 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26089
26090 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
26091 instructions.
26092 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
26093 constant definitions.
26094 ("nop"): lr 0,0 -> nopr r0
26095 ("nop_lr0", "nop_lr1"): New insn definitions.
26096
26097 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26098
26099 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
26100 NDS32_V3PUSH_AVAILABLE_P macro.
26101
26102 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
26103 Chung-Ju Wu <jasonwucj@gmail.com>
26104
26105 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
26106 (nds32*-*-*): Add float and fpu_config into supported_defaults.
26107 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
26108 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
26109 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
26110 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
26111 * config/nds32/constraints.md: New constraints and checking for hard
26112 float configuration.
26113 * config/nds32/iterators.md: New mode iterator and attribute for hard
26114 float configuration.
26115 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
26116 patterns.
26117 * config/nds32/nds32-fpu.md: New file.
26118 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
26119 deal with hard float code generation.
26120 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
26121 ARCH_V3S.
26122 (abi_type, float_reg_number): New enum type.
26123 * config/nds32/nds32-predicates.c: New predicates for hard float.
26124 * config/nds32/nds32-protos.h: Declare functions for hard float.
26125 * config/nds32/nds32.c: Implementation for hard float configuration.
26126 * config/nds32/nds32.h: Definitions for hard float configuration.
26127 * config/nds32/nds32.md: Include hard float machine description and
26128 modify patterns for hard float configuration.
26129 * config/nds32/nds32.opt: New options for hard float configuration.
26130 * config/nds32/predicates.md: New predicates for hard float
26131 configuration.
26132
26133 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26134
26135 * common/config/nds32/nds32-common.c
26136 (nds32_option_optimization_table): Enable -mreleax-hint by default.
26137
26138 2018-04-05 Jakub Jelinek <jakub@redhat.com>
26139
26140 PR middle-end/85195
26141 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
26142 CONSTRUCTOR_ELT (ctor, ...)->value.
26143
26144 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
26145
26146 PR target/85193
26147 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
26148
26149 2018-04-05 Tom de Vries <tom@codesourcery.com>
26150
26151 PR target/85204
26152 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
26153 cond jump.
26154
26155 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26156 Kito Cheng <kito.cheng@gmail.com>
26157
26158 * config/nds32/constraints.md (U33): Fine-tune checking condition.
26159 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
26160 * config/nds32/nds32.h (nds32_16bit_address_type): Add
26161 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
26162
26163 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26164 Kito Cheng <kito.cheng@gmail.com>
26165
26166 * config/nds32/constraints.md (Ufe): New memory constraint.
26167 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
26168 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
26169 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
26170 operands.
26171 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
26172 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
26173
26174 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26175
26176 * config/nds32/nds32.md: Use optimize_size in the condition for
26177 alu-shift instructions.
26178
26179 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26180
26181 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
26182
26183 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26184
26185 * config/nds32/nds32.md (negsi2): Refine pattern.
26186
26187 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26188 Chung-Ju Wu <jasonwucj@gmail.com>
26189
26190 * config/nds32/iterators.md (shift_rotate): New code iterator.
26191 (shift): New code attribute.
26192 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
26193 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
26194 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
26195 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
26196 bit-wise operations.
26197 (andsi3, *andsi3): Ditto.
26198 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
26199 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
26200 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
26201 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
26202 nds32_ior_operand, nds32_xor_operand): New predicates.
26203
26204 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26205
26206 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
26207 (addsi3, subsi3): ... this.
26208
26209 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26210
26211 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
26212
26213 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26214
26215 * config/nds32/nds32.md: Adjust indention.
26216
26217 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26218
26219 * config/nds32/nds32.md (feature): New attribute.
26220
26221 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26222
26223 * config/nds32/nds32.md (subtype): New attribute.
26224
26225 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
26226
26227 PR target/85203
26228 * config/arm/arm-builtins.c (arm_expand_builtin): Change
26229 expansion to perform a bitwise AND of the argument followed by a
26230 boolean negation of the result.
26231
26232 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
26233
26234 PR rtl-optimization/84878
26235 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
26236 the basic block. Assert the use reference is not artificial and that
26237 it has an associated insn.
26238
26239 2018-04-04 Michael Matz <matz@suse.de>
26240
26241 * builtins.c (compute_objsize): Pass correct operand
26242 to array_at_struct_end_p.
26243
26244 2018-04-04 Richard Biener <rguenther@suse.de>
26245
26246 PR lto/85176
26247 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
26248 from contexts for DINFO_LEVEL_TERSE and below.
26249
26250 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26251
26252 * config/nds32/nds32-doubleword.md (move_<mode>): Require
26253 resiter_operand condition.
26254 * config/nds32/nds32.md (*move<mode>): Ditto.
26255
26256 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26257 Monk Chiang <sh.chiang04@gmail.com>
26258
26259 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
26260
26261 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26262
26263 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
26264
26265 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26266 Kito Cheng <kito.cheng@gmail.com>
26267
26268 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
26269 nds32_cond_code_str, output_cond_branch,
26270 output_cond_branch_compare_zero, nds32_expand_cbranch,
26271 nds32_expand_cstore, nds32_expand_movcc,
26272 nds32_output_cbranchsi4_equality_zero,
26273 nds32_output_cbranchsi4_equality_reg,
26274 nds32_output_cbranchsi4_equality_reg_or_const_int,
26275 nds32_output_cbranchsi4_greater_less_zero: New functions.
26276 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
26277 nds32_expand_cstore, nds32_expand_movcc,
26278 nds32_output_cbranchsi4_equality_zero,
26279 nds32_output_cbranchsi4_equality_reg,
26280 nds32_output_cbranchsi4_equality_reg_or_const_int,
26281 nds32_output_cbranchsi4_greater_less_zero): Declare.
26282 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
26283 nds32_rimm11s_operand): New predicates.
26284 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
26285 * config/nds32/nds32.md: Rewrite all the branch and conditional move
26286 patterns.
26287
26288 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26289
26290 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
26291 * config/nds32/nds32.md: Ditto.
26292 * config/nds32/pipelines.md: Ditto.
26293
26294 2018-04-04 Richard Biener <rguenther@suse.de>
26295
26296 PR tree-optimization/85168
26297 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
26298 propagating abnormals.
26299
26300 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26301
26302 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
26303
26304 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26305 Kito Cheng <kito.cheng@gmail.com>
26306
26307 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
26308 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
26309 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
26310 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
26311 * config/nds32/nds32.md (sibcall_internal): New.
26312 (sibcall_register): Remove.
26313 (sibcall_immediate): Remove.
26314 (sibcall_value_internal): New.
26315 (sibcall_value_register): Remove.
26316 (sibcall_value_immediate): Remove.
26317 * config/nds32/predicates.md (nds32_general_register_operand): New.
26318 (nds32_call_address_operand): New.
26319
26320 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26321
26322 PR rtl-optimization/85167
26323 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
26324 bb_defs if *split_p, instead preinitialize it to NULL.
26325
26326 PR tree-optimization/85156
26327 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
26328 evaluating the argument multiple times.
26329
26330 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
26331
26332 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
26333 than vector.
26334 (_mm_cvtpd_ps): Likewise.
26335 (_mm_cvttpd_epi32): Likewise.
26336 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
26337 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
26338 vector, pixel, and bool following altivec.h include.
26339
26340 2018-04-03 Martin Sebor <msebor@redhat.com>
26341
26342 * doc/extend.texi (Common Function Attributes): Clarify.
26343 (const attribute): Likewise.
26344 (pure attribute): Likewise.
26345
26346 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26347
26348 PR target/85169
26349 * config/i386/i386.c (ix86_expand_vector_set): Use
26350 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
26351
26352 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
26353
26354 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
26355 instructions when changing rounding bits to preserve precision bits
26356 in the x87 control word.
26357
26358 2018-04-03 Martin Liska <mliska@suse.cz>
26359
26360 PR tree-optimization/82491
26361 * rtl.h (strip_offset_and_add): Replace += suboffset with
26362 poly_uint64 () + suboffset.
26363
26364 2018-03-29 Martin Liska <mliska@suse.cz>
26365 Martin Jambor <mjambor@suse.cz>
26366
26367 PR ipa/84947
26368 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
26369 param_type is not an integral or pointer type.
26370
26371 2018-04-03 Richard Biener <rguenther@suse.de>
26372
26373 * sese.h (recompute_all_dominators): Remove.
26374
26375 2018-04-02 Martin Sebor <msebor@redhat.com>
26376
26377 * doc/invoke.texi (-Wrestrict): Fix typos.
26378
26379 2018-04-02 Jim Wilson <jimw@sifive.com>
26380
26381 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
26382 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
26383 (<optab>di3, <optab>si3_extend): Likewise.
26384 (<optab>si3_mask, <optab>si3_mask_1): New.
26385 (<optab>di3_mask, <optab>di3_mask_1): New.
26386 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
26387 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
26388 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
26389
26390 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
26391
26392 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
26393 example.
26394
26395 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
26396
26397 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
26398 (nds32_canonicalize_comparison): New function.
26399
26400 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26401 Kito Cheng <kito.cheng@gmail.com>
26402 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26403
26404 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
26405 * config/nds32/constants.md (unspec_volatile_element): Add
26406 UNSPEC_VOLATILE_RELAX_GROUP.
26407 * config/nds32/nds32-relax-opt.c: New file.
26408 * config/nds32/nds32-predicates.c
26409 (nds32_symbol_load_store_p): New function.
26410 * config/nds32/nds32-protos.h
26411 (nds32_symbol_load_store_p): Declare function.
26412 (make_pass_nds32_relax_opt): Declare new rtl pass function.
26413 * config/nds32/nds32.c
26414 (nds32_register_pass): New function to register pass.
26415 (nds32_register_passes): New function to register passes.
26416 * config/nds32/nds32.md (relax_group): New pattern.
26417 * config/nds32/nds32.opt (mrelax-hint): New option.
26418 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
26419
26420 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
26421
26422 * config/nds32/t-nds32: Modify files dependency.
26423
26424 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26425
26426 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
26427 (PROFILE_HOOK): Define its implementation.
26428
26429 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26430
26431 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
26432 type and 32-bit size.
26433
26434 2018-04-01 Jakub Jelinek <jakub@redhat.com>
26435
26436 PR middle-end/85090
26437 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
26438 (V_128_256): New mode iterator.
26439 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
26440 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
26441 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
26442 of V.
26443 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
26444 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
26445
26446 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
26447
26448 PR target/83315
26449 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
26450 NaN inputs correctly.
26451
26452 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
26453
26454 PR target/80546
26455 * config/rs6000/vsx.md (??r): New mode attribute.
26456 (*vsx_mov<mode>_64bit): Use it.
26457 (*vsx_mov<mode>_32bit): Likewise.
26458
26459 2018-03-30 Martin Sebor <msebor@redhat.com>
26460
26461 PR tree-optimization/84818
26462 * builtins.c (check_access): Use warning_n.
26463
26464 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26465
26466 PR target/83822
26467 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
26468 condition.
26469 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
26470 condition.
26471
26472 2018-03-30 Julia Koval <julia.koval@intel.com>
26473
26474 PR target/84413
26475 * x86-tune.def (movx, partial_reg_dependency): Enable for
26476 m_SKYLAKE_AVX512.
26477
26478 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
26479
26480 PR inline-asm/84985
26481 * lra-constraints.c (process_alt_operands): Move setting
26482 this_alternative_matches below.
26483
26484 2018-03-29 Martin Liska <mliska@suse.cz>
26485
26486 PR lto/84995.
26487 * doc/invoke.texi: Document how LTO works with debug info.
26488 Describe auto-load support of binutils. Mention 'x86-64'
26489 as valid option value of -march option.
26490
26491 2018-03-29 Jakub Jelinek <jakub@redhat.com>
26492
26493 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
26494
26495 PR c/85094
26496 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
26497 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
26498 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
26499 checking.
26500
26501 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26502
26503 PR target/84912
26504 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
26505 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
26506 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
26507 for RS6000_BTM_POWERPC64.
26508 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
26509 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
26510 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
26511 definition.
26512 (DIVDE): Use it.
26513 (DIVDEU): Likewise.
26514
26515 2018-03-28 Carl Love <cel@us.ibm.com>
26516
26517 Revert
26518 2017-09-27 Carl Love <cel@us.ibm.com>
26519
26520 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
26521 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
26522 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
26523 fctiw instruction.
26524
26525 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26526
26527 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
26528 instead of __vector bool.
26529 (_mm_max_pu8): Likewise.
26530 (_mm_min_pi16): Likewise.
26531
26532 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26533
26534 PR target/84912
26535 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
26536 (DIVWEUO): Likewise.
26537 (DIVDEO): Likewise.
26538 (DIVDEUO): Likewise.
26539 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
26540 DIVWEUO and DIVDEUO.
26541 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
26542 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
26543 (div_extend): Likewise.
26544 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
26545 builtin function.
26546 (__builtin_divweuo): Likewise.
26547 (__builtin_divdeo): Likewise.
26548 (__builtin_divdeuo): Likewise.
26549
26550 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26551
26552 PR target/85095
26553 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
26554 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
26555
26556 PR tree-optimization/82004
26557 * gimple-match-head.c (optimize_pow_to_exp): New function.
26558 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
26559 Don't fold to exp if optimize_pow_to_exp is false.
26560
26561 2018-03-28 Martin Liska <mliska@suse.cz>
26562
26563 PR other/84819
26564 * calls.c (initialize_argument_information): Fix trailing space.
26565 * common.opt: Fix typo and provide better explanation for
26566 -fsanitize-coverage option.
26567 * config/i386/i386.opt: Fix typo.
26568
26569 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26570 Martin Liska <mliska@suse.cz>
26571
26572 PR sanitizer/85081
26573 * gimplify.c (asan_poison_variable): Don't do the check for
26574 gimplify_omp_ctxp here.
26575 (gimplify_decl_expr): Do it here.
26576 (gimplify_target_expr): Likewise.
26577
26578 2018-03-28 Martin Liska <mliska@suse.cz>
26579
26580 PR target/84988
26581 * config/i386/i386.c (ix86_function_arg_advance): Do not call
26582 chkp_type_bounds_count if MPX is not enabled.
26583
26584 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
26585
26586 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
26587
26588 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
26589
26590 PR target/84914
26591 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
26592 function to create the function decl for complex long double
26593 multiply and divide for -mabi=ieeelongdouble.
26594 (init_float128_ieee): Call it.
26595
26596 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
26597
26598 PR target/85044
26599 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
26600 -fcf-protection=branch -mibt.
26601 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
26602
26603 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26604
26605 PR target/81863
26606 * config/arm/arm.c (arm_valid_symbolic_address): Handle
26607 arm_word_relocations.
26608
26609 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
26610
26611 PR target/85056
26612 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
26613 extern array declarations.
26614
26615 2018-03-27 Richard Biener <rguenther@suse.de>
26616
26617 PR middle-end/84067
26618 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
26619 explicit single_use checks.
26620
26621 2018-03-27 Richard Biener <rguenther@suse.de>
26622
26623 PR tree-optimization/85082
26624 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
26625 Valueize the VUSE.
26626
26627 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26628
26629 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
26630 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
26631 Turn on fasynchronous-unwind-tables and funwind-tables.
26632
26633 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
26634
26635 PR target/85073
26636 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
26637 (*bmi_blsr_<mode>_ccz): Ditto.
26638
26639 2018-03-26 Tom de Vries <tom@codesourcery.com>
26640
26641 PR tree-optimization/85063
26642 * omp-general.c (offloading_function_p): New function. Factor out
26643 of ...
26644 * omp-offload.c (pass_omp_target_link::gate): ... here.
26645 * omp-general.h (offloading_function_p): Declare.
26646 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
26647 with attribute omp declare target for offloading functions.
26648
26649 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
26650
26651 PR tree-optimization/84005
26652 * tree-data-ref.h (get_base_for_alignment): Declare.
26653 * tree-data-ref.c (get_base_for_alignment_1): New function.
26654 (get_base_for_alignment): Likewise.
26655 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
26656 get_base_for_alignment to find a suitable base object, instead
26657 of always using drb->base_address.
26658
26659 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26660
26661 PR inline-asm/85022
26662 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
26663 known size by default.
26664
26665 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
26666
26667 PR inline-asm/85030
26668 * lra-constraints.c (process_alt_operands): Don't match BLKmode
26669 and non BLKmode operands.
26670
26671 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26672
26673 PR target/85026
26674 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
26675 Clean up attributes.
26676
26677 2018-03-23 Richard Biener <rguenther@suse.de>
26678
26679 PR debug/85020
26680 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
26681 we are going to emit early debug for LTO.
26682
26683 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26684
26685 PR inline-asm/85034
26686 * function.c (match_asm_constraints_1): Don't optimize if input
26687 doesn't satisfy general_operand predicate for output's mode.
26688
26689 PR inline-asm/85022
26690 * alias.c (write_dependence_p): Don't require for x_canonicalized
26691 non-VOIDmode if x has VOIDmode.
26692
26693 PR sanitizer/85029
26694 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
26695 just don't try to optimize it rather than assert it never happens.
26696
26697 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26698
26699 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
26700 macro expansions for definition of ST_INTERNAL_<mode> and
26701 LD_INTERNAL_<mode> builtins.
26702 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
26703 Remove prototype.
26704 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
26705 function.
26706 (altivec_expand_st_builtin): Likewise.
26707 (altivec_expand_builtin): Remove calls to deleted functions.
26708 (rs6000_address_for_altivec): Delete this function.
26709 * config/rs6000/vector.md: Remove expands for
26710 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
26711
26712 2018-03-22 Sudakshina Das <sudi.das@arm.com>
26713
26714 PR target/84826
26715 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
26716 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
26717 re-computing once computed.
26718 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
26719 (arm_init_machine_status): Initialize
26720 machine->static_chain_stack_bytes.
26721
26722 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26723
26724 PR target/84760
26725 * doc/extend.texi: Add four new prototypes for vec_ld.
26726 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
26727 definitions for more logical presentation.
26728 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
26729 entries for V1TI variants of __builtin_altivec_ld builtin.
26730 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
26731 handling of V1TI variant of LVX icode pattern.
26732 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
26733 (rs6000_gimple_fold_builtin): Likewise.
26734 (altivec_init_builtins): Add code to define
26735 __builtin_altivec_lvx_v1ti function.
26736
26737 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26738
26739 PR inline-asm/84941
26740 * function.c (match_asm_constraints_1): Don't do the optimization
26741 if input isn't a REG, SUBREG, MEM or constant.
26742
26743 2018-03-22 Tom de Vries <tom@codesourcery.com>
26744
26745 PR tree-optimization/84956
26746 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
26747 bb_has_abnormal_pred.
26748
26749 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26750
26751 PR sanitizer/85018
26752 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
26753 DECL_INITIAL (decl) to decl at the end.
26754 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
26755 adjust the comment.
26756
26757 2018-03-21 Joseph Myers <joseph@codesourcery.com>
26758
26759 * doc/extend.texi (__builtin_tgmath): Document when complex
26760 integer types are treated as _Complex _Float64.
26761
26762 2018-03-21 Tom de Vries <tom@codesourcery.com>
26763
26764 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
26765
26766 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26767
26768 PR tree-optimization/84960
26769 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
26770 if it is ENTRY block, move them into single succ of ENTRY in that case.
26771
26772 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
26773
26774 PR tree-optimization/84811
26775 * poly-int.h (poly_span_traits): Remove the T3 parameter and
26776 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
26777 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
26778 (known_subrange_p): Update accordingly. Cast each value involved
26779 in the size comparison, rather than casting the result of the
26780 subtraction.
26781
26782 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26783
26784 PR tree-optimization/84982
26785 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
26786 by flipping the least significant bit rather than all bits from
26787 bitpos to bitpos + bitsize - 1.
26788
26789 2018-03-21 Nathan Sidwell <nathan@acm.org>
26790
26791 * doc/extend.texi (Deprecated Features): Remove mention of
26792 long-deleted deprecations.
26793
26794 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26795
26796 PR jit/84288
26797 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
26798 * configure: Regenerate.
26799
26800 2018-03-21 Tom de Vries <tom@codesourcery.com>
26801
26802 PR tree-optimization/83126
26803 * tree-parloops.c (num_phis): New function.
26804 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
26805
26806 2018-03-21 Nathan Sidwell <nathan@acm.org>
26807
26808 * doc/extend.texi (Deprecated Features): Update deprecated flags,
26809 mention anon-struct/union members and trailing attributes.
26810
26811 2018-03-21 Bin Cheng <bin.cheng@arm.com>
26812
26813 PR tree-optimization/84969
26814 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
26815 builtin memset partitions if they set different rhs values.
26816
26817 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26818
26819 PR rtl-optimization/84989
26820 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
26821 VEC_DUPLICATE with scalar result mode.
26822
26823 2018-03-21 Martin Liska <mliska@suse.cz>
26824
26825 PR ipa/84963
26826 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
26827 not intended return statement.
26828
26829 2018-03-21 Martin Liska <mliska@suse.cz>
26830
26831 PR target/84988
26832 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
26833 (chkp_find_bound_slots_1): Limit number of iterations.
26834
26835 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
26836
26837 PR target/84838
26838 * Minor grammar fixes for x86 options.
26839
26840 2018-03-20 Jakub Jelinek <jakub@redhat.com>
26841
26842 PR debug/84875
26843 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
26844 holding REG_CFA_RESTORE notes, instead turn them into a USE.
26845
26846 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
26847
26848 PR target/83789
26849 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
26850 (altivec_lvx_<mode>_1op): Likewise.
26851 (altivec_stvx_<mode>_2op): Likewise.
26852 (altivec_stvx_<mode>_1op): Likewise.
26853 (altivec_lvx_<VM2:mode>): New define_expand.
26854 (altivec_stvx_<VM2:mode>): Likewise.
26855 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
26856 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
26857 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
26858 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
26859 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
26860 (rs6000_gen_lvx): Likewise.
26861 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
26862 (altivec_expand_stv_builtin): Likewise.
26863 (altivec_expand_builtin): Likewise.
26864 * config/rs6000/vector.md: Likewise.
26865
26866 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26867
26868 PR target/82518
26869 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
26870 BYTES_BIG_ENDIAN.
26871
26872 2018-03-20 Richard Biener <rguenther@suse.de>
26873
26874 PR target/84986
26875 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
26876 sign-conversions as zero, fall back to standard scalar_stmt
26877 cost for the rest.
26878
26879 2018-03-20 Martin Liska <mliska@suse.cz>
26880
26881 PR ipa/84825
26882 * predict.c (rebuild_frequencies): Handle case when we have
26883 PROFILE_ABSENT, but flag_guess_branch_prob is false.
26884
26885 2018-03-20 Jakub Jelinek <jakub@redhat.com>
26886
26887 PR target/84990
26888 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
26889 flag_section_anchors.
26890 * varasm.c (use_blocks_for_decl_p): Remove hack for
26891 dw2_force_const_mem.
26892
26893 PR target/84845
26894 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
26895 to ...
26896 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
26897 be created, use lowpart_subreg of operands[0] rather than operands[0]
26898 itself.
26899 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
26900 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
26901 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
26902 and n constraint instead of aarch64_shift_imm_di and Usd.
26903 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
26904 (*aarch64_<optab>_reg_minus<mode>3): ... this.
26905
26906 2018-03-20 Sudakshina Das <sudi.das@arm.com>
26907
26908 PR target/82989
26909 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
26910 to favor GPR over NEON registers.
26911 (<shift>di3_neon): Likewise.
26912
26913 2018-03-20 Tom de Vries <tom@codesourcery.com>
26914
26915 PR target/84952
26916 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
26917 (nvptx_process_pars): Emit bar.sync asap and alap.
26918
26919 2018-03-20 Tom de Vries <tom@codesourcery.com>
26920
26921 PR target/84954
26922 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
26923 seen_label if seen_label is already set.
26924
26925 2018-03-20 Jakub Jelinek <jakub@redhat.com>
26926
26927 PR target/84945
26928 * config/i386/i386.c (fold_builtin_cpu): For features above 31
26929 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
26930 Use 1U instead of 1. Formatting fixes.
26931
26932 PR c/84953
26933 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
26934 instead of TREE_TYPE (s1) for the return value.
26935
26936 2018-03-19 Jakub Jelinek <jakub@redhat.com>
26937
26938 PR tree-optimization/84946
26939 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
26940 bitsize + bitsize in poly_uint64 rather than poly_int64.
26941
26942 PR sanitizer/78651
26943 * dwarf2asm.c: Include fold-const.c.
26944 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
26945 of decl rather than decl itself.
26946
26947 PR rtl-optimization/84643
26948 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
26949
26950 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
26951
26952 PR sanitizer/78651
26953 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
26954 calling assemble_variable.
26955
26956 2018-03-19 Sudakshina Das <sudi.das@arm.com>
26957
26958 PR target/81647
26959 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
26960 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
26961
26962 2018-03-19 Jim Wilson <jimw@sifive.com>
26963
26964 PR bootstrap/84856
26965 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
26966 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
26967 (riscv_first_stack_step): Likewise.
26968 (riscv_option_override): Use STACK_BOUNDARY instead of
26969 MIN_STACK_BOUNDARY.
26970 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
26971 MIN_STACK_BOUNDARY.
26972 (BIGGEST_ALIGNMENT): Set to 128.
26973 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
26974 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
26975 STACK_BOUNDARY.
26976
26977 2018-03-19 Richard Biener <rguenther@suse.de>
26978
26979 PR tree-optimization/84933
26980 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
26981 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
26982
26983 2018-03-19 Richard Biener <rguenther@suse.de>
26984
26985 PR tree-optimization/84859
26986 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
26987 (cond_if_else_store_replacement): Perform sinking operation on
26988 single-store BBs regardless of MAX_STORES_TO_SINK setting.
26989 Generalize what a BB with a single eligible store is.
26990
26991 2018-03-19 Richard Biener <rguenther@suse.de>
26992
26993 PR tree-optimization/84929
26994 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
26995 chrec_is_positive against non-chrec arg.
26996
26997 2018-03-19 Tamar Christina <tamar.christina@arm.com>
26998
26999 PR target/84711
27000 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
27001
27002 2018-03-18 Martin Liska <mliska@suse.cz>
27003
27004 PR rtl-optimization/84635
27005 * regrename.c (build_def_use): Use matches_mode only when
27006 matches >= 0.
27007
27008 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
27009
27010 PR tree-optimization/84913
27011 * tree-vect-loop.c (vectorizable_reduction): Don't try to
27012 vectorize chains of COND_EXPRs.
27013
27014 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27015
27016 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
27017
27018 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27019
27020 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
27021
27022 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27023
27024 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
27025
27026 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27027 Kito Cheng <kito.cheng@gmail.com>
27028
27029 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
27030 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
27031 (nds32_adjust_reg_alloc_order): New function.
27032 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
27033
27034 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
27035
27036 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
27037 nds32_print_operand, nds32_print_operand_address): Use
27038 HOST_WIDE_INT_PRINT_DEC instead.
27039
27040 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27041
27042 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
27043
27044 2018-03-17 Jakub Jelinek <jakub@redhat.com>
27045
27046 PR target/84902
27047 * config/i386/i386.c (initial_ix86_tune_features,
27048 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
27049 unsigned long long.
27050 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
27051 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
27052 rather than 1u << ix86_tune. Formatting fix.
27053 (ix86_option_override_internal): Change ix86_arch_mask from
27054 unsigned int to unsigned HOST_WIDE_INT, initialize to
27055 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
27056 (ix86_function_specific_restore): Likewise.
27057
27058 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27059
27060 PR target/84899
27061 * postreload.c (reload_combine_recognize_pattern): Perform
27062 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
27063 truncate_int_for_mode the result for the destination's mode.
27064
27065 PR c/84909
27066 * hsa-gen.c (mem_type_for_type): Fix comment typo.
27067 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
27068 Likewise.
27069 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27070 Likewise.
27071
27072 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
27073
27074 PR target/84876
27075 * lra-assigns.c (lra_split_hard_reg_for): Don't use
27076 regno_allocno_class_array and sorted_pseudos.
27077 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
27078 insns where regno is used.
27079
27080 2018-03-16 Martin Liska <mliska@suse.cz>
27081
27082 PR ipa/84833
27083 * multiple_target.c (create_dispatcher_calls): Redirect
27084 reference in the symbol table.
27085
27086 2018-03-16 Martin Liska <mliska@suse.cz>
27087
27088 PR ipa/84722
27089 * multiple_target.c (create_dispatcher_calls): Redirect also
27090 an alias.
27091
27092 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27093
27094 PR c++/79937
27095 PR c++/82410
27096 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
27097 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
27098 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
27099
27100 2018-03-16 Julia Koval <julia.koval@intel.com>
27101
27102 * doc/invoke.texi (Skylake Server): Add CLWB.
27103 Cannonlake): Remove CLWB.
27104
27105 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27106
27107 PR tree-optimization/84841
27108 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
27109 1 << 3.
27110 (FLOAT_ONE_CONST_TYPE): Define.
27111 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
27112 (sort_by_operand_rank): Put entries with higher constant_type last
27113 rather than first to match comments.
27114
27115 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
27116
27117 * config/nios2/nios2.md (movsi_internal): Fix thinko in
27118 split predicate.
27119
27120 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27121
27122 PR c++/79085
27123 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
27124 check and use address of target always.
27125
27126 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
27127
27128 PR target/84574
27129 * config/i386/i386.c (indirect_thunk_needed): Update comments.
27130 (indirect_thunk_bnd_needed): Likewise.
27131 (indirect_thunks_used): Likewise.
27132 (indirect_thunks_bnd_used): Likewise.
27133 (indirect_return_needed): New.
27134 (indirect_return_bnd_needed): Likewise.
27135 (output_indirect_thunk_function): Add a bool argument for
27136 function return.
27137 (output_indirect_thunk_function): Don't generate alias for
27138 function return thunk.
27139 (ix86_code_end): Call output_indirect_thunk_function to generate
27140 function return thunks.
27141 (ix86_output_function_return): Set indirect_return_bnd_needed
27142 and indirect_return_needed instead of indirect_thunk_bnd_needed
27143 and indirect_thunk_needed.
27144
27145 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
27146
27147 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
27148 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
27149 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
27150
27151 2018-03-15 David Malcolm <dmalcolm@redhat.com>
27152 Paul Hua <paul.hua.gm@gmail.com>
27153
27154 PR c/84852
27155 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
27156
27157 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
27158
27159 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
27160 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
27161 resp. SFmode cases.
27162
27163 2018-03-15 Tamar Christina <tamar.christina@arm.com>
27164
27165 PR target/84711
27166 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
27167 instead of GET_MODE_SIZE when comparing Units.
27168
27169 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
27170
27171 PR target/68256
27172 * varasm.c (hash_section): Return an unchangeble hash value
27173 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
27174 Return !aarch64_can_use_per_function_literal_pools_p ().
27175
27176 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27177
27178 PR target/84860
27179 * optabs.c (emit_conditional_move): Pass address of cmode's copy
27180 rather than address of cmode as last argument to prepare_cmp_insn.
27181
27182 2018-03-15 Julia Koval <julia.koval@intel.com>
27183
27184 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
27185 F_AVX512VNNI, F_AVX512BITALG): New.
27186
27187 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
27188
27189 PR target/83451
27190 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
27191 insn for floating-point loads and stores.
27192
27193 2018-03-14 Carl Love <cel@us.ibm.com>
27194
27195 * config/rs6000/rs6000-c.c: Add macro definitions for
27196 ALTIVEC_BUILTIN_VEC_PERMXOR.
27197 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
27198 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
27199 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
27200 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
27201 UNSPEC_VPERMXOR.
27202 * config/doc/extend.texi: Add prototypes for vec_permxor.
27203
27204 2018-03-14 David Malcolm <dmalcolm@redhat.com>
27205
27206 PR c/84852
27207 * diagnostic-show-locus.c (class layout_point): Convert m_line
27208 from int to linenum_type.
27209 (line_span::comparator): Use linenum "compare" function when
27210 comparing line numbers.
27211 (test_line_span): New function.
27212 (layout_range::contains_point): Convert param "row" from int to
27213 linenum_type.
27214 (layout_range::intersects_line_p): Likewise.
27215 (layout::will_show_line_p): Likewise.
27216 (layout::print_source_line): Likewise.
27217 (layout::should_print_annotation_line_p): Likewise.
27218 (layout::print_annotation_line): Likewise.
27219 (layout::print_leading_fixits): Likewise.
27220 (layout::annotation_line_showed_range_p): Likewise.
27221 (struct line_corrections): Likewise for field m_row.
27222 (line_corrections::line_corrections): Likewise for param "row".
27223 (layout::print_trailing_fixits): Likewise.
27224 (layout::get_state_at_point): Likewise.
27225 (layout::get_x_bound_for_row): Likewise.
27226 (layout::print_line): Likewise.
27227 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
27228 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
27229 * input.c (selftest::test_linenum_comparisons): New function.
27230 (selftest::input_c_tests): Call it.
27231 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
27232 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
27233 * selftest.h (ASSERT_GT): New macro.
27234 (ASSERT_GT_AT): New macro.
27235 (ASSERT_LT): New macro.
27236 (ASSERT_LT_AT): New macro.
27237
27238 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
27239
27240 PR rtl-optimization/84780
27241 * combine.c (distribute_links): Don't make a link based on pc_rtx.
27242
27243 2018-03-14 Martin Liska <mliska@suse.cz>
27244
27245 * tree.c (record_node_allocation_statistics): Use
27246 get_stats_node_kind.
27247 (get_stats_node_kind): New function extracted from
27248 record_node_allocation_statistics.
27249 (free_node): Use get_stats_node_kind.
27250
27251 2018-03-14 Richard Biener <rguenther@suse.de>
27252
27253 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
27254 that the value-set of ANTIC_IN doesn't grow.
27255
27256 Revert
27257 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
27258 member.
27259 (BB_VISITED_WITH_VISITED_SUCCS): New define.
27260 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
27261
27262 2018-03-14 Julia Koval <julia.koval@intel.com>
27263
27264 * config.gcc (icelake-client, icelake-server): New.
27265 (icelake): Remove.
27266 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
27267 (initial_ix86_arch_features): Ditto.
27268 (PTA_SKYLAKE): Add SGX.
27269 (PTA_ICELAKE): Remove.
27270 (PTA_ICELAKE_CLIENT): New.
27271 (PTA_ICELAKE_SERVER): New.
27272 (ix86_option_override_internal): Split up icelake on icelake client and
27273 icelake server.
27274 (get_builtin_code_for_version): Ditto.
27275 (fold_builtin_cpu): Ditto.
27276 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
27277 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
27278 * config/i386/i386.h (processor_type): Ditto.
27279 * doc/invoke.texi: Ditto.
27280
27281 2018-03-14 Jakub Jelinek <jakub@redhat.com>
27282
27283 PR sanitizer/83392
27284 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
27285 INTEGER_CST offset, add it together with bitpos / 8 and
27286 sign extend based on POINTER_SIZE.
27287
27288 PR target/84844
27289 Revert
27290 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
27291
27292 PR target/78090
27293 * config/i386/constraints.md (Yc): New register constraint.
27294 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
27295 Use Yc constraint for alternative 2 of operand 0. Remove
27296 preferred_for_speed attribute.
27297
27298 2018-03-14 Richard Biener <rguenther@suse.de>
27299
27300 PR tree-optimization/84830
27301 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
27302 with the old one to avoid oscillations.
27303
27304 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
27305
27306 PR target/83712
27307 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
27308 pseudos.
27309 (assign_by_spills): Return a flag of reload assignment failure.
27310 Do not process the reload assignment failures. Do not spill other
27311 reload pseudos if they has the same reg class. Update n if
27312 necessary.
27313 (lra_assign): Add a return arg. Set up from the result of
27314 assign_by_spills call.
27315 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27316 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27317 usage_insns if it is not NULL.
27318 (spill_hard_reg_in_range): New function.
27319 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27320 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27321 function prototypes.
27322 (lra_assign): Change prototype.
27323 * lra.c (lra): Add code to deal with fails by splitting hard reg
27324 live ranges.
27325
27326 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
27327
27328 * config/riscv/riscv.opt (mrelax): New option.
27329 * config/riscv/riscv.c (riscv_file_start): Emit ".option
27330 "norelax" when riscv_mrelax is disabled.
27331 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
27332
27333 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27334
27335 PR target/84743
27336 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
27337 reassociation for int modes.
27338
27339 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27340
27341 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
27342 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
27343 for big-endian.
27344 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
27345 * config/aarch64/aarch64-sve.md
27346 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
27347 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
27348 (*extend<mode><Vwide>2): Rename to...
27349 (aarch64_sve_extend<mode><Vwide>2): ...this.
27350 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
27351 renaming the old pattern to...
27352 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
27353 unsigned packs.
27354 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
27355 define_expand, renaming the old pattern to...
27356 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
27357 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
27358 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
27359 account when deciding which SVE instruction the optab should use.
27360 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
27361
27362 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27363
27364 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
27365 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
27366 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
27367 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
27368 (tlsdesc_small_<mode>): Turn a define_expand and use
27369 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
27370 (tlsdesc_small_advsimd_<mode>): ...this.
27371 (tlsdesc_small_sve_<mode>): New pattern.
27372
27373 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27374
27375 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
27376 (UNSPEC_UMUL_HIGHPART): New constants.
27377 (MUL_HIGHPART): New int iteraor.
27378 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
27379 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
27380 define_expand.
27381 (*<su>mul<mode>3_highpart): New define_insn.
27382
27383 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
27384
27385 PR lto/84805
27386 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
27387 incomplete types.
27388
27389 2018-03-13 Martin Liska <mliska@suse.cz>
27390
27391 PR ipa/84658.
27392 * (sem_item_optimizer::sem_item_optimizer): Initialize new
27393 vector.
27394 (sem_item_optimizer::~sem_item_optimizer): Release it.
27395 (sem_item_optimizer::merge_classes): Register variable aliases.
27396 (sem_item_optimizer::fixup_pt_set): New function.
27397 (sem_item_optimizer::fixup_points_to_sets): Likewise.
27398 * ipa-icf.h: Declare new variables and functions.
27399
27400 2018-03-13 Jakub Jelinek <jakub@redhat.com>
27401
27402 PR middle-end/84834
27403 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
27404 integer_pow2p@2 and test integer_pow2p in condition.
27405 (A < 0 ? C : 0): Similarly for @1.
27406
27407 PR middle-end/84831
27408 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
27409 characters starting at p contain '\0' character, don't look beyond
27410 that.
27411
27412 PR target/84827
27413 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
27414 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
27415
27416 PR target/84828
27417 * reg-stack.c (change_stack): Change update_end var from int to
27418 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
27419 also call set_block_for_insn on the newly added insns and rescan.
27420
27421 PR target/84786
27422 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
27423 on the last operand.
27424
27425 PR c++/84704
27426 * tree.c (stabilize_reference_1): Return save_expr (e) for
27427 STATEMENT_LIST even if it doesn't have side-effects.
27428
27429 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
27430
27431 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
27432
27433 2018-03-12 Renlin Li <renlin.li@arm.com>
27434
27435 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
27436 aarch64_output_scalar_simd_mov_immediate.
27437
27438 2018-03-12 Martin Sebor <msebor@redhat.com>
27439
27440 PR tree-optimization/83456
27441 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
27442 for perfectly overlapping calls to memcpy.
27443 (gimple_fold_builtin_memory_chk): Same.
27444 (gimple_fold_builtin_strcpy): Handle no-warning.
27445 (gimple_fold_builtin_stxcpy_chk): Same.
27446 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
27447
27448 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27449
27450 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
27451 parameter. Use it for SFmode.
27452 (rs6000_function_arg_advance_1): Adjust.
27453 (rs6000_function_arg): Adjust.
27454 (rs6000_gimplify_va_arg): Pass false for that new parameter.
27455
27456 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27457
27458 PR rtl-optimization/84169
27459 PR rtl-optimization/84780
27460 * combine.c (can_combine_p): Check for a 2-insn combination whether
27461 the destination register is used between the two insns, too.
27462
27463 2018-03-12 Richard Biener <rguenther@suse.de>
27464
27465 PR tree-optimization/84803
27466 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
27467 for refs DR analysis didn't process.
27468
27469 2018-03-12 Richard Biener <rguenther@suse.de>
27470
27471 PR tree-optimization/84777
27472 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
27473 force-vectorize loops ignore whether we are optimizing for size.
27474
27475 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
27476
27477 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
27478 (TARGET_MD_ASM_ADJUST): Define.
27479
27480 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
27481 Kito Cheng <kito.cheng@gmail.com>
27482 Chung-Ju Wu <jasonwucj@gmail.com>
27483
27484 * config/nds32/nds32.c (nds32_compute_stack_frame,
27485 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
27486 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
27487 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
27488 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
27489 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
27490 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
27491 * config/nds32/nds32.md (prologue, epilogue): Use macro
27492 NDS32_V3PUSH_AVAILABLE_P to do checking.
27493
27494 2018-03-11 Jakub Jelinek <jakub@redhat.com>
27495
27496 PR debug/58150
27497 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
27498 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
27499 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
27500 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
27501 addition of most attributes on !orig_type_die or the attribute not
27502 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
27503
27504 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27505 Chung-Ju Wu <jasonwucj@gmail.com>
27506
27507 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
27508 __NDS32_VH__ macro.
27509 * config/nds32/nds32.opt (mvh): New option.
27510
27511 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27512 Chung-Ju Wu <jasonwucj@gmail.com>
27513
27514 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
27515 function.
27516 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
27517 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
27518 definition.
27519
27520 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27521 Chung-Ju Wu <jasonwucj@gmail.com>
27522
27523 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
27524 function.
27525 * config/nds32/nds32-multiple.md (strlensi): New pattern.
27526 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
27527
27528 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
27529 Kito Cheng <kito.cheng@gmail.com>
27530 Chung-Ju Wu <jasonwucj@gmail.com>
27531
27532 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
27533 UNSPEC_FFMISM and UNSPEC_FLMISM.
27534 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
27535 for ffb, ffmism and flmism.
27536 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
27537 (unspec_ffmism): Ditto.
27538 (unspec_flmism): Ditto.
27539 (nds32_expand_builtin_impl): Check if string extension is available.
27540 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
27541 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
27542
27543 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
27544
27545 Reverting patch:
27546 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27547
27548 PR target/83712
27549 * lra-assigns.c (assign_by_spills): Return a flag of reload
27550 assignment failure. Do not process the reload assignment
27551 failures. Do not spill other reload pseudos if they has the same
27552 reg class.
27553 (lra_assign): Add a return arg. Set up from the result of
27554 assign_by_spills call.
27555 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27556 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27557 usage_insns if it is not NULL.
27558 (spill_hard_reg_in_range): New function.
27559 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27560 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27561 function prototypes.
27562 (lra_assign): Change prototype.
27563 * lra.c (lra): Add code to deal with fails by splitting hard reg
27564 live ranges.
27565
27566 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
27567
27568 PR target/84807
27569 * config/i386/i386.opt: Replace Enforcment with Enforcement.
27570
27571 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
27572
27573 PR debug/84620
27574 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
27575 (dw_val_node): Add val_symbolic_view.
27576 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
27577 (symview_upper_bound): New.
27578 (new_line_info_table): Initialize symviews_since_reset.
27579 (dwarf2out_source_line): Count symviews_since_reset and set
27580 symview_upper_bound.
27581 (dw_val_equal_p): Handle symview.
27582 (add_AT_symview): New.
27583 (print_dw_val): Handle symview.
27584 (attr_checksum, attr_checksum_ordered): Likewise.
27585 (same_dw_val_p, size_of_die): Likewise.
27586 (value_format, output_die): Likewise.
27587 (add_high_low_attributes): Use add_AT_symview for entry_view.
27588 (dwarf2out_finish): Reset symview_upper_bound, clear
27589 zero_view_p.
27590
27591 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
27592
27593 PR target/83969
27594 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
27595 Add strict argument and use it.
27596 (rs6000_split_multireg_move): Update for new strict argument.
27597 (mem_operand_gpr): Disallow all non-offsettable addresses.
27598 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
27599
27600 2018-03-09 Jakub Jelinek <jakub@redhat.com>
27601
27602 PR target/84772
27603 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
27604 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
27605 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
27606
27607 PR c++/84767
27608 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
27609 decl, use remap_type if we want to use the type.
27610
27611 2018-03-09 Martin Sebor <msebor@redhat.com>
27612
27613 PR tree-optimization/84526
27614 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27615 Remove dead code.
27616 (builtin_access::generic_overlap): Be prepared to handle non-array
27617 base objects.
27618
27619 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
27620
27621 PR rtl-optimization/84682
27622 * lra-constraints.c (process_address_1): Check is_address flag
27623 for address constraints.
27624 (process_alt_operands): Likewise.
27625 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
27626 preprocess_constraints.
27627 * recog.h (preprocess_constraints): Add oploc parameter.
27628 Adjust callers.
27629 * recog.c (preprocess_constraints): Test address_operand for
27630 CT_ADDRESS constraints.
27631
27632 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27633
27634 PR target/83712
27635 * lra-assigns.c (assign_by_spills): Return a flag of reload
27636 assignment failure. Do not process the reload assignment
27637 failures. Do not spill other reload pseudos if they has the same
27638 reg class.
27639 (lra_assign): Add a return arg. Set up from the result of
27640 assign_by_spills call.
27641 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27642 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27643 usage_insns if it is not NULL.
27644 (spill_hard_reg_in_range): New function.
27645 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27646 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27647 function prototypes.
27648 (lra_assign): Change prototype.
27649 * lra.c (lra): Add code to deal with fails by splitting hard reg
27650 live ranges.
27651
27652 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27653
27654 PR target/83193
27655 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
27656 Accept complain bool parameter. Only emit errors if it is true.
27657 (arm_parse_cpu_option_name): Likewise.
27658 (arm_target_thumb_only): Adjust callers of the above.
27659 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
27660 prototype to take a default true bool parameter.
27661 (arm_parse_arch_option_name): Likewise.
27662
27663 2018-03-09 David Malcolm <dmalcolm@redhat.com>
27664 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
27665
27666 PR jit/64089
27667 PR jit/84288
27668 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
27669 * configure: Regenerate.
27670 * configure.ac ("linker --version-script option"): New.
27671 ("linker soname option"): New.
27672
27673 2018-03-09 Richard Biener <rguenther@suse.de>
27674
27675 PR tree-optimization/84775
27676 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
27677 immediate uses of predicate stmts and mark them modified.
27678
27679 Revert
27680 PR tree-optimization/84178
27681 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27682 to caller.
27683 (version_loop_for_if_conversion): Delay update_ssa call.
27684 (tree_if_conversion): Delay update_ssa until after predicate
27685 insertion.
27686
27687 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
27688
27689 PR target/84763
27690 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
27691 when the function accesses prior frames.
27692
27693 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27694
27695 PR debug/84456
27696 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
27697 gen_llsym, otherwise call maybe_gen_llsym.
27698
27699 PR inline-asm/84742
27700 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
27701 has ',' character inside of it.
27702
27703 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27704
27705 PR target/84748
27706 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
27707 as clobbering CC_REGNUM.
27708
27709 2018-03-08 Richard Biener <rguenther@suse.de>
27710
27711 PR middle-end/84552
27712 * tree-scalar-evolution.c: Include tree-into-ssa.h.
27713 (follow_copies_to_constant): Do not follow SSA names registered
27714 for update.
27715
27716 2018-03-08 Richard Biener <rguenther@suse.de>
27717
27718 PR tree-optimization/84178
27719 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27720 to caller.
27721 (version_loop_for_if_conversion): Delay update_ssa call.
27722 (tree_if_conversion): Delay update_ssa until after predicate
27723 insertion.
27724
27725 2018-03-08 David Malcolm <dmalcolm@redhat.com>
27726
27727 PR tree-optimization/84178
27728 * tree-if-conv.c (release_bb_predicate): Remove the
27729 the assertion that the stmts have NULL use_ops.
27730 Discard the statements, asserting that they haven't
27731 yet been added to a BB.
27732
27733 2018-03-08 Richard Biener <rguenther@suse.de>
27734
27735 PR tree-optimization/84746
27736 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
27737 (phi_translate): Pass in destination ANTIC_OUT set.
27738 (phi_translate_1): Likewise. For a simplified result lookup
27739 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
27740 (phi_translate_set): Adjust.
27741 (do_pre_regular_insertion): Likewise.
27742 (do_pre_partial_partial_insertion): Likewise.
27743
27744 2018-03-08 Martin Liska <mliska@suse.cz>
27745
27746 PR gcov-profile/84735
27747 * doc/gcov.texi: Document usage of profile files.
27748 * gcov-io.h: Document changes in the format.
27749
27750 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
27751
27752 PR debug/84404
27753 PR debug/84408
27754 * dwarf2out.c (struct dw_line_info_table): Update comments for
27755 view == -1.
27756 (FORCE_RESET_NEXT_VIEW): New.
27757 (FORCE_RESETTING_VIEW_P): New.
27758 (RESETTING_VIEW_P): Check for -1 too.
27759 (ZERO_VIEW_P): Likewise.
27760 (new_line_info_table): Force-reset next view.
27761 (dwarf2out_begin_function): Likewise.
27762 (dwarf2out_source_line): Simplify zero_view_p initialization.
27763 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
27764 view directly. Omit view when omitting .loc at line 0.
27765
27766 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27767
27768 PR tree-optimization/84740
27769 * tree-switch-conversion.c (process_switch): Call build_constructors
27770 only if info.phi_count is non-zero.
27771
27772 PR tree-optimization/84739
27773 * tree-tailcall.c (find_tail_calls): Check call arguments against
27774 DECL_ARGUMENTS (current_function_decl) rather than
27775 DECL_ARGUMENTS (func) when checking for tail recursion.
27776
27777 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27778
27779 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
27780 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
27781 Volker Reichelt's entry and add entries for people that perform
27782 GCC fuzzy testing and report numerous bugs.
27783
27784 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
27785
27786 PR target/82411
27787 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
27788 readonly data in sdata, if that is disabled.
27789 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
27790 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
27791 -mreadonly-in-sdata option.
27792
27793 2018-03-07 Martin Sebor <msebor@redhat.com>
27794
27795 PR tree-optimization/84468
27796 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
27797 basic block when looking for nul assignment.
27798
27799 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
27800
27801 PR target/84277
27802 * except.h (output_function_exception_table): Adjust prototype.
27803 * except.c (output_function_exception_table): Remove FNNAME parameter
27804 and add SECTION parameter. Ouput one part of the table at a time.
27805 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
27806 the first part of the exception table and emit unwind directives.
27807 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
27808 (i386_pe_seh_cold_init): Likewise.
27809 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
27810 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
27811 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
27812 (ix86_output_call_insn): Emit a nop in one more case for SEH.
27813 * config/i386/winnt.c: Include except.h.
27814 (struct seh_frame_state): Add reg_offset, after_prologue and
27815 in_cold_section fields.
27816 (i386_pe_seh_end_prologue): Set seh->after_prologue.
27817 (i386_pe_seh_cold_init): New function.
27818 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
27819 to seh->in_cold_section.
27820 (seh_emit_push): Record the offset of the push.
27821 (seh_emit_save): Record the offet of the save.
27822 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
27823 Test seh->after_prologue to disregard the epilogue.
27824 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
27825 (i386_pe_end_cold_function): New function.
27826
27827 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27828
27829 PR fortran/84565
27830 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
27831 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
27832
27833 PR c++/84704
27834 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
27835 on tmp_var.
27836 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
27837 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
27838
27839 PR middle-end/84723
27840 * multiple_target.c: Include tree-inline.h and intl.h.
27841 (expand_target_clones): Diagnose and fail if node->definition and
27842 !tree_versionable_function_p (node->decl).
27843
27844 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
27845
27846 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
27847 sprint_ul.
27848 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
27849 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
27850 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
27851
27852 2018-03-06 Jakub Jelinek <jakub@redhat.com>
27853
27854 PR target/84710
27855 * combine.c (try_combine): Use reg_or_subregno instead of handling
27856 just paradoxical SUBREGs and REGs.
27857
27858 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
27859
27860 * config/arc/arc.c (arc_finalize_pic): Remove function.
27861 (arc_must_save_register): We use single base PIC register, remove
27862 checks to save/restore the PIC register.
27863 (arc_expand_prologue): Likewise.
27864 * config/arc/arc-protos.h (arc_set_default_type_attributes):
27865 Remove.
27866 (arc_verify_short): Likewise.
27867 (arc_attr_type): Likewise.
27868 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
27869 (walk_stores): Likewise.
27870 (arc_address_cost): Make it static.
27871 (arc_verify_short): Likewise.
27872 (branch_dest): Likewise.
27873 (arc_attr_type): Likewise.
27874 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
27875 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
27876 (arc_final_prescan_insn): Remove inserting the nops due to
27877 hardware hazards. It is done in reorg step.
27878 (insn_length_variant_t): Remove.
27879 (insn_length_parameters_t): Likewise.
27880 (arc_insn_length_parameters): Likewise.
27881 (arc_get_insn_variants): Likewise.
27882 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
27883
27884 2018-03-06 Jakub Jelinek <jakub@redhat.com>
27885
27886 PR inline-asm/84683
27887 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
27888 assertion failure.
27889
27890 PR tree-optimization/84687
27891 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
27892 on new_node->decl.
27893 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
27894
27895 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27896
27897 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
27898 Rename to ppc_speculation_barrier.
27899 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
27900 __builtin_ppc_speculation_barrier.
27901
27902 2018-03-05 Jakub Jelinek <jakub@redhat.com>
27903
27904 PR target/84700
27905 * combine.c (combine_simplify_rtx): Don't try to simplify if
27906 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
27907 are equal to x.
27908
27909 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
27910
27911 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
27912 to 32 bytes when compiling for POWER9.
27913
27914 2018-03-05 Jakub Jelinek <jakub@redhat.com>
27915
27916 PR target/84564
27917 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
27918 regparm >= 3 with no arg reg available also for calls with
27919 flag_force_indirect_call. Pass decl to ix86_function_regparm.
27920
27921 PR target/84524
27922 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
27923 orig,vex.
27924 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
27925
27926 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
27927
27928 PR target/84264
27929 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
27930
27931 2018-03-05 Richard Biener <rguenther@suse.de>
27932
27933 PR tree-optimization/84486
27934 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
27935 When inserting a __builtin_assume_aligned call set the LHS
27936 SSA name alignment info accordingly.
27937
27938 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
27939
27940 PR tree-optimization/84114
27941 * config/aarch64/aarch64.c (aarch64_reassociation_width)
27942 Avoid reassociation of FLOAT_MODE addition.
27943
27944 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
27945
27946 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
27947 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
27948 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
27949 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
27950 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
27951 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
27952 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
27953 and -mwbnoinvd.
27954 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
27955 __builtin_ia32_wbinvd): New builtins.
27956 (SPECIAL_ARGS2): New.
27957 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
27958 (SPECIAL_ARGS2): New.
27959 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
27960 (ix86_valid_target_attribute_inner_p): Ditto.
27961 (ix86_init_mmx_sse_builtins): Add special_args2.
27962 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
27963 TARGET_WBNOINVD_P): New.
27964 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
27965 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
27966 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
27967 * config/i386/immintrin.h (_wbinvd): New intrinsic.
27968 * config/i386/pconfigintrin.h: New file.
27969 * config/i386/wbnoinvdintrin.h: Ditto.
27970 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
27971 wbnoinvdintrin.h.
27972 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
27973
27974 2018-03-05 Richard Biener <rguenther@suse.de>
27975
27976 PR tree-optimization/84670
27977 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
27978 member.
27979 (BB_VISITED_WITH_VISITED_SUCCS): New define.
27980 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
27981 (compute_antic_aux): Only assert the number of values in ANTIC_IN
27982 doesn't grow if all successors (recursively) were visited at least
27983 once.
27984
27985 2018-03-05 Richard Biener <rguenther@suse.de>
27986
27987 PR tree-optimization/84650
27988 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
27989 if executed in the loop pipeline.
27990
27991 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
27992
27993 * doc/configfiles.texi (Configuration Files): Move info about
27994 conditionalizing $target-protos.h to...
27995 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
27996 differs from $target-protos.h.
27997
27998 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
27999 Chung-Ju Wu <jasonwucj@gmail.com>
28000
28001 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
28002 * config/nds32/nds32-multiple.md (setmemsi): Define.
28003 * config/nds32/nds32-memory-manipulation.c
28004 (nds32_gen_dup_4_byte_to_word_value): New.
28005 (emit_setmem_word_loop): New.
28006 (emit_setmem_byte_loop): New.
28007 (nds32_expand_setmem_loop): New.
28008 (nds32_expand_setmem_loop_v3m): New.
28009 (nds32_expand_setmem_unroll): New.
28010 (nds32_expand_setmem): New.
28011
28012 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28013 Chung-Ju Wu <jasonwucj@gmail.com>
28014
28015 * config/nds32/nds32-memory-manipulation.c
28016 (nds32_emit_load_store): New.
28017 (nds32_emit_post_inc_load_store): New.
28018 (nds32_emit_mem_move): New.
28019 (nds32_emit_mem_move_block): New.
28020 (nds32_expand_movmemsi_loop_unknown_size): New.
28021 (nds32_expand_movmemsi_loop_known_size): New.
28022 (nds32_expand_movmemsi_loop): New.
28023 (nds32_expand_movmemsi_unroll): New.
28024 (nds32_expand_movmemqi): Rename ...
28025 (nds32_expand_movmemsi): ... to this.
28026 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
28027 (movmemsi): ... to this.
28028 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
28029 (nds32_expand_movmemsi): ... to this.
28030
28031 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28032 Monk Chiang <sh.chiang04@gmail.com>
28033 Chung-Ju Wu <jasonwucj@gmail.com>
28034
28035 * config/nds32/nds32-protos.h
28036 (nds32_expand_load_multiple): New arguments.
28037 (nds32_expand_store_multiple): Ditto.
28038 (nds32_valid_multiple_load_store): Rename ...
28039 (nds32_valid_multiple_load_store_p): ... to this.
28040 * config/nds32/nds32-memory-manipulation.c
28041 (nds32_expand_load_multiple): Refine implementation.
28042 (nds32_expand_store_multiple): Ditto.
28043 * config/nds32/nds32-multiple.md
28044 (load_multiple): Update nds32_expand_load_multiple interface.
28045 (store_multiple): Update nds32_expand_store_multiple interface.
28046 * config/nds32/nds32-predicates.c
28047 (nds32_valid_multiple_load_store): Rename ...
28048 (nds32_valid_multiple_load_store_p): ... to this and refine
28049 implementation.
28050 * config/nds32/predicates.md
28051 (nds32_load_multiple_and_update_address_operation): New predicate.
28052 (nds32_store_multiple_and_update_address_operation): New predicate.
28053
28054 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28055 Chung-Ju Wu <jasonwucj@gmail.com>
28056
28057 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
28058 (combo): New attribute.
28059 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
28060
28061 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
28062
28063 * config/nds32/nds32.opt: Change -mcmodel= default value.
28064
28065 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
28066 Monk Chiang <sh.chiang04@gmail.com>
28067 Chung-Ju Wu <jasonwucj@gmail.com>
28068
28069 * config/nds32/constants.md (unspec_element): New enum.
28070 * config/nds32/constraints.md (Umw): New constraint.
28071 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
28072 * config/nds32/nds32-intrinsic.md: Likewise.
28073 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
28074 (nds32_valid_smw_lwm_base_p): New.
28075 (nds32_output_smw_single_word): New.
28076 (nds32_output_lmw_single_word): New.
28077 (nds32_expand_unaligned_load): New.
28078 (nds32_expand_unaligned_store): New.
28079 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
28080 (nds32_output_smw_single_word): Declare.
28081 (nds32_output_lmw_single_word): Declare.
28082 (nds32_expand_unaligned_load): Declare.
28083 (nds32_expand_unaligned_store): Declare.
28084 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
28085 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
28086 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
28087 NDS32_BUILTIN_UASTORE_DW.
28088 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
28089 predicate.
28090
28091 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
28092 Kito Cheng <kito.cheng@gmail.com>
28093 Chung-Ju Wu <jasonwucj@gmail.com>
28094
28095 * config/nds32/nds32-intrinsic.c
28096 (nds32_expand_builtin_null_ftype_reg): Delete.
28097 (nds32_expand_builtin_reg_ftype_imm): Ditto.
28098 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
28099 (nds32_read_argument): New.
28100 (nds32_legitimize_target): Ditto.
28101 (nds32_legitimize_argument): Ditto.
28102 (nds32_check_constant_argument): Ditto.
28103 (nds32_expand_unop_builtin): Ditto.
28104 (nds32_expand_unopimm_builtin): Ditto.
28105 (nds32_expand_binop_builtin): Ditto.
28106 (nds32_builtin_decl_impl): Ditto.
28107 (builtin_description): Ditto.
28108 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
28109 (nds32_init_builtins_impl): Ditto.
28110 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
28111 (nds32_builtin_decl): New.
28112 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
28113 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
28114
28115 2018-03-02 Jeff Law <law@redhat.com>
28116
28117 * reorg.c (stop_search_p): Handle DEBUG_INSN.
28118 (redundant_insn, fill_simple_delay_slots): Likewise.
28119 (fill_slots_from_thread): Likewise.
28120 * resource.c (mark_referenced_resources): Likewise.
28121 (mark_set_resources, find_dead_or_set_registers): Likewise.
28122
28123 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28124
28125 * substring-locations.h (format_warning_va): Formatting fix for
28126 ATTRIBUTE_GCC_DIAG.
28127 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
28128 argument.
28129 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
28130 * substring-locations.c: Include intl.h.
28131 (format_warning_va): Turned into small wrapper around
28132 format_warning_n_va, renamed to ...
28133 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
28134 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
28135 use ngettext.
28136 (format_warning_at_substring_n): New function.
28137 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
28138 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
28139 format_warning_at_substring with just a shorter name instead of
28140 const function pointer.
28141 (fmtwarn_n): New function.
28142 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
28143 appropriate, get rid of all the fmtstr temporaries, move conditionals
28144 with G_() wrapped string literals directly into fmtwarn arguments,
28145 cast dir.len to (int), formatting fixes.
28146
28147 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
28148
28149 * doc/invoke.texi: Remove "Cilk Plus" references.
28150
28151 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28152 Richard Biener <rguenther@suse.de>
28153
28154 PR ipa/84628
28155 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
28156 for error or warning attributes if CALL_FROM_THUNK_P is set.
28157 Formatting fixes.
28158
28159 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28160
28161 PR target/56540
28162 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
28163 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
28164
28165 PR target/56540
28166 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
28167 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
28168
28169 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
28170 instead of -1U in last predictors element's probability member.
28171
28172 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
28173
28174 PR ipa/83983
28175 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
28176 arguments if they are comparable.
28177
28178 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28179
28180 PR tree-optimization/84634
28181 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
28182 masks and masked_loop_p with a single loop_masks, making sure it's
28183 null for bb vectorization.
28184
28185 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28186
28187 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
28188 (vect_analyze_data_ref_access): Use loop->safe_len rather than
28189 loop->force_vectorize to check whether there is no alias.
28190
28191 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28192
28193 PR target/84614
28194 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
28195 prototypes.
28196 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
28197 comments.
28198 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
28199 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
28200 instead of a loop around prev_real_insn.
28201 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
28202 prev_real_insn.
28203
28204 PR inline-asm/84625
28205 * config/i386/i386.c (ix86_print_operand): Use conditional
28206 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
28207 zero vector.
28208
28209 2018-03-02 Richard Biener <rguenther@suse.de>
28210
28211 PR tree-optimization/84427
28212 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
28213 (bitmap_set_subtract_values): Rewrite to handle multiple
28214 exprs per value.
28215 (clean): Likewise.
28216 (prune_clobbered_mems): Likewise.
28217 (phi_translate): Take edge instead of pred/phiblock.
28218 (phi_translate_1): Likewise.
28219 (phi_translate_set): Likewise. Insert all translated
28220 exprs for a value into the set, keeping possibly multiple
28221 expressions per value.
28222 (compute_antic_aux): Adjust for phi_translate changes.
28223 When intersecting union the expressions and prune those
28224 not in the final value set, keeping possibly multiple
28225 expressions per value. Do not use value-insertion
28226 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
28227 all expressions. Add verification that the value-sets
28228 only shrink during iteration.
28229 (compute_partial_antic_aux): Adjust for the phi_translate changes.
28230 (do_pre_regular_insertion): Likewise.
28231 (do_pre_partial_partial_insertion): Likewise.
28232
28233 2018-03-02 Richard Biener <rguenther@suse.de>
28234
28235 PR target/82005
28236 * config/darwin.c (saved_debug_info_level): New static global.
28237 (darwin_asm_lto_start): Disable debug info generation for LTO out.
28238 (darwin_asm_lto_end): Restore debug info generation settings.
28239
28240 2018-03-01 Martin Liska <mliska@suse.cz>
28241
28242 PR sanitizer/82484
28243 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
28244 volatile arguments.
28245
28246 2018-03-01 Richard Biener <rguenther@suse.de>
28247
28248 PR debug/84645
28249 * dwarf2out.c (gen_variable_die): Properly handle late VLA
28250 type annotation with LTO when debug was disabled at compile-time.
28251
28252 2018-03-01 Matthew Fortune <mfortune@gmail.com>
28253
28254 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
28255 XINT with INTVAL.
28256 (mips_final_postscan_insn): Likewise.
28257
28258 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
28259
28260 PR rtl-optimization/84528
28261 * alias.c (init_alias_target): Add commentary.
28262 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
28263 a unique base value if the frame pointer is not eliminated
28264 to the stack pointer.
28265
28266 2018-03-01 Tom de Vries <tom@codesourcery.com>
28267
28268 PR rtl-optimization/83327
28269 * lra-int.h (hard_regs_spilled_into): Declare.
28270 * lra.c (hard_regs_spilled_into): Define.
28271 (init_reg_info): Init hard_regs_spilled_into.
28272 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
28273 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
28274 (process_bb_lives): Handle hard_regs_spilled_into.
28275 (lra_create_live_ranges_1): Before doing liveness propagation, clear
28276 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
28277
28278 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
28279
28280 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
28281 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
28282 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
28283 * config/rs6000/aix72.h: New file.
28284
28285 2018-02-28 Jakub Jelinek <jakub@redhat.com>
28286
28287 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
28288 instead of warning_at with conditional singular and plural messages
28289 where possible.
28290
28291 PR target/52991
28292 * stor-layout.c (update_alignment_for_field): For
28293 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
28294 && !DECL_PACKED (field), do the alignment update, just use
28295 only desired_align instead of MAX (type_align, desired_align)
28296 as the alignment.
28297 (place_field): Don't do known_align < desired_align handling
28298 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
28299 is non-NULL, instead do it after rli->prev_field handling and
28300 only if not within a bitfield word. For DECL_PACKED (field)
28301 use type_align of BITS_PER_UNIT.
28302
28303 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
28304
28305 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
28306 superfluous parentheses and trailing spaces.
28307
28308 2018-02-28 Richard Biener <rguenther@suse.de>
28309
28310 PR tree-optimization/84584
28311 * graphite-scop-detection.c (scop_detection::add_scop): Discard
28312 SCoPs with fake exit edge.
28313
28314 2018-02-28 Martin Liska <mliska@suse.cz>
28315
28316 PR testsuite/84597
28317 * timevar.c (timer::print): Fix format to properly print 100%
28318 values.
28319
28320 2018-02-28 Richard Biener <rguenther@suse.de>
28321
28322 PR middle-end/84607
28323 * genmatch.c (capture_info::walk_match): Do not mark
28324 captured expressions without operands as expr_p given
28325 they act more like predicates and should be subject to
28326 "lost tail" side-effect preserving.
28327
28328 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
28329
28330 PR rtl-optimization/81611
28331 * auto-inc-dec.c (attempt_change): Move dead note from
28332 mem_insn if it's the next use of regno
28333 (find_address): Take address use of reg holding
28334 non-incremented value. Add parm to limit search to the named
28335 reg only.
28336 (merge_in_block): Attempt to use a mem insn that is the next
28337 use of the original regno.
28338
28339 2018-02-27 Martin Sebor <msebor@redhat.com>
28340
28341 PR c++/83871
28342 * doc/invoke.texi (-Wmissing-attributes): New option.
28343 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
28344
28345 2018-02-27 Martin Sebor <msebor@redhat.com>
28346
28347 PR translation/84207
28348 * diagnostic-core.h (warning_n, error_n, inform_n): Change
28349 n argument to unsigned HOST_WIDE_INT.
28350 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
28351 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
28352 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
28353 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
28354
28355 2018-02-27 Richard Biener <rguenther@suse.de>
28356
28357 PR tree-optimization/84512
28358 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
28359 Do not use the estimate returned from record_stmt_cost for
28360 the scalar iteration cost but sum properly using add_stmt_cost.
28361
28362 2018-02-27 Richard Biener <rguenther@suse.de>
28363
28364 PR tree-optimization/84466
28365 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
28366 Adjust last change to less strictly validate use operands.
28367
28368 2018-02-27 Martin Liska <mliska@suse.cz>
28369
28370 PR gcov-profile/84548
28371 * gcov.c (process_file): Allow partial overlap and consider it
28372 also as group functions.
28373 (output_lines): Properly calculate range of lines for a group.
28374
28375 2018-02-27 Martin Liska <mliska@suse.cz>
28376
28377 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
28378 'ggc' suffixes. Change first column width.
28379 (timer::print): Fix formatting of the column.
28380
28381 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
28382
28383 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
28384 preserve inline entry blocks for the sake of debug inline
28385 entry point markers alone.
28386 (remove_unused_locals): Suggest in comments a better place to
28387 force the preservation of inline entry blocks that are
28388 otherwise unused, but do not preserve them.
28389
28390 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28391
28392 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
28393
28394 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28395
28396 PR target/84039
28397 * config/i386/constraints.md (Bs): Replace
28398 ix86_indirect_branch_register with
28399 TARGET_INDIRECT_BRANCH_REGISTER.
28400 (Bw): Likewise.
28401 * config/i386/i386.md (indirect_jump): Likewise.
28402 (tablejump): Likewise.
28403 (*sibcall_memory): Likewise.
28404 (*sibcall_value_memory): Likewise.
28405 Peepholes of indirect call and jump via memory: Likewise.
28406 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
28407 (*sibcall_value_GOT_32): Likewise.
28408 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28409 (GOT_memory_operand): Likewise.
28410 (call_insn_operand): Likewise.
28411 (sibcall_insn_operand): Likewise.
28412 (GOT32_symbol_operand): Likewise.
28413 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
28414
28415 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28416
28417 PR rtl-optimization/83496
28418 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
28419 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
28420 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
28421 redundant insn, if any.
28422 (relax_delay_slots): Likewise.
28423 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
28424
28425 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
28426
28427 PR tree-optimization/83965
28428 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
28429 that grouped statements are part of a reduction chain. Return
28430 true if the statement is not marked as a reduction itself but
28431 is part of a group.
28432 (vect_recog_dot_prod_pattern): Don't check whether the statement
28433 is part of a group here.
28434 (vect_recog_sad_pattern): Likewise.
28435 (vect_recog_widen_sum_pattern): Likewise.
28436
28437 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28438
28439 PR debug/84545
28440 * final.c (rest_of_clean_state): Also look for calls inside sequences.
28441
28442 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28443
28444 PR target/84530
28445 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
28446 the bool argument.
28447 (ix86_output_indirect_function_return): New prototype.
28448 (ix86_split_simple_return_pop_internal): Likewise.
28449 * config/i386/i386.c (indirect_return_via_cx): New.
28450 (indirect_return_via_cx_bnd): Likewise.
28451 (indirect_thunk_name): Handle return va CX_REG.
28452 (output_indirect_thunk_function): Create alias for
28453 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
28454 (ix86_output_indirect_jmp): Remove the bool argument.
28455 (ix86_output_indirect_function_return): New function.
28456 (ix86_split_simple_return_pop_internal): Likewise.
28457 * config/i386/i386.md (*indirect_jump): Don't pass false
28458 to ix86_output_indirect_jmp.
28459 (*tablejump_1): Likewise.
28460 (simple_return_pop_internal): Change it to define_insn_and_split.
28461 Call ix86_split_simple_return_pop_internal to split it for
28462 -mfunction-return=.
28463 (simple_return_indirect_internal): Call
28464 ix86_output_indirect_function_return instead of
28465 ix86_output_indirect_jmp.
28466
28467 2018-02-26 Jakub Jelinek <jakub@redhat.com>
28468
28469 PR bootstrap/84405
28470 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
28471 memset and value initialization afterwards.
28472
28473 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
28474
28475 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
28476
28477 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
28478
28479 PR target/84521
28480 * common/config/aarch64/aarch64-common.c
28481 (aarch_option_optimization_table[]): Switch
28482 off fomit-frame-pointer
28483
28484 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28485 Chung-Ju Wu <jasonwucj@gmail.com>
28486
28487 * config/nds32/nds32-multiple.md (load_multiple): Disallow
28488 volatile memory.
28489 (store_multiple): Ditto.
28490
28491 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28492
28493 * config.gcc: Add --with-cpu support for nds32 target.
28494 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
28495 * config/nds32/nds32.opt: Add -mcpu= option.
28496
28497 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
28498
28499 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
28500 isel=yes): Warn for these deprecated options.
28501
28502 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
28503
28504 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
28505 ISA_2_5_MASKS_EMBEDDED.
28506
28507 2018-02-23 Jakub Jelinek <jakub@redhat.com>
28508
28509 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
28510 p->max as pointers rather than using iterative_hash_expr.
28511
28512 2018-02-23 Carl Love <cel@us.ibm.com>
28513
28514 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
28515 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
28516 BU_P8V_OVERLOAD_2.
28517 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
28518 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
28519 P8V_BUILTIN_VEC_VUNSIGNED2.
28520
28521 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
28522
28523 PR target/81572
28524 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
28525 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
28526 LRA_UNKNOWN_ALT.
28527 * lra-constraints.c (curr_insn_transform): Set up
28528 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
28529 LRA_UNKNOWN_ALT.
28530 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
28531 * lra-eliminations.c (spill_pseudos): Ditto.
28532 (process_insn_for_elimination): Ditto.
28533 * lra-lives.c (reg_early_clobber_p): Use the new macros.
28534 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
28535 LRA_NON_CLOBBERED_ALT.
28536
28537 2018-02-22 Martin Sebor <msebor@redhat.com>
28538
28539 PR tree-optimization/84480
28540 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
28541 to maybe_diag_stxncpy_trunc. Call it.
28542 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
28543 from gimple_fold_builtin_strcpy. Print inlining stack.
28544 (handle_builtin_stxncpy): Print inlining stack.
28545 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
28546
28547 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
28548
28549 PR target/84176
28550 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
28551 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
28552 and -fcheck-pointer-bounds are used together.
28553 (indirect_thunk_prefix): New enum.
28554 (indirect_thunk_need_prefix): New function.
28555 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
28556 "_nt" instead of "_bnd" for NOTRACK prefix.
28557 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
28558 (output_indirect_thunk_function): Likewise.
28559 (): Likewise.
28560 (ix86_code_end): Update output_indirect_thunk_function calls.
28561 (ix86_output_indirect_branch_via_reg): Replace
28562 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
28563 (ix86_output_indirect_branch_via_push): Likewise.
28564 (ix86_output_function_return): Likewise.
28565 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
28566 incompatible with -fcf-protection=branch and
28567 -fcheck-pointer-bounds.
28568
28569 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28570
28571 PR target/83335
28572 * config/aarch64/aarch64.c (aarch64_print_address_internal):
28573 Change gcc_assert call to output_operand_lossage.
28574
28575 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28576
28577 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
28578
28579 2018-02-22 DJ Delorie <dj@redhat.com>
28580 Sebastian Perta <sebastian.perta@renesas.com>
28581 Oleg Endo <olegendo@gcc.gnu.org>
28582
28583 * config/rx/rx.c (rx_rtx_costs): New function.
28584 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
28585
28586 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
28587
28588 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
28589
28590 2018-02-22 Martin Liska <mliska@suse.cz>
28591
28592 PR driver/83193
28593 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
28594 Add "native" as a possible value.
28595
28596 2018-02-22 Martin Liska <mliska@suse.cz>
28597
28598 PR driver/83193
28599 * config/i386/i386.c (ix86_option_override_internal):
28600 Add "native" as a possible value for -march and -mtune.
28601
28602 2018-02-22 Jakub Jelinek <jakub@redhat.com>
28603
28604 PR target/84502
28605 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
28606 to all type variants.
28607
28608 PR tree-optimization/84503
28609 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
28610 width as info->bitpos + info->bitsize - start.
28611 (merged_store_group::merge_overlapping): Simplify width computation.
28612 (check_no_overlap): New function.
28613 (imm_store_chain_info::try_coalesce_bswap): Compute expected
28614 start + width and last_order of the group, fail if check_no_overlap
28615 fails.
28616 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
28617 to group if check_no_overlap fails.
28618
28619 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28620
28621 * config/rs6000/altivec.md: Delete contraint arguments to
28622 define_expand, define_split, and define_peephole2, and in
28623 define_insn_and_split if always unused.
28624 * config/rs6000/darwin.md: Ditto.
28625 * config/rs6000/dfp.md: Ditto.
28626 * config/rs6000/rs6000.md: Ditto.
28627 * config/rs6000/sync.md: Ditto.
28628 * config/rs6000/vector.md: Ditto.
28629 * config/rs6000/vsx.md: Ditto.
28630
28631 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28632
28633 * config/rs6000/altivec.md: Write output control strings as braced
28634 blocks instead of double-quoted strings.
28635 * config/rs6000/darwin.md: Ditto.
28636 * config/rs6000/rs6000.md: Ditto.
28637 * config/rs6000/vector.md: Ditto.
28638 * config/rs6000/vsx.md: Ditto.
28639
28640 2018-02-21 Jason Merrill <jason@redhat.com>
28641
28642 PR c++/84314 - ICE with templates and fastcall attribute.
28643 * attribs.c (build_type_attribute_qual_variant): Remove assert.
28644
28645 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28646
28647 * ipa-cp.c (determine_versionability): Fix comment typos.
28648
28649 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28650
28651 PR c/84229
28652 * ipa-cp.c (determine_versionability): Do not version functions caling
28653 va_arg_pack.
28654
28655 2018-02-21 Martin Liska <mliska@suse.cz>
28656
28657 PR driver/83193
28658 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
28659 Add "native" as a possible value.
28660 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
28661 the macro when native cpu detection is available.
28662
28663 2018-02-21 Martin Liska <mliska@suse.cz>
28664
28665 PR driver/83193
28666 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
28667 Add "native" as a possible value.
28668 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
28669 when native cpu detection is available.
28670
28671 2018-02-21 Jakub Jelinek <jakub@redhat.com>
28672 Martin Sebor <msebor@redhat.com>
28673
28674 PR tree-optimization/84478
28675 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
28676 false.
28677 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
28678 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
28679 support which is conservatively correct, for 2 only stay conservative
28680 for maxlen. Formatting and comment capitalization fixes. Add STRICT
28681 argument to the 2 argument get_range_strlen, adjust 6 arg
28682 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
28683 false.
28684 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
28685 (gimple_fold_builtin_strlen): Pass true as last argument to
28686 get_range_strlen.
28687
28688 2018-02-20 Martin Sebor <msebor@redhat.com>
28689
28690 PR middle-end/84095
28691 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
28692 (builtin_memref::set_base_and_offset): Same. Handle inner references.
28693 (builtin_memref::builtin_memref): Factor out parts into
28694 set_base_and_offset and call it.
28695
28696 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28697
28698 PR middle-end/84406
28699 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
28700 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
28701 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
28702 search at the associated MODE_INT.
28703
28704 2018-02-20 Jeff Law <law@redhat.com>
28705
28706 PR middle-end/82123
28707 PR tree-optimization/81592
28708 PR middle-end/79257
28709 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
28710 for range data rather than using global data.
28711 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
28712 range data rather than using global data.
28713 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
28714 pass it to children as needed.
28715 (struct directive::fmtresult): Similarly.
28716 (struct directive::set_width): Similarly.
28717 (struct directive::set_precision): Similarly.
28718 (format_integer, format_directive, parse_directive): Similarly.
28719 (format_none): Accept unnamed vr_values parameter.
28720 (format_percent, format_floating, format_character): Similarly.
28721 (format_string, format_plain): Similarly.
28722 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
28723 the EVRP range analyzer for range data rather than using global data.
28724 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
28725 gimple-ssa-evrp-analyze.h
28726 (class sprintf_dom_walker): Add after_dom_children member function.
28727 Add evrp_range_analyzer member.
28728 (sprintf_dom_walker::before_dom_children): Call into the EVRP
28729 range analyzer as needed.
28730 (sprintf_dom_walker::after_dom_children): New member function.
28731 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
28732 if not optimizing.
28733 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
28734 (evrp_range_analyzer::pop_to_marker): Likewise.
28735
28736 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28737
28738 PR tree-optimization/84419
28739 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
28740 with the required type if its current type is compatible but
28741 different.
28742
28743 2018-02-20 Jakub Jelinek <jakub@redhat.com>
28744
28745 PR middle-end/82004
28746 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
28747 after vectorization.
28748
28749 2018-02-20 Martin Liska <mliska@suse.cz>
28750
28751 PR driver/83193
28752 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
28753 possible values if we don't have a hint.
28754
28755 2018-02-20 Martin Liska <mliska@suse.cz>
28756
28757 PR c/84310
28758 PR target/79747
28759 * final.c (shorten_branches): Build align_tab array with one
28760 more element.
28761 * opts.c (finish_options): Add alignment option limit check.
28762 (MAX_CODE_ALIGN): Likewise.
28763 (MAX_CODE_ALIGN_VALUE): Likewise.
28764 * doc/invoke.texi: Document maximum allowed option value for
28765 all -falign-* options.
28766
28767 2018-02-19 Jakub Jelinek <jakub@redhat.com>
28768
28769 PR target/84146
28770 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
28771 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
28772 * var-tracking.c (emit_note_insn_var_location): Remove all references
28773 to NOTE_INSN_CALL_ARG_LOCATION.
28774 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
28775 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
28776 Use copy_rtx_if_shared.
28777 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
28778 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
28779 (dwarf2out_var_location): Remove handling of
28780 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
28781 on call_insn.
28782 * final.c (final_scan_insn): Remove all references to
28783 NOTE_INSN_CALL_ARG_LOCATION.
28784 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
28785 before dumping final insns.
28786 * except.c (emit_note_eh_region_end): Remove all references to
28787 NOTE_INSN_CALL_ARG_LOCATION.
28788 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
28789 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
28790 * config/arc/arc.c (hwloop_optimize): Likewise.
28791 * config/arm/arm.c (create_fix_barrier): Likewise.
28792 * config/s390/s390.c (s390_chunkify_start): Likewise.
28793 * config/sh/sh.c (find_barrier): Likewise.
28794 * config/i386/i386.c (rest_of_insert_endbranch,
28795 ix86_seh_fixup_eh_fallthru): Likewise.
28796 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
28797 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
28798 * config/frv/frv.c (frv_function_prologue): Likewise.
28799 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
28800 reg note.
28801 (note_outside_basic_block_p): Remove all references to
28802 NOTE_INSN_CALL_ARG_LOCATION.
28803 * gengtype.c (adjust_field_rtx_def): Likewise.
28804 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
28805 Likewise.
28806 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
28807 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
28808
28809 PR c++/84444
28810 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
28811 is ADDR_EXPR.
28812
28813 PR tree-optimization/84452
28814 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
28815 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
28816 is NULL.
28817
28818 2018-02-19 Martin Liska <mliska@suse.cz>
28819
28820 PR sanitizer/82183
28821 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
28822
28823 2018-02-19 Martin Liska <mliska@suse.cz>
28824 Richard Sandiford <richard.sandiford@linaro.org>
28825
28826 PR tree-optimization/82491
28827 * gimple-fold.c (get_base_constructor): Make earlier bail out
28828 to prevent ubsan.
28829
28830 2018-02-19 Carl Love <cel@us.ibm.com>
28831
28832 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
28833 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
28834 BU_P8V_OVERLOAD_1.
28835 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
28836 P8V_BUILTIN_VEC_NEG.
28837
28838 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
28839
28840 * config/rl78/rl78.md (movdf): New define expand.
28841
28842 2018-02-19 Martin Liska <mliska@suse.cz>
28843
28844 PR other/80589
28845 * doc/invoke.texi: Fix typo.
28846 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
28847
28848 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
28849
28850 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
28851 handle rs6000_single_float and rs6000_double_float specially for
28852 e500 family CPUs.
28853
28854 2018-02-16 Jeff Law <law@redhat.com>
28855
28856 * config/rx/rx.c (add_pop_cfi_notes): New function.;
28857 (pop_regs): Use it.
28858
28859 2018-02-16 Jakub Jelinek <jakub@redhat.com>
28860
28861 PR ipa/84425
28862 * ipa-inline.c (inline_small_functions): Fix a typo.
28863
28864 2018-02-16 Nathan Sidwell <nathan@acm.org>
28865
28866 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
28867
28868 2018-02-16 Carl Love <cel@us.ibm.com>
28869
28870 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
28871 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
28872 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
28873 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
28874 expansion to P8V_BUILTIN_VEC_FLOAT2.
28875
28876 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
28877
28878 PR rtl-optimization/70023
28879 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
28880 src_regno into account.
28881
28882 2018-02-16 Carl Love <cel@us.ibm.com>
28883
28884 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
28885 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
28886 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
28887 * config/rs6000/rs6000.c: Remove case statements for
28888 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
28889 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
28890 and P9V_BUILTIN_VEC_VINSERT4B.
28891 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
28892 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
28893 * config/rs6000/vsx.md:
28894 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
28895 vec_insert4b.
28896
28897 2018-02-16 Carl Love <cel@us.ibm.com>
28898
28899 * config/rs6000/altivec.h: Add builtin names vec_extract4b
28900 vec_insert4b.
28901 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
28902 definitions.
28903 * config/rs6000/rs6000-c.c: Add the definitions for
28904 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
28905 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
28906 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
28907 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
28908 definition for insert4b and define insn *insert3b_internal.
28909 * doc/extend.texi: Add documentation for vec_extract4b.
28910
28911 2018-02-16 Nathan Sidwell <nathan@acm.org>
28912
28913 * doc/extend.texi (Backwards Compatibility): Mention friend
28914 injection. Note for-scope is deprecated.
28915 * doc/invoke.texi (-ffriend-injection): Deprecate.
28916
28917 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
28918
28919 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
28920 that moved to I2, also allow destinations that are a paradoxical
28921 subreg (instead of a normal reg).
28922
28923 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
28924
28925 PR target/83831
28926 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
28927 to QImode.
28928
28929 2018-02-16 Richard Biener <rguenther@suse.de>
28930
28931 PR tree-optimization/84037
28932 PR tree-optimization/84016
28933 PR target/82862
28934 * config/i386/i386.c (ix86_builtin_vectorization_cost):
28935 Adjust vec_construct for the fact we need additional higher latency
28936 128bit inserts for AVX256 and AVX512 vector builds.
28937 (ix86_add_stmt_cost): Scale vector construction cost for
28938 elementwise loads.
28939
28940 2018-02-16 Richard Biener <rguenther@suse.de>
28941
28942 PR tree-optimization/84417
28943 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
28944 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
28945 (non_rewritable_lvalue_p): Likewise, use poly-ints.
28946
28947 2018-02-16 Martin Liska <mliska@suse.cz>
28948
28949 PR sanitizer/84307
28950 * internal-fn.def (ASAN_CHECK): Set proper flags.
28951 (ASAN_MARK): Likewise.
28952
28953 2018-02-16 Julia Koval <julia.koval@intel.com>
28954
28955 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
28956 from PTA_CANNONLAKE.
28957
28958 2018-02-16 Jakub Jelinek <jakub@redhat.com>
28959
28960 PR target/84272
28961 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
28962 Use ++iter rather than iter++ for std::list iterators.
28963 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
28964 defer deleting them until all nodes in the forest are processed. Do
28965 free even leaf nodes. Change to_process into auto_vec.
28966
28967 PR bootstrap/84405
28968 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
28969 * vec.h (vec_default_construct): Use memset instead of placement new
28970 if BROKEN_VALUE_INITIALIZATION is defined.
28971 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
28972 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
28973 is defined.
28974
28975 PR rtl-optimization/83723
28976 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
28977 * lra.c (lra_substitute_pseudo): Likewise. If true, use
28978 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
28979 recursive calls.
28980 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
28981 callers.
28982 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
28983
28984 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
28985
28986 PR rtl-optimization/81443
28987 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
28988 from inner REGs to paradoxical SUBREGs.
28989
28990 2018-02-16 Richard Biener <rguenther@suse.de>
28991
28992 PR tree-optimization/84399
28993 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
28994 For operands we can analyze at their definition make sure we can
28995 analyze them at each use as well.
28996
28997 2018-02-16 Richard Biener <rguenther@suse.de>
28998
28999 PR tree-optimization/84190
29000 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
29001 volatile accesses if the decl isn't volatile.
29002
29003 2018-02-15 Jason Merrill <jason@redhat.com>
29004
29005 PR c++/84314 - ICE with templates and fastcall attribute.
29006 * attribs.c (build_type_attribute_qual_variant): Don't clobber
29007 TYPE_CANONICAL on an existing type.
29008
29009 2018-02-15 Jakub Jelinek <jakub@redhat.com>
29010
29011 PR tree-optimization/84383
29012 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
29013 dstoff nor call operand_equal_p if dstbase is NULL.
29014
29015 PR tree-optimization/84334
29016 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
29017 also a CONSTANT_CLASS_P, punt.
29018
29019 2018-02-14 Jim Wilson <jimw@sifive.com>
29020
29021 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
29022 first SMALL_OPERAND check. New local min_second_step. Move assert
29023 to where locals are set. Add TARGET_RVC support.
29024 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
29025
29026 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
29027
29028 * doc/invoke.texi: Correct -Wformat-overflow code sample.
29029
29030 2018-02-14 Martin Sebor <msebor@redhat.com>
29031
29032 PR tree-optimization/83698
29033 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
29034 arrays constrain the offset range to their bounds.
29035 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
29036 (builtin_access::overlap): Avoid setting the size of overlap if it's
29037 already been set.
29038 (maybe_diag_overlap): Also consider arrays when deciding what values
29039 of offsets to include in diagnostics.
29040
29041 2018-02-14 Martin Sebor <msebor@redhat.com>
29042
29043 PR c/84108
29044 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
29045 that correspond to the kind of a declaration.
29046
29047 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
29048
29049 PR target/83984
29050 * config/pa/pa.md: Load address of PIC label using the linkage table
29051 if the label is nonlocal.
29052
29053 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
29054
29055 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
29056 warning message if user requests -maltivec=be.
29057 * doc/invoke.texi: Document deprecation of -maltivec=be.
29058
29059 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
29060
29061 PR target/84220
29062 * config/rs6000/rs6000-c.c: Update definitions for
29063 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
29064 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
29065
29066 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
29067
29068 PR target/84239
29069 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
29070 add _get_ssp intrinsics. Remove argument from
29071 __builtin_ia32_rdssp[d|q].
29072 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
29073 * config/i386/i386-builtin.def: Remove argument from
29074 __builtin_ia32_rdssp[d|q].
29075 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
29076 ix86_expand_special_args_builtin for _rdssp[d|q].
29077 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
29078 Clear register before usage.
29079 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
29080 Add documentation for new _get_ssp and _inc_ssp intrinsics.
29081
29082 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
29083
29084 PR tree-optimization/84357
29085 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
29086 operand 1 of an ARRAY_REF too.
29087
29088 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
29089
29090 PR target/83831
29091 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
29092 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29093 declarations.
29094 (set_of_reg): New struct.
29095 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
29096 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
29097 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29098 functions.
29099 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
29100 Split into bitclr, bitset, bitinvert patterns if appropriate.
29101 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
29102 use rx_fuse_in_memory_bitop.
29103 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
29104 to named insn, correct maximum insn length.
29105
29106 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
29107
29108 PR target/79242
29109 * machmode.def: Define a complex mode for PARTIAL_INT.
29110 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
29111 MODE_PARTIAL_INT.
29112 * doc/rtl.texi: Document CSPImode.
29113 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
29114 handling.
29115 (msp430_hard_regno_nregs_with_padding): Likewise.
29116
29117 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
29118
29119 PR target/84279
29120 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
29121
29122 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
29123
29124 PR rtl-optimization/84169
29125 * combine.c (try_combine): New variable split_i2i3. Set it to true if
29126 we generated a parallel as new i3 and we split that to new i2 and i3
29127 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
29128 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
29129 those to i2, not i1. Partially rewrite this scan code.
29130
29131 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29132
29133 PR c/82210
29134 * stor-layout.c (place_field): For variable length fields, adjust
29135 offset_align afterwards not just based on the field's alignment,
29136 but also on the size.
29137
29138 PR middle-end/84309
29139 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
29140 of exps and logs in the use_exp2 case.
29141
29142 2018-02-13 Jeff Law <law@redhat.com>
29143
29144 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
29145 entry for "vector".
29146
29147 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
29148 ARGS as unused.
29149
29150 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
29151
29152 PR debug/84342
29153 PR debug/84319
29154 * common.opt (gas-loc-support, gas-locview-support): New.
29155 (ginline-points, ginternal-reset-location-views): New.
29156 * doc/invoke.texi: Document them. Use @itemx where intended.
29157 (gvariable-location-views): Adjust.
29158 * target.def (reset_location_view): New.
29159 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
29160 (TARGET_RESET_LOCATION_VIEW): New.
29161 * doc/tm.texi: Rebuilt.
29162 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
29163 (dwarf2out_default_as_locview_support): New.
29164 (output_asm_line_debug_info): Use option variables.
29165 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
29166 (output_loc_list): Likewise.
29167 (add_high_low_attributes): Check option variables.
29168 Don't output entry view attribute in strict mode.
29169 (gen_inlined_subroutine_die): Check option variables.
29170 (dwarf2out_inline_entry): Likewise.
29171 (init_sections_and_labels): Likewise.
29172 (dwarf2out_early_finish): Likewise.
29173 (maybe_reset_location_view): New, from...
29174 (dwarf2out_var_location): ... here. Call it.
29175 * debug.h (dwarf2out_default_as_loc_support): Declare.
29176 (dwarf2out_default_as_locview_support): Declare.
29177 * hooks.c (hook_int_rtx_insn_0): New.
29178 * hooks.h (hook_int_rtx_insn_0): Declare.
29179 * toplev.c (process_options): Take -gas-loc-support and
29180 -gas-locview-support from dwarf2out. Enable
29181 -gvariable-location-views by default only with locview
29182 assembler support. Enable -ginternal-reset-location-views by
29183 default only if the target defines the corresponding hook.
29184 Enable -ginline-points by default if location views are
29185 enabled; force it disabled if statement frontiers are
29186 disabled.
29187 * tree-inline.c (expand_call_inline): Check option variables.
29188 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
29189
29190 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
29191
29192 PR tree-optimization/84321
29193 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
29194 handling. Also check whether the anti-range contains any values
29195 that satisfy the mask; switch to a VR_RANGE if not.
29196
29197 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
29198
29199 PR sanitizer/84340
29200 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
29201
29202 2018-02-13 Martin Jambor <mjambor@suse.cz>
29203
29204 PR c++/83990
29205 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
29206 of call statements, also set location of a load to a temporary.
29207
29208 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
29209
29210 * config/rl78/rl78.c (add_vector_labels): New function.
29211 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
29212 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
29213 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
29214 which checks that no arguments are passed.
29215 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
29216 * doc/extend.texi: Documentation for the new attribute.
29217
29218 2018-02-13 Andreas Schwab <schwab@suse.de>
29219
29220 * config/riscv/linux.h (CPP_SPEC): Define.
29221
29222 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29223
29224 PR target/84335
29225 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
29226 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
29227 OPTION_MASK_ISA_AES as first argument to def_builtin_const
29228 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
29229 instead of OPTION_MASK_ISA_PCLMUL as first argument to
29230 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
29231 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
29232 temporarily for AES and PCLMUL builtins.
29233
29234 PR tree-optimization/84339
29235 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
29236 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
29237 Formatting fixes.
29238
29239 PR middle-end/84309
29240 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
29241 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
29242 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
29243 inline function.
29244 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
29245 inline function.
29246 * omp-simd-clone.h: New file.
29247 * omp-simd-clone.c: Include omp-simd-clone.h.
29248 (expand_simd_clones): No longer static.
29249 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
29250 cgraph.h and omp-simd-clone.h.
29251 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
29252 (vect_recog_widen_shift_pattern): Formatting fix.
29253 (vect_pattern_recog_1): Don't check optab for calls.
29254
29255 PR target/84336
29256 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
29257 operands[2] into a REG before using gen_lowpart on it.
29258
29259 2018-02-12 Jeff Law <law@redhat.com>
29260
29261 PR target/83760
29262 * config/sh/sh.c (find_barrier): Consider a sibling call
29263 a barrier as well.
29264
29265 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
29266 successfully back substituting a reg.
29267
29268 2018-02-12 Richard Biener <rguenther@suse.de>
29269
29270 PR tree-optimization/84037
29271 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
29272 parameter, move visited init to caller.
29273 (vect_slp_analyze_operations): Separate cost from validity
29274 check, initialize visited once for all instances.
29275 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
29276 for all instances.
29277 * tree-vect-stmts.c (vect_model_simple_cost): Make early
29278 out an assert.
29279 (vect_model_promotion_demotion_cost): Likewise.
29280 (vectorizable_bswap): Guard cost modeling with !slp_node
29281 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
29282 SLP stmts.
29283 (vectorizable_call): Likewise.
29284 (vectorizable_conversion): Likewise.
29285 (vectorizable_assignment): Likewise.
29286 (vectorizable_shift): Likewise.
29287 (vectorizable_operation): Likewise.
29288 (vectorizable_store): Likewise.
29289 (vectorizable_load): Likewise.
29290 (vectorizable_condition): Likewise.
29291 (vectorizable_comparison): Likewise.
29292
29293 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
29294
29295 PR sanitizer/84307
29296 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
29297 (ASAN_MARK): Fix fnspec to account for return value, change pointer
29298 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
29299
29300 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29301
29302 PR middle-end/83665
29303 * params.def (inline-min-speedup): Increase from 8 to 15.
29304 (max-inline-insns-auto): Decrease from 40 to 30.
29305 * ipa-split.c (consider_split): Add some buffer for function to
29306 be considered inlining candidate.
29307 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
29308 default values.
29309
29310 2018-02-12 Richard Biener <rguenther@suse.de>
29311
29312 PR tree-optimization/84037
29313 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
29314 matched stmts if we cannot swap the non-matched ones.
29315
29316 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29317
29318 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
29319 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
29320 _mm_maskz_scalef_round_ss): New intrinsics.
29321 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
29322 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
29323 __builtin_ia32_scalefss_round): Remove.
29324 (__builtin_ia32_scalefsd_mask_round,
29325 __builtin_ia32_scalefss_mask_round): New intrinsics.
29326 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
29327 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
29328 ((match_operand:VF_128 2 "<round_nimm_predicate>"
29329 "<round_constraint>")): Changed to ...
29330 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
29331 "<round_scalar_constraint>")): ... this.
29332 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
29333 %0, %1, %2<round_op3>}"): Changed to ...
29334 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
29335 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
29336 %2<round_scalar_mask_op3>}"): ... this.
29337 * config/i386/subst.md (round_scalar_nimm_predicate): New.
29338
29339 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29340
29341 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
29342 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
29343 (_mm_maskz_sqrt_round_ss): New intrinsics.
29344 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
29345 (__builtin_ia32_sqrtsd_mask_round)
29346 (__builtin_ia32_sqrtss_mask_round): New builtins.
29347 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
29348 (__builtin_ia32_sqrtss_round): Remove.
29349 (__builtin_ia32_sqrtsd_mask_round)
29350 (__builtin_ia32_sqrtss_mask_round): New builtins.
29351 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
29352 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
29353 ((match_operand:VF_128 1 "vector_operand"
29354 "xBm,<round_constraint>")): Changed to ...
29355 ((match_operand:VF_128 1 "vector_operand"
29356 "xBm,<round_scalar_constraint>")): ... this.
29357 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
29358 %0, %2, %<iptr>1<round_op3>}): Changed to ...
29359 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
29360 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
29361 %<iptr>1<round_scalar_mask_op3>}): ... this.
29362 ((set_attr "prefix" "<round_prefix>")): Changed to ...
29363 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
29364
29365 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
29366
29367 PR target/84266
29368 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
29369 Cast vec_cmpeq result to correct type.
29370 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
29371 Cast vec_cmpgt result to correct type.
29372
29373 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
29374
29375 * final.c (final_scan_insn_1): Renamed from...
29376 (final_scan_insn): ... this. New wrapper, to recover
29377 seen from the outermost call in recursive ones.
29378 * config/sparc/sparc.c (output_return): Drop seen from call.
29379 (output_sibcall): Likewise.
29380 * config/visium/visium.c (output_branch): Likewise.
29381
29382 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
29383
29384 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
29385 function label.
29386
29387 2018-02-10 Alan Modra <amodra@gmail.com>
29388
29389 PR target/84300
29390 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
29391 Specify LR as an input.
29392
29393 2018-02-10 Jakub Jelinek <jakub@redhat.com>
29394
29395 PR sanitizer/83987
29396 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
29397 remove_member_access_dummy_vars): New functions.
29398 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
29399 lower_omp_1, execute_lower_omp): Use them.
29400
29401 PR rtl-optimization/84308
29402 * shrink-wrap.c (spread_components): Release todo vector.
29403
29404 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
29405
29406 PR rtl-optimization/57193
29407 * ira-color.c (struct allocno_color_data): Add member
29408 conflict_allocno_hard_prefs.
29409 (update_conflict_allocno_hard_prefs): New.
29410 (bucket_allocno_compare_func): Add a preference based on
29411 conflict_allocno_hard_prefs.
29412 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
29413 (color_allocnos): Remove a dead code. Initiate
29414 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
29415
29416 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29417
29418 PR target/84226
29419 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
29420 constraint from =wa to wa. Avoid a subreg on the output operand,
29421 instead use a pseudo and subreg it in a move.
29422 (p9_xxbrd_<mode>): Changed to ...
29423 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
29424 (p9_xxbrd_v2df): New expander.
29425 (p9_xxbrw_<mode>): Changed to ...
29426 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
29427 (p9_xxbrw_v4sf): New expander.
29428
29429 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29430
29431 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
29432
29433 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
29434
29435 PR target/83926
29436 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
29437 multiply in 32-bit mode.
29438 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
29439 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
29440 mode.
29441
29442 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29443
29444 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
29445 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
29446 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
29447 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
29448
29449 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
29450
29451 PR lto/84213
29452 * dwarf2out.c (is_trivial_indirect_ref): New function.
29453 (dwarf2out_late_global_decl): Do not generate a location
29454 attribute for variables that have a non-trivial DECL_VALUE_EXPR
29455 and that are not defined in the current unit.
29456
29457 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29458
29459 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
29460 instead of a libcall for UNORDERED.
29461
29462 2018-02-09 Tamar Christina <tamar.christina@arm.com>
29463
29464 PR target/82641
29465 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
29466 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
29467
29468 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29469
29470 PR target/PR84295
29471 * config/s390/s390.c (s390_set_current_function): Invoke
29472 s390_indirect_branch_settings also if fndecl didn't change.
29473
29474 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29475
29476 * config/rs6000/rs6000.md (blockage): Set length to zero.
29477
29478 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29479
29480 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
29481
29482 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29483
29484 PR sanitizer/84285
29485 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
29486 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
29487 -static-lib*san.
29488
29489 PR debug/84252
29490 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
29491 PARALLEL incoming that failed vt_get_decl_and_offset check.
29492
29493 PR middle-end/84237
29494 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
29495 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
29496 TREE_READONLY bit.
29497 (get_variable_section): For decls in named .bss* sections pass true as
29498 second argument to bss_initializer_p.
29499
29500 2018-02-09 Marek Polacek <polacek@redhat.com>
29501 Jakub Jelinek <jakub@redhat.com>
29502
29503 PR c++/83659
29504 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
29505 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
29506 Sync some changes from cxx_fold_indirect_ref.
29507
29508 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29509
29510 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
29511 markers.
29512 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
29513 (BLOCK_INLINE_ENTRY_LABEL): New.
29514 (dwarf2out_var_location): Disregard inline entry markers.
29515 (inline_entry_data): New struct.
29516 (inline_entry_data_hasher): New hashtable type.
29517 (inline_entry_data_hasher::hash): New.
29518 (inline_entry_data_hasher::equal): New.
29519 (inline_entry_data_table): New variable.
29520 (add_high_low_attributes): Add DW_AT_entry_pc and
29521 DW_AT_GNU_entry_view attributes if a pending entry is found
29522 in inline_entry_data_table. Add old entry_pc attribute only
29523 if debug nonbinding markers are disabled.
29524 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
29525 markers are enabled.
29526 (block_within_block_p, dwarf2out_inline_entry): New.
29527 (dwarf2out_finish): Check that no entries remained in
29528 inline_entry_data_table.
29529 * final.c (reemit_insn_block_notes): Handle inline entry notes.
29530 (final_scan_insn, notice_source_line): Likewise.
29531 (rest_of_clean_state): Skip inline entry markers.
29532 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
29533 markers.
29534 * gimple.c (gimple_build_debug_inline_entry): New.
29535 * gimple.h (enum gimple_debug_subcode): Add
29536 GIMPLE_DEBUG_INLINE_ENTRY.
29537 (gimple_build_debug_inline_entry): Declare.
29538 (gimple_debug_inline_entry_p): New.
29539 (gimple_debug_nonbind_marker_p): Adjust.
29540 * insn-notes.def (INLINE_ENTRY): New.
29541 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
29542 inline entry marker notes.
29543 (print_insn): Likewise.
29544 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
29545 (INSN_DEBUG_MARKER_KIND): Likewise.
29546 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
29547 * tree-inline.c (expand_call_inline): Build and insert
29548 debug_inline_entry stmt.
29549 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
29550 inline entry blocks early, if nonbind markers are enabled.
29551 (dump_scope_block): Dump fragment info.
29552 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
29553 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
29554 (gimple_build_debug_inline_entry): New.
29555 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
29556 Enable/disable inline entry points too.
29557 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
29558 (DEBUG_INSN): Describe inline entry markers.
29559
29560 * common.opt (gvariable-location-views): New.
29561 (gvariable-location-views=incompat5): New.
29562 * config.in: Rebuilt.
29563 * configure: Rebuilt.
29564 * configure.ac: Test assembler for view support.
29565 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
29566 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
29567 * dwarf2out.c (var_loc_view): New typedef.
29568 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
29569 (dwarf2out_locviews_in_attribute): New.
29570 (dwarf2out_locviews_in_loclist): New.
29571 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
29572 (enum dw_line_info_opcode): Add LI_adv_address.
29573 (struct dw_line_info_table): Add view.
29574 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
29575 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
29576 (zero_view_p): New variable.
29577 (ZERO_VIEW_P): New macro.
29578 (output_asm_line_debug_info): New.
29579 (struct var_loc_node): Add view.
29580 (add_AT_view_list, AT_loc_list): New.
29581 (add_var_loc_to_decl): Add view param. Test it against last.
29582 (new_loc_list): Add view params. Record them.
29583 (AT_loc_list_ptr): Handle loc and view lists.
29584 (view_list_to_loc_list_val_node): New.
29585 (print_dw_val): Handle dw_val_class_view_list.
29586 (size_of_die): Likewise.
29587 (value_format): Likewise.
29588 (loc_list_has_views): New.
29589 (gen_llsym): Set vl_symbol too.
29590 (maybe_gen_llsym, skip_loc_list_entry): New.
29591 (dwarf2out_maybe_output_loclist_view_pair): New.
29592 (output_loc_list): Output view list or entries too.
29593 (output_view_list_offset): New.
29594 (output_die): Handle dw_val_class_view_list.
29595 (output_dwarf_version): New.
29596 (output_compilation_unit_header): Use it.
29597 (output_skeleton_debug_sections): Likewise.
29598 (output_rnglists, output_line_info): Likewise.
29599 (output_pubnames, output_aranges): Update version comments.
29600 (output_one_line_info_table): Output view numbers in asm comments.
29601 (dw_loc_list): Determine current endview, pass it to new_loc_list.
29602 Call maybe_gen_llsym.
29603 (loc_list_from_tree_1): Adjust.
29604 (add_AT_location_description): Create view list attribute if
29605 needed, check it's absent otherwise.
29606 (convert_cfa_to_fb_loc_list): Adjust.
29607 (maybe_emit_file): Call output_asm_line_debug_info for test.
29608 (dwarf2out_var_location): Reset views as needed. Precompute
29609 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
29610 attribute. Set view.
29611 (new_line_info_table): Reset next view.
29612 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
29613 (dwarf2out_source_line): Likewise. Output view resets and labels to
29614 the assembler, or select appropriate line info opcodes.
29615 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
29616 (optimize_string_length): Catch it. Adjust.
29617 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
29618 dw_val_class_view_list, and remove it if no longer needed.
29619 (hash_loc_list): Hash view numbers.
29620 (loc_list_hasher::equal): Compare them.
29621 (optimize_location_lists): Check whether a view list symbol is
29622 needed, and whether the locview attribute is present, and
29623 whether they match. Remove the locview attribute if no longer
29624 needed.
29625 (index_location_lists): Call skip_loc_list_entry for test.
29626 (dwarf2out_finish): Call output_asm_line_debug_info for test.
29627 Use output_dwarf_version.
29628 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
29629 (struct dw_val_node): Add val_view_list.
29630 * final.c (SEEN_NEXT_VIEW): New.
29631 (set_next_view_needed): New.
29632 (clear_next_view_needed): New.
29633 (maybe_output_next_view): New.
29634 (final_start_function): Rename to...
29635 (final_start_function_1): ... this. Take pointer to FIRST,
29636 add SEEN parameter. Emit param bindings in the initial view.
29637 (final_start_function): Reintroduce SEEN-less interface.
29638 (final): Rename to...
29639 (final_1): ... this. Take SEEN parameter. Output final pending
29640 next view at the end.
29641 (final): Reintroduce seen-less interface.
29642 (final_scan_insn): Output pending next view before switching
29643 sections or ending a block. Mark the next view as needed when
29644 outputting variable locations. Notify debug backend of section
29645 changes, and of location view changes.
29646 (rest_of_handle_final): Adjust.
29647 * toplev.c (process_options): Autodetect value for debug variable
29648 location views option. Warn on incompat5 without -gdwarf-5.
29649 * doc/invoke.texi (gvariable-location-views): New.
29650 (gvariable-location-views=incompat5): New.
29651 (gno-variable-location-views): New.
29652
29653 2018-02-08 David Malcolm <dmalcolm@redhat.com>
29654
29655 PR tree-optimization/84136
29656 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
29657 that the result of find_edge is non-NULL.
29658
29659 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29660
29661 PR target/83008
29662 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
29663 storing integer register in SImode. Fix cost of 256 and 512
29664 byte aligned SSE register store.
29665
29666 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29667
29668 * config/i386/i386.c (ix86_multiplication_cost): Fix
29669 multiplication cost for TARGET_AVX512DQ.
29670
29671 2018-02-08 Marek Polacek <polacek@redhat.com>
29672
29673 PR tree-optimization/84238
29674 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
29675 get_range_strlen.
29676
29677 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29678
29679 PR tree-optimization/84265
29680 * tree-vect-stmts.c (vectorizable_store): Don't treat
29681 VMAT_CONTIGUOUS accesses as grouped.
29682 (vectorizable_load): Likewise.
29683
29684 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29685
29686 PR tree-optimization/81635
29687 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
29688 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
29689 (test_round_for_mask): New functions.
29690 (wide_int_cc_tests): Call test_round_for_mask.
29691 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
29692 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
29693 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
29694 range returned by get_range_info.
29695
29696 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29697
29698 PR ipa/81360
29699 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
29700 * symtab.c: Include builtins.h
29701 (symtab_node::output_to_lto_symbol_table_p): Move here
29702 from lto-streamer-out.c:output_symbol_p.
29703 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
29704 (output_symbol_p): Move all logic to symtab.c
29705 (produce_symtab): Update.
29706
29707 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29708
29709 * config/s390/s390-opts.h (enum indirect_branch): Define.
29710 * config/s390/s390-protos.h (s390_return_addr_from_memory)
29711 (s390_indirect_branch_via_thunk)
29712 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
29713 (enum s390_indirect_branch_type): Define.
29714 * config/s390/s390.c (struct s390_frame_layout, struct
29715 machine_function): Remove.
29716 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
29717 (indirect_branch_table_label_no, indirect_branch_table_name):
29718 Define variables.
29719 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
29720 (enum s390_indirect_branch_option): Define.
29721 (s390_return_addr_from_memory): New function.
29722 (s390_handle_string_attribute): New function.
29723 (s390_attribute_table): Add new attribute handler.
29724 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
29725 (s390_indirect_branch_via_thunk): New function.
29726 (s390_indirect_branch_via_inline_thunk): New function.
29727 (s390_function_ok_for_sibcall): When jumping via thunk disallow
29728 sibling call optimization for non z10 compiles.
29729 (s390_emit_call): Force indirect branch target to be a single
29730 register. Add r1 clobber for non-z10 compiles.
29731 (s390_emit_epilogue): Emit return jump via return_use expander.
29732 (s390_reorg): Handle JUMP_INSNs as execute targets.
29733 (s390_option_override_internal): Perform validity checks for the
29734 new command line options.
29735 (s390_indirect_branch_attrvalue): New function.
29736 (s390_indirect_branch_settings): New function.
29737 (s390_set_current_function): Invoke s390_indirect_branch_settings.
29738 (s390_output_indirect_thunk_function): New function.
29739 (s390_code_end): Implement target hook.
29740 (s390_case_values_threshold): Implement target hook.
29741 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
29742 macros.
29743 * config/s390/s390.h (struct s390_frame_layout)
29744 (struct machine_function): Move here from s390.c.
29745 (TARGET_INDIRECT_BRANCH_NOBP_RET)
29746 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
29747 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
29748 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
29749 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
29750 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
29751 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
29752 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
29753 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
29754 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
29755 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
29756 (mnemonic attribute): Add values which aren't recognized
29757 automatically.
29758 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
29759 pattern for branch conversion. Fix mnemonic attribute.
29760 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
29761 indirect branch via thunk if requested.
29762 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
29763 ("*indirect_jump"): Disable for branch conversion using out of
29764 line thunks.
29765 ("indirect_jump_via_thunk<mode>_z10")
29766 ("indirect_jump_via_thunk<mode>")
29767 ("indirect_jump_via_inlinethunk<mode>_z10")
29768 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
29769 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
29770 ("casesi_jump_via_inlinethunk<mode>_z10")
29771 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
29772 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
29773 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
29774 ("*indirect2_jump"): Disable for branch conversion.
29775 ("casesi_jump"): Turn into expander and expand patterns for branch
29776 conversion.
29777 ("return_use"): New expander.
29778 ("*return"): Emit return via thunk and rename it to ...
29779 ("*return<mode>"): ... this one.
29780 * config/s390/s390.opt: Add new options and and enum for the
29781 option values.
29782
29783 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29784
29785 * lra-constraints.c (match_reload): Unconditionally use
29786 gen_lowpart_SUBREG, rather than selecting between that
29787 and equivalent gen_rtx_SUBREG code.
29788
29789 2018-02-08 Richard Biener <rguenther@suse.de>
29790
29791 PR tree-optimization/84233
29792 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
29793 changed flag instead of boguously re-using phi_inserted.
29794
29795 2018-02-08 Martin Jambor <mjambor@suse.cz>
29796
29797 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
29798 static local variables.
29799
29800 2018-02-08 Richard Biener <rguenther@suse.de>
29801
29802 PR tree-optimization/84278
29803 * tree-vect-stmts.c (vectorizable_store): When looking for
29804 smaller vector types to perform grouped strided loads/stores
29805 make sure the mode is supported by the target.
29806 (vectorizable_load): Likewise.
29807
29808 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29809
29810 * config/aarch64/aarch64.c (aarch64_components_for_bb):
29811 Increase LDP/STP opportunities by adding adjacent callee-saves.
29812
29813 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29814
29815 PR rtl-optimization/84068
29816 PR rtl-optimization/83459
29817 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
29818
29819 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
29820
29821 PR tree-optimization/84224
29822 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
29823 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
29824 non-zero arguments.
29825
29826 2018-02-07 Iain Sandoe <iain@codesourcery.com>
29827
29828 PR target/84113
29829 * config/rs6000/altivec.md (*restore_world): Remove LR use.
29830 * config/rs6000/predicates.md (restore_world_operation): Adjust op
29831 count, remove one USE.
29832
29833 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
29834
29835 * doc/install.texi (Configuration): Document the
29836 --with-long-double-format={ibm,ieee} PowerPC configuration
29837 options.
29838
29839 PR target/84154
29840 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
29841 Convert from define_expand to be define_insn_and_split. Rework
29842 float/double/_Float128 conversions to QI/HI/SImode to work with
29843 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
29844 conversions to QI/HImode types did a store and then a load to
29845 truncate the value. For conversions to VSX registers, don't split
29846 the insn, instead emit the code directly. Use the code iterator
29847 any_fix to combine signed and unsigned conversions.
29848 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
29849 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
29850 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
29851 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
29852 (fix_<mode>di2_hw): Likewise.
29853 (fixuns_<mode>di2_hw): Likewise.
29854 (fix_<mode>si2_hw): Likewise.
29855 (fixuns_<mode>si2_hw): Likewise.
29856 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
29857 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
29858 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
29859 fix<uns>_trunc<SFDF:mode>si2_p8.
29860 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
29861 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
29862 (fix<uns>_<mode>_mem): Likewise.
29863 (fctiw<u>z_<mode>_mem): Likewise.
29864 (fix<uns>_<mode>_mem): Likewise.
29865 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
29866 the register allocator from doing a direct move to the GPRs to do
29867 a store, and instead use the ISA 3.0 store byte/half-word from
29868 vector register instruction. For IEEE 128-bit floating point,
29869 also optimize stores of 32-bit ints.
29870 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
29871
29872 2018-02-07 Alan Hayward <alan.hayward@arm.com>
29873
29874 * genextract.c (push_pathstr_operand): New function to support
29875 [a-zA-Z].
29876 (walk_rtx): Call push_pathstr_operand.
29877 (print_path): Support [a-zA-Z].
29878
29879 2018-02-07 Richard Biener <rguenther@suse.de>
29880
29881 PR tree-optimization/84037
29882 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
29883 (cse_and_gimplify_to_preheader): Declare.
29884 (vect_get_place_in_interleaving_chain): Likewise.
29885 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29886 ivexpr_map.
29887 (_loop_vec_info::~_loop_vec_info): Delete it.
29888 (cse_and_gimplify_to_preheader): New function.
29889 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
29890 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
29891 (vectorizable_load): Likewise. For grouped stores always base
29892 the IV on the first element.
29893 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
29894 condition before gimplifying.
29895
29896 2018-02-07 Jakub Jelinek <jakub@redhat.com>
29897
29898 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
29899 *DIV_EXPR and *MOD_EXPR.
29900
29901 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
29902
29903 PR target/84248
29904 * config/i386/i386.c (ix86_option_override_internal): Mask out
29905 the CF_SET bit when checking -fcf-protection.
29906
29907 2018-02-07 Tom de Vries <tom@codesourcery.com>
29908
29909 PR libgomp/84217
29910 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
29911 enough.
29912
29913 2018-02-07 Richard Biener <rguenther@suse.de>
29914
29915 PR tree-optimization/84204
29916 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
29917 this place.
29918
29919 PR tree-optimization/84205
29920 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
29921 special-case isl_ast_op_zdiv_r.
29922
29923 PR tree-optimization/84223
29924 * graphite-scop-detection.c (gather_bbs::before_dom_children):
29925 Only add conditions from within the region.
29926 (gather_bbs::after_dom_children): Adjust.
29927
29928 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
29929
29930 PR target/84209
29931 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
29932 * config/avr/avr.md: Only post-reload split REG-REG moves if
29933 either register is GENERAL_REG_P.
29934
29935 2018-02-07 Jakub Jelinek <jakub@redhat.com>
29936
29937 PR tree-optimization/84235
29938 * tree-ssa-scopedtables.c
29939 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
29940 if the subtraction is performed in floating point type where NaNs are
29941 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
29942 build 1. Formatting fix.
29943
29944 2018-02-06 Jakub Jelinek <jakub@redhat.com>
29945
29946 PR target/84146
29947 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
29948 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
29949 and skip it regardless of bb boundaries. Use CALL_P macro,
29950 don't test INSN_P (insn) together with CALL_P or JUMP_P check
29951 unnecessarily, formatting fix.
29952
29953 2018-02-06 Michael Collison <michael.collison@arm.com>
29954
29955 * config/arm/thumb2.md:
29956 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
29957 (*thumb_mov_notscc): Ditto.
29958
29959 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
29960
29961 PR target/84154
29962 * config/rs6000/rs6000.md (su code attribute): Use "u" for
29963 unsigned_fix, not "s".
29964
29965 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29966
29967 * configure.ac (gcc_fn_eh_frame_ro): New function.
29968 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
29969 correct .eh_frame permissions.
29970 * configure: Regenerate.
29971
29972 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
29973
29974 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
29975 irrelevant options.
29976
29977 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29978
29979 * config/rs6000/rs6000.c (rs6000_option_override_internal):
29980 Display warning message for -mno-speculate-indirect-jumps.
29981
29982 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
29983
29984 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
29985 Undocumented.
29986 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
29987
29988 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
29989
29990 PR tree-optimization/84225
29991 * tree-eh.c (find_trapping_overflow): Only call
29992 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
29993
29994 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
29995
29996 PR target/84145
29997 * config/i386/i386.c: Reimplement the check of possible options
29998 -mibt/-mshstk conbination. Change error messages.
29999 * doc/invoke.texi: Fix a typo: remove extra '='.
30000
30001 2018-02-06 Marek Polacek <polacek@redhat.com>
30002
30003 PR tree-optimization/84228
30004 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
30005
30006 2018-02-06 Tamar Christina <tamar.christina@arm.com>
30007
30008 PR target/82641
30009 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
30010 emitted arch directives.
30011 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
30012 __ARM_FEATURE_COPROC before changing architectures.
30013
30014 2018-02-06 Richard Biener <rguenther@suse.de>
30015
30016 * config/i386/i386.c (print_reg): Fix typo.
30017 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
30018
30019 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
30020
30021 * configure: Regenerate.
30022
30023 2018-02-05 Martin Sebor <msebor@redhat.com>
30024
30025 PR tree-optimization/83369
30026 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
30027 inlining context.
30028
30029 2018-02-05 Martin Liska <mliska@suse.cz>
30030
30031 * doc/invoke.texi: Cherry-pick upstream r323995.
30032
30033 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
30034
30035 * ira.c (ira_init_register_move_cost): Adjust comment.
30036
30037 2018-02-05 Martin Liska <mliska@suse.cz>
30038
30039 PR gcov-profile/84137
30040 * doc/gcov.texi: Fix typo in documentation.
30041
30042 2018-02-05 Martin Liska <mliska@suse.cz>
30043
30044 PR gcov-profile/83879
30045 * doc/gcov.texi: Document necessity of --dynamic-list-data when
30046 using dlopen functionality.
30047
30048 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
30049
30050 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
30051 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
30052 _mm_maskz_range_ss, _mm_mask_range_round_ss,
30053 _mm_maskz_range_round_ss): New intrinsics.
30054 (__builtin_ia32_rangesd128_round)
30055 (__builtin_ia32_rangess128_round): Remove.
30056 (__builtin_ia32_rangesd128_mask_round,
30057 __builtin_ia32_rangess128_mask_round): New builtins.
30058 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
30059 __builtin_ia32_rangess128_round): Remove.
30060 (__builtin_ia32_rangesd128_mask_round,
30061 __builtin_ia32_rangess128_mask_round): New builtins.
30062 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
30063 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
30064 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
30065 "<round_saeonly_constraint>")): Changed to ...
30066 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
30067 "<round_saeonly_scalar_constraint>")): ... this.
30068 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
30069 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
30070 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
30071 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
30072 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
30073
30074 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
30075
30076 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
30077 options.
30078 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
30079 Remove all values except native, 8540 and 8548.
30080
30081 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
30082
30083 * config/i386/i386.c (ix86_output_function_return): Pass
30084 INVALID_REGNUM, instead of -1, as invalid register number to
30085 indirect_thunk_name and output_indirect_thunk.
30086
30087 2018-02-02 Julia Koval <julia.koval@intel.com>
30088
30089 * config.gcc: Add -march=icelake.
30090 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
30091 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
30092 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
30093 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
30094 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
30095 (processor_target_table): Add icelake.
30096 (ix86_option_override_internal): Handle new PTAs.
30097 (get_builtin_code_for_version): Handle icelake.
30098 (M_INTEL_COREI7_ICELAKE): New.
30099 (fold_builtin_cpu): Handle icelake.
30100 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
30101 * doc/invoke.texi: Add -march=icelake.
30102
30103 2018-02-02 Julia Koval <julia.koval@intel.com>
30104
30105 * config/i386/i386.c (ix86_option_override_internal): Change flags type
30106 to wide_int_bitmask.
30107 * wide-int-bitmask.h: New.
30108
30109 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
30110
30111 PR target/84066
30112 * config/i386/i386.md: Replace Pmode with word_mode in
30113 builtin_setjmp_setup and builtin_longjmp to support x32.
30114
30115 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
30116
30117 PR target/56010
30118 PR target/83743
30119 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
30120 #include "opts.h".
30121 (rs6000_supported_cpu_names): New static variable.
30122 (linux_cpu_translation_table): Likewise.
30123 (elf_platform) <cpu>: Define new static variable and use it.
30124 Translate kernel AT_PLATFORM name to canonical name if needed.
30125 Error if platform name is unknown.
30126
30127 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
30128
30129 PR target/84089
30130 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
30131
30132 2018-02-01 Jeff Law <law@redhat.com>
30133
30134 PR target/84128
30135 * config/i386/i386.c (release_scratch_register_on_entry): Add new
30136 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
30137 the scratch if RELEASE_VIA_POP is false.
30138 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
30139 If we have to save a temporary register, decrement SIZE appropriately.
30140 Pass new arguments to release_scratch_register_on_entry.
30141 (ix86_adjust_stack_and_probe): Likewise.
30142 (ix86_emit_probe_stack_range): Pass new arguments to
30143 release_scratch_register_on_entry.
30144
30145 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
30146
30147 PR rtl-optimization/84157
30148 * combine.c (change_zero_ext): Use REG_P predicate in
30149 front of HARD_REGISTER_P predicate.
30150
30151 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
30152
30153 * config/avr/avr.c (avr_option_override): Move disabling of
30154 -fdelete-null-pointer-checks to...
30155 * common/config/avr/avr-common.c (avr_option_optimization_table):
30156 ...here.
30157
30158 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30159
30160 PR tree-optimization/81635
30161 * tree-data-ref.c (split_constant_offset_1): For types that
30162 wrap on overflow, try to use range info to prove that wrapping
30163 cannot occur.
30164
30165 2018-02-01 Renlin Li <renlin.li@arm.com>
30166
30167 PR target/83370
30168 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
30169 TAILCALL_ADDR_REGS.
30170 (aarch64_register_move_cost): Likewise.
30171 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
30172 TAILCALL_ADDR_REGS.
30173 (REG_CLASS_NAMES): Likewise.
30174 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
30175 TAILCALL_ADDR_REGS. Remove IP registers.
30176 * config/aarch64/aarch64.md (Ucs): Update register constraint.
30177
30178 2018-02-01 Richard Biener <rguenther@suse.de>
30179
30180 * domwalk.h (dom_walker::dom_walker): Add additional constructor
30181 for specifying RPO order and allow NULL for that.
30182 * domwalk.c (dom_walker::dom_walker): Likewise.
30183 (dom_walker::walk): Handle NULL RPO order.
30184 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
30185 in RPO order.
30186 (rewrite_update_dom_walker): Likewise.
30187 (mark_def_dom_walker): Likewise.
30188
30189 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30190
30191 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
30192 (aarch64_maybe_expand_sve_subreg_move): Declare.
30193 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
30194 * config/aarch64/predicates.md (aarch64_any_register_operand): New
30195 predicate.
30196 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
30197 that are semantically a reverse operation.
30198 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
30199 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
30200 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
30201 functions.
30202 (aarch64_can_change_mode_class): For big-endian, forbid changes
30203 between two SVE modes if they have different element sizes.
30204
30205 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30206
30207 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
30208 the TImode handling for big-endian targets.
30209
30210 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30211
30212 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
30213 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
30214 not just bytes.
30215 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
30216 Remove BSWAP handing for big-endian targets and use the form of
30217 LD1RQ appropariate for the mode.
30218
30219 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30220
30221 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
30222 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
30223 duplicated element.
30224
30225 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30226
30227 PR tearget/83845
30228 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
30229 check for operands that need to go through aarch64_sve_reload_be.
30230
30231 2018-02-01 Jakub Jelinek <jakub@redhat.com>
30232
30233 PR tree-optimization/81661
30234 PR tree-optimization/84117
30235 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
30236 * tree-eh.c: Include gimplify.h.
30237 (find_trapping_overflow, replace_trapping_overflow,
30238 rewrite_to_non_trapping_overflow): New functions.
30239 * tree-vect-loop.c: Include tree-eh.h.
30240 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
30241 * tree-data-ref.c: Include tree-eh.h.
30242 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
30243
30244 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
30245
30246 PR rtl-optimization/84123
30247 * combine.c (change_zero_ext): Check if hard register satisfies
30248 can_change_dest_mode before calling gen_lowpart_SUBREG.
30249
30250 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
30251
30252 PR target/82444
30253 * ira.c (ira_init_register_move_cost): Remove assert.
30254
30255 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30256
30257 PR rtl-optimization/84071
30258 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
30259 * doc/tm.texi: Regenerate.
30260
30261 2018-01-31 Richard Biener <rguenther@suse.de>
30262
30263 PR tree-optimization/84132
30264 * tree-data-ref.c (analyze_miv_subscript): Properly
30265 check whether evolution_function_is_affine_multivariate_p
30266 before calling gcd_of_steps_may_divide_p.
30267
30268 2018-01-31 Julia Koval <julia.koval@intel.com>
30269
30270 PR target/83618
30271 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
30272 * config/i386/i386.md (rdpid_rex64) New.
30273 (rdpid): Make 32bit only.
30274
30275 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
30276
30277 PR lto/84105
30278 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
30279 an IDENTIFIER_NODE for FUNCTION_TYPE's.
30280
30281 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30282
30283 Revert
30284 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30285
30286 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30287
30288 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30289
30290 PR rtl-optimization/84071
30291 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
30292 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
30293
30294 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30295
30296 * config/arc/arc.c (arc_handle_aux_attribute): New function.
30297 (arc_attribute_table): Add 'aux' attribute.
30298 (arc_in_small_data_p): Consider aux like variables.
30299 (arc_is_aux_reg_p): New function.
30300 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
30301 (arc_get_aux_arg): New function.
30302 (prepare_move_operands): Handle aux-register access.
30303 (arc_handle_aux_attribute): New function.
30304 * doc/extend.texi (ARC Variable attributes): Add subsection.
30305
30306 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30307
30308 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
30309 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
30310 (arc_attribute_table): Add 'uncached' attribute.
30311 (arc_print_operand): Print '.di' flag for uncached memory
30312 accesses.
30313 (arc_in_small_data_p): Do not consider for small data the uncached
30314 types.
30315 (arc_is_uncached_mem_p): New function.
30316 * config/arc/predicates.md (compact_store_memory_operand): Check
30317 for uncached memory accesses.
30318 (nonvol_nonimm_operand): Likewise.
30319 * doc/extend.texi (ARC Type Attribute): New subsection.
30320
30321 2018-01-31 Jakub Jelinek <jakub@redhat.com>
30322
30323 PR c/84100
30324 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
30325 falign-loops=): Add Optimization flag.
30326
30327 2018-01-30 Jeff Law <law@redhat.com>
30328
30329 PR target/84064
30330 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
30331 INT_REGISTERS_SAVED. Check it prior to calling
30332 get_scratch_register_on_entry.
30333 (ix86_adjust_stack_and_probe): Similarly.
30334 (ix86_emit_probe_stack_range): Similarly.
30335 (ix86_expand_prologue): Corresponding changes.
30336
30337 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30338
30339 PR target/40411
30340 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
30341 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
30342
30343 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
30344
30345 PR target/84112
30346 * lra-constraints.c (curr_insn_transform): Process AND in the
30347 address.
30348
30349 2018-01-30 Jakub Jelinek <jakub@redhat.com>
30350
30351 PR rtl-optimization/83986
30352 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
30353 dependence against last_pending_memory_flush in addition to
30354 pending_jump_insns.
30355
30356 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
30357
30358 PR tree-optimization/81611
30359 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
30360 copies.
30361
30362 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30363
30364 PR target/83758
30365 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
30366 a reg rtx.
30367
30368 2018-01-30 Richard Biener <rguenther@suse.de>
30369 Jakub Jelinek <jakub@redhat.com>
30370
30371 PR tree-optimization/84111
30372 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
30373 inner loops added during recursion, as they don't have up-to-date
30374 SSA form.
30375
30376 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30377
30378 PR ipa/81360
30379 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
30380 (can_inline_edge_by_limits_p): ... here.
30381 (can_early_inline_edge_p, check_callers,
30382 update_caller_keys, update_callee_keys, recursive_inlining,
30383 add_new_edges_to_heap, speculation_useful_p,
30384 inline_small_functions,
30385 inline_small_functions, flatten_function,
30386 inline_to_all_callers_1): Update.
30387
30388 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30389
30390 * profile-count.c (profile_count::combine_with_ipa_count): Handle
30391 zeros correctly.
30392
30393 2018-01-30 Richard Biener <rguenther@suse.de>
30394
30395 PR tree-optimization/83008
30396 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
30397 invariant and constant vector uses in stmts when they need
30398 more than one stmt.
30399
30400 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30401
30402 PR bootstrap/84017
30403 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
30404 * configure: Regenerate.
30405
30406 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30407
30408 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
30409 pattern.
30410 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
30411 Use gen_rtx_REG rather than gen_lowpart.
30412
30413 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30414
30415 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
30416 rather than 0 when creating partial subregs.
30417
30418 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30419
30420 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
30421 of usage.
30422
30423 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
30424
30425 PR target/81550
30426 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
30427 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
30428 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
30429 flags. This restores the settings used before the 2017-07-24.
30430 Turning off pre increment/decrement/modify allows IVOPTS to
30431 optimize DF/SF loops where the index is an int.
30432
30433 2018-01-29 Richard Biener <rguenther@suse.de>
30434 Kelvin Nilsen <kelvin@gcc.gnu.org>
30435
30436 PR bootstrap/80867
30437 * tree-vect-stmts.c (vectorizable_call): Don't call
30438 targetm.vectorize_builtin_md_vectorized_function if callee is
30439 NULL.
30440
30441 2018-01-22 Carl Love <cel@us.ibm.com>
30442
30443 * doc/extend.tex: Fix typo in second arg in
30444 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
30445
30446 2018-01-29 Richard Biener <rguenther@suse.de>
30447
30448 PR tree-optimization/84086
30449 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
30450 (flush_ssaname_freelist): When SSA names were released reset
30451 the SCEV hash table.
30452
30453 2018-01-29 Richard Biener <rguenther@suse.de>
30454
30455 PR tree-optimization/84057
30456 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
30457 removed paths when removing edges.
30458
30459 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
30460
30461 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
30462 -mfunction-return=@var{choice}.
30463
30464 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
30465
30466 PR diagnostic/84034
30467 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
30468 Handle CR like TAB.
30469 (layout::print_source_line): Likewise.
30470 (test_get_line_width_without_trailing_whitespace): Add test cases.
30471
30472 2018-01-27 Jakub Jelinek <jakub@redhat.com>
30473
30474 PR middle-end/84040
30475 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
30476 debug insns.
30477
30478 2018-01-26 Jim Wilson <jimw@sifive.com>
30479
30480 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
30481
30482 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
30483 specified.
30484
30485 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30486
30487 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
30488 and CMP + SUB-immediate -> SUBS.
30489
30490 2018-01-26 Martin Sebor <msebor@redhat.com>
30491
30492 PR tree-optimization/83896
30493 * tree-ssa-strlen.c (get_string_len): Rename...
30494 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
30495 Avoid assuming length is constant.
30496 (handle_char_store): Use HOST_WIDE_INT for string length.
30497
30498 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
30499
30500 PR target/81763
30501 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
30502 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
30503
30504 2018-01-26 Richard Biener <rguenther@suse.de>
30505
30506 PR rtl-optimization/84003
30507 * dse.c (record_store): Only record redundant stores when
30508 the earlier store aliases at least all accesses the later one does.
30509
30510 2018-01-26 Jakub Jelinek <jakub@redhat.com>
30511
30512 PR rtl-optimization/83985
30513 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
30514 REG_CFA_RESTORE insns.
30515 (delete_unmarked_insns): Don't ignore separate shrink wrapping
30516 REG_CFA_RESTORE insns here.
30517
30518 PR c/83989
30519 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
30520 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
30521
30522 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30523
30524 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
30525 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
30526 (arc_init): Likewise.
30527 (arc_override_options): Likewise.
30528 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
30529 value.
30530 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
30531 support.
30532 * config/arc/arc.h (TARGET_DBNZ): Define.
30533 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
30534 properly set the tune attribute.
30535 (dbnz): Use TARGET_DBNZ guard.
30536 * config/arc/arc.opt (mtune): Add core3 option.
30537
30538 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30539
30540 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
30541 recognize new pic like addresses.
30542 (arc_delegitimize_address): Clean up.
30543
30544 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30545
30546 * config/arc/arc-arches.def: Option mrf16 valid for all
30547 architectures.
30548 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
30549 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
30550 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
30551 * config/arc/arc-tables.opt: Regenerate.
30552 * config/arc/arc.c (arc_conditional_register_usage): Handle
30553 reduced register file case.
30554 (arc_file_start): Set must have build attributes.
30555 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
30556 mrf16 option value.
30557 * config/arc/arc.opt (mrf16): Add new option.
30558 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
30559 * config/arc/genmultilib.awk: Handle new mrf16 option.
30560 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
30561 * config/arc/t-multilib: Regenerate.
30562 * doc/invoke.texi (ARC Options): Document mrf16 option.
30563
30564 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30565
30566 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
30567 * config/arc/arc.c (arc_handle_secure_attribute): New function.
30568 (arc_attribute_table): Add 'secure_call' attribute.
30569 (arc_print_operand): Print secure call operand.
30570 (arc_function_ok_for_sibcall): Don't optimize tail calls when
30571 secure.
30572 (arc_is_secure_call_p): New function. * config/arc/arc.md
30573 (call_i): Add support for sjli instruction.
30574 (call_value_i): Likewise.
30575 * config/arc/constraints.md (Csc): New constraint.
30576
30577 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30578 John Eric Martin <John.Martin@emmicro-us.com>
30579
30580 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
30581 * config/arc/arc.c (_arc_jli_section): New struct.
30582 (arc_jli_section): New type.
30583 (rc_jli_sections): New static variable.
30584 (arc_handle_jli_attribute): New function.
30585 (arc_attribute_table): Add jli_always and jli_fixed attribute.
30586 (arc_file_end): New function.
30587 (TARGET_ASM_FILE_END): Define.
30588 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
30589 (arc_add_jli_section): New function.
30590 (jli_call_scan): Likewise.
30591 (arc_reorg): Call jli_call_scan.
30592 (arc_output_addsi): Remove 'S' from printing asm operand.
30593 (arc_is_jli_call_p): New function.
30594 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
30595 operand.
30596 (movhi_insn): Likewise.
30597 (movsi_insn): Likewise.
30598 (movsi_set_cc_insn): Likewise.
30599 (loadqi_update): Likewise.
30600 (load_zeroextendqisi_update): Likewise.
30601 (load_signextendqisi_update): Likewise.
30602 (loadhi_update): Likewise.
30603 (load_zeroextendhisi_update): Likewise.
30604 (load_signextendhisi_update): Likewise.
30605 (loadsi_update): Likewise.
30606 (loadsf_update): Likewise.
30607 (movsicc_insn): Likewise.
30608 (bset_insn): Likewise.
30609 (bxor_insn): Likewise.
30610 (bclr_insn): Likewise.
30611 (bmsk_insn): Likewise.
30612 (bicsi3_insn): Likewise.
30613 (cmpsi_cc_c_insn): Likewise.
30614 (movsi_ne): Likewise.
30615 (movsi_cond_exec): Likewise.
30616 (clrsbsi2): Likewise.
30617 (norm_f): Likewise.
30618 (normw): Likewise.
30619 (swap): Likewise.
30620 (divaw): Likewise.
30621 (flag): Likewise.
30622 (sr): Likewise.
30623 (kflag): Likewise.
30624 (ffs): Likewise.
30625 (ffs_f): Likewise.
30626 (fls): Likewise.
30627 (call_i): Remove 'S' asm letter, add jli instruction.
30628 (call_value_i): Likewise.
30629 * config/arc/arc.op (mjli-always): New option.
30630 * config/arc/constraints.md (Cji): New constraint.
30631 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
30632 operand.
30633 (subsf3_fpx): Likewise.
30634 (mulsf3_fpx): Likewise.
30635 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
30636 asm operand.
30637 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
30638 function attrbutes.
30639 * doc/invoke.texi (ARC): Document mjli-always option.
30640
30641 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
30642
30643 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
30644 avoid addition with 0 and use incw and decw where possible.
30645
30646 2018-01-26 Richard Biener <rguenther@suse.de>
30647
30648 PR tree-optimization/81082
30649 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
30650 association if it requires casting to unsigned.
30651 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
30652 from fold_plusminus_mult_expr to catch important cases late when
30653 range info is available.
30654
30655 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30656
30657 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
30658 * configure.ac (hidden_linkonce): New test.
30659 * configure: Regenerate.
30660 * config.in: Regenerate.
30661
30662 2018-01-26 Julia Koval <julia.koval@intel.com>
30663
30664 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
30665 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
30666 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
30667 _mm_mask_bitshuffle_epi64_mask): Fix type.
30668 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
30669 USI_FTYPE_V4DI_V4DI_USI): Remove.
30670 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
30671 __builtin_ia32_vpshufbitqmb256_mask,
30672 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
30673 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
30674 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
30675
30676 2018-01-26 Alan Modra <amodra@gmail.com>
30677
30678 PR target/84033
30679 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
30680 UNSPEC_VBPERMQ. Sort other unspecs.
30681
30682 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
30683
30684 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
30685
30686 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
30687
30688 PR middle-end/83055
30689 * predict.c (drop_profile): Do not push/pop cfun; update also
30690 node->count.
30691 (handle_missing_profiles): Fix logic looking for zero profiles.
30692
30693 2018-01-25 Jakub Jelinek <jakub@redhat.com>
30694
30695 PR middle-end/83977
30696 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
30697 on functions with #pragma omp declare simd or functions with simd
30698 attribute.
30699 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
30700 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
30701 Remove trailing \n from warning_at calls.
30702
30703 2018-01-25 Tom de Vries <tom@codesourcery.com>
30704
30705 PR target/84028
30706 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30707 for neutered workers.
30708
30709 2018-01-24 Joseph Myers <joseph@codesourcery.com>
30710
30711 PR target/68467
30712 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
30713 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
30714
30715 2018-01-24 Jeff Law <law@redhat.com>
30716
30717 PR target/83994
30718 * i386.c (get_probe_interval): Move to earlier point.
30719 (ix86_compute_frame_layout): If -fstack-clash-protection and
30720 the frame is larger than the probe interval, then use pushes
30721 to save registers rather than reg->mem moves.
30722 (ix86_expand_prologue): Remove conditional for int_registers_saved
30723 assertion.
30724
30725 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
30726
30727 PR target/84014
30728 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
30729 min/max for never referenced object.
30730
30731 2018-01-24 Jakub Jelinek <jakub@redhat.com>
30732
30733 PR middle-end/83977
30734 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
30735 here.
30736 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
30737 attributes from DECL_ATTRIBUTES (decl) without affecting
30738 DECL_ATTRIBUTES (current_function_decl).
30739 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
30740 functions with non-NULL DECL_ABSTRACT_ORIGIN.
30741
30742 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
30743
30744 PR tree-optimization/83979
30745 * fold-const.c (fold_comparison): Use constant_boolean_node
30746 instead of boolean_{true,false}_node.
30747
30748 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
30749
30750 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
30751 with zero counts.
30752
30753 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30754
30755 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30756 Simplify the clause that sets the length attribute.
30757 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30758 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
30759 clause that sets the length attribute.
30760 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30761
30762 2018-01-24 Tom de Vries <tom@codesourcery.com>
30763
30764 PR target/83589
30765 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
30766 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
30767 Add strict parameter.
30768 (prevent_branch_around_nothing): Insert dummy insn between branch to
30769 label and label with no ptx insn inbetween.
30770 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
30771
30772 2018-01-24 Tom de Vries <tom@codesourcery.com>
30773
30774 PR target/81352
30775 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30776 for neutered threads in warp.
30777 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
30778
30779 2018-01-24 Richard Biener <rguenther@suse.de>
30780
30781 PR tree-optimization/83176
30782 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
30783 operands.
30784
30785 2018-01-24 Richard Biener <rguenther@suse.de>
30786
30787 PR tree-optimization/82819
30788 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
30789 code generating pluses that are no-ops in the target precision.
30790
30791 2018-01-24 Richard Biener <rguenther@suse.de>
30792
30793 PR middle-end/84000
30794 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
30795
30796 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30797
30798 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
30799 to merge probabilities.
30800 * predict.c (probably_never_executed): Also mark as cold functions
30801 with global 0 profile and guessed local profile.
30802 * profile-count.c (profile_probability::combine_with_count): New
30803 member function.
30804 * profile-count.h (profile_probability::operator*,
30805 profile_probability::operator*=, profile_probability::operator/,
30806 profile_probability::operator/=): Reduce precision to adjusted
30807 and set value to guessed on contradictory divisions.
30808 (profile_probability::combine_with_freq): Remove.
30809 (profile_probability::combine_wiht_count): Declare.
30810 (profile_count::force_nonzero):: Set to adjusted.
30811 (profile_count::probability_in):: Set quality to adjusted.
30812 * tree-ssa-tail-merge.c (replace_block_by): Use
30813 combine_with_count.
30814
30815 2018-01-23 Andrew Waterman <andrew@sifive.com>
30816 Jim Wilson <jimw@sifive.com>
30817
30818 * config/riscv/riscv.c (riscv_stack_boundary): New.
30819 (riscv_option_override): Set riscv_stack_boundary. Handle
30820 riscv_preferred_stack_boundary_arg.
30821 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
30822 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
30823 (STACK_BOUNDARY): Set to riscv_stack_boundary.
30824 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
30825 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
30826 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
30827
30828 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
30829
30830 PR target/83905
30831 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
30832 of struct ix86_frame.
30833 (ix86_expand_epilogue): Likewise. Add a local variable for
30834 the reg_save_offset field in struct ix86_frame.
30835
30836 2018-01-23 Bin Cheng <bin.cheng@arm.com>
30837
30838 PR tree-optimization/82604
30839 * tree-loop-distribution.c (enum partition_kind): New enum item
30840 PKIND_PARTIAL_MEMSET.
30841 (partition_builtin_p): Support above new enum item.
30842 (generate_code_for_partition): Ditto.
30843 (compute_access_range): Differentiate cases that equality can be
30844 proven at all loops, the innermost loops or no loops.
30845 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
30846 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
30847 (finalize_partitions, distribute_loop): Don't fuse partition of
30848 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
30849 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
30850 parloop is enabled.
30851
30852 2018-01-23 Martin Liska <mliska@suse.cz>
30853
30854 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
30855 order to ignore the predictor.
30856 (PRED_POLYMORPHIC_CALL): Likewise.
30857 (PRED_RECURSIVE_CALL): Likewise.
30858
30859 2018-01-23 Martin Liska <mliska@suse.cz>
30860
30861 * tree-profile.c (tree_profiling): Print function header to
30862 aware reader which function we are working on.
30863 * value-prof.c (gimple_find_values_to_profile): Do not print
30864 not interesting value histograms.
30865
30866 2018-01-23 Martin Liska <mliska@suse.cz>
30867
30868 * profile-count.h (enum profile_quality): Add
30869 profile_uninitialized as the first value. Do not number values
30870 as they are zero based.
30871 (profile_count::verify): Update sanity check.
30872 (profile_probability::verify): Likewise.
30873
30874 2018-01-23 Nathan Sidwell <nathan@acm.org>
30875
30876 * doc/invoke.texi (ffor-scope): Deprecate.
30877
30878 2018-01-23 David Malcolm <dmalcolm@redhat.com>
30879
30880 PR tree-optimization/83510
30881 * domwalk.c (set_all_edges_as_executable): New function.
30882 (dom_walker::dom_walker): Convert bool param
30883 "skip_unreachable_blocks" to enum reachability. Move setup of
30884 edge flags to set_all_edges_as_executable and only do it when
30885 reachability is REACHABLE_BLOCKS.
30886 * domwalk.h (enum dom_walker::reachability): New enum.
30887 (dom_walker::dom_walker): Convert bool param
30888 "skip_unreachable_blocks" to enum reachability.
30889 (set_all_edges_as_executable): New decl.
30890 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
30891 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
30892 "reachability".
30893 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
30894 but converting true to REACHABLE_BLOCKS.
30895 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
30896 * tree-vrp.c
30897 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
30898 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
30899 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
30900 REACHABLE_BLOCKS.
30901 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
30902 if check_all_array_refs will be called.
30903
30904 2018-01-23 David Malcolm <dmalcolm@redhat.com>
30905
30906 * tree.c (selftest::test_location_wrappers): Add more test
30907 coverage.
30908
30909 2018-01-23 David Malcolm <dmalcolm@redhat.com>
30910
30911 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
30912 (selftest::test_bit_in_range): Likewise.
30913
30914 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
30915
30916 PR testsuite/83888
30917 * doc/sourcebuild.texi (vect_float): Say that the selector
30918 only describes the situation when -funsafe-math-optimizations is on.
30919 (vect_float_strict): Document.
30920
30921 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
30922
30923 PR tree-optimization/83965
30924 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
30925 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
30926 instead of checking only for a reduction.
30927 (vect_recog_widen_sum_pattern): Likewise.
30928
30929 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30930
30931 * predict.c (probably_never_executed): Only use precise profile info.
30932 (compute_function_frequency): Skip after inlining hack since we now
30933 have quality checking.
30934
30935 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30936
30937 * profile-count.h (profile_probability::very_unlikely,
30938 profile_probability::unlikely, profile_probability::even): Set
30939 precision to guessed.
30940
30941 2018-01-23 Richard Biener <rguenther@suse.de>
30942
30943 PR tree-optimization/83963
30944 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
30945 Properly terminate dominator walk when crossing the exit edge not
30946 when visiting its source block.
30947
30948 2018-01-23 Jakub Jelinek <jakub@redhat.com>
30949
30950 PR c++/83918
30951 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
30952 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
30953
30954 2018-01-22 Jakub Jelinek <jakub@redhat.com>
30955
30956 PR tree-optimization/83957
30957 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
30958 semicolon after for body surrounded by braces.
30959
30960 PR tree-optimization/83081
30961 * profile-count.h (profile_probability::split): New method.
30962 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
30963 Use profile_probability::split.
30964 (do_compare_rtx_and_jump): Fix adjustment of probabilities
30965 when splitting a single conditional jump into 2.
30966
30967 2018-01-22 David Malcolm <dmalcolm@redhat.com>
30968
30969 PR tree-optimization/69452
30970 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
30971 decl.
30972
30973 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
30974
30975 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
30976 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
30977 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
30978
30979 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
30980
30981 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
30982 declaration.
30983 * config/rl78/rl78.md (movdi): New define_expand.
30984 * config/rl78/rl78.c (rl78_split_movdi): New function.
30985
30986 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
30987
30988 PR target/83862
30989 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
30990 no longer used.
30991 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
30992 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
30993 128-bit to produce an UNSPEC move to get the double word with the
30994 signbit and then a shift directly to do signbit.
30995 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
30996 implementation with a new version that just does either a direct
30997 move or a regular move. Move memory interface to separate insns.
30998 Move insns so they are next to the expander.
30999 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
31000 with signbit move. Split big and little endian case.
31001 (signbit<mode>2_dm_mem_le): Likewise.
31002 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
31003 (signbit<mode>2_dm2): Likewise.
31004
31005 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31006
31007 * config/rl78/rl78.md (anddi3): New define_expand.
31008
31009 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31010
31011 * config/rl78/rl78.md (umindi3): New define_expand.
31012
31013 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31014
31015 * config/rl78/rl78.md (smindi3): New define_expand.
31016
31017 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31018
31019 * config/rl78/rl78.md (smaxdi3): New define_expand.
31020
31021 2018-01-22 Carl Love <cel@us.ibm.com>
31022
31023 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
31024 LVX_V1TI): Add macro expansion.
31025 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
31026 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
31027 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
31028 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
31029 Change check to determine if the instruction is a byte reversing
31030 entry. Fix typo in comment.
31031 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
31032 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
31033 Add def_builtin calls for new builtins.
31034 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
31035 Add define_insn expansion.
31036
31037 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31038
31039 * config/rl78/rl78.md (umaxdi3): New define_expand.
31040
31041 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31042
31043 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
31044 for non-QImode registers.
31045
31046 2018-01-22 Richard Biener <rguenther@suse.de>
31047
31048 PR tree-optimization/83963
31049 * graphite-scop-detection.c (scop_detection::get_sese): Delay
31050 including the loop exit block.
31051 (scop_detection::merge_sese): Likewise.
31052 (scop_detection::add_scop): Do it here instead.
31053
31054 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31055
31056 * doc/sourcebuild.texi (arm_softfloat): Document.
31057
31058 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
31059
31060 PR gcc/77734
31061 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
31062 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
31063 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
31064
31065 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31066 David Edelsohn <dje.gcc@gmail.com>
31067
31068 PR target/83946
31069 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31070 Change "crset eq" to "crset 2".
31071 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31072 (*call_indirect_aix<mode>_nospec): Likewise.
31073 (*call_value_indirect_aix<mode>_nospec): Likewise.
31074 (*call_indirect_elfv2<mode>_nospec): Likewise.
31075 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
31076 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
31077 change assembly output from . to $.
31078 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31079 (indirect_jump<mode>_nospec): Change assembly output from . to $.
31080 (*tablejump<mode>_internal1_nospec): Likewise.
31081
31082 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
31083
31084 PR target/80870
31085 * config/sh/sh_optimize_sett_clrt.cc:
31086 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
31087
31088 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
31089
31090 PR tree-optimization/83940
31091 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
31092 offset_dt to vect_constant_def rather than vect_unknown_def_type.
31093 (vect_check_load_store_mask): Add a mask_dt_out parameter and
31094 use it to pass back the definition type.
31095 (vect_check_store_rhs): Likewise rhs_dt_out.
31096 (vect_build_gather_load_calls): Add a mask_dt argument and use
31097 it instead of a call to vect_is_simple_use.
31098 (vectorizable_store): Update calls to vect_check_load_store_mask
31099 and vect_check_store_rhs. Use the dt returned by the latter instead
31100 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
31101 instead of calls to vect_is_simple_use. Pass the scalar rather
31102 than the vector operand to vect_is_simple_use when handling
31103 second and subsequent copies of an rhs value.
31104 (vectorizable_load): Update calls to vect_check_load_store_mask
31105 and vect_build_gather_load_calls. Use the cached mask_dt and
31106 gs_info.offset_dt instead of calls to vect_is_simple_use.
31107
31108 2018-01-20 Jakub Jelinek <jakub@redhat.com>
31109
31110 PR middle-end/83945
31111 * tree-emutls.c: Include gimplify.h.
31112 (lower_emutls_2): New function.
31113 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
31114 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
31115 it before further processing.
31116
31117 PR target/83930
31118 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
31119 UINTVAL (trueop1) instead of INTVAL (op1).
31120
31121 2018-01-19 Jakub Jelinek <jakub@redhat.com>
31122
31123 PR debug/81570
31124 PR debug/83728
31125 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
31126 INCOMING_FRAME_SP_OFFSET if not defined.
31127 (scan_trace): Add ENTRY argument. If true and
31128 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
31129 emit a note to adjust the CFA offset.
31130 (create_cfi_notes): Adjust scan_trace callers.
31131 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
31132 INCOMING_FRAME_SP_OFFSET in the CIE.
31133 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
31134 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
31135 Likewise.
31136 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
31137 * doc/tm.texi: Regenerated.
31138
31139 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
31140
31141 PR rtl-optimization/83147
31142 * lra-constraints.c (remove_inheritance_pseudos): Use
31143 lra_substitute_pseudo_within_insn.
31144
31145 2018-01-19 Tom de Vries <tom@codesourcery.com>
31146 Cesar Philippidis <cesar@codesourcery.com>
31147
31148 PR target/83920
31149 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
31150
31151 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
31152
31153 PR target/83790
31154 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
31155 spaces for function labels.
31156
31157 2018-01-19 Martin Liska <mliska@suse.cz>
31158
31159 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
31160 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
31161 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
31162 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
31163 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
31164 (PRED_CONST_RETURN): Change from 69 to 65.
31165 (PRED_NULL_RETURN): Change from 91 to 71.
31166 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
31167 (PRED_LOOP_GUARD): Change from 66 to 73.
31168
31169 2018-01-19 Martin Liska <mliska@suse.cz>
31170
31171 * predict.c (predict_insn_def): Add new assert.
31172 (struct branch_predictor): Change type to signed integer.
31173 (test_prediction_value_range): Amend test to cover
31174 PROB_UNINITIALIZED.
31175 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
31176 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
31177 (PRED_LOOP_ITERATIONS_MAX): Likewise.
31178 (PRED_LOOP_IV_COMPARE): Likewise.
31179 * predict.h (PROB_UNINITIALIZED): Define new constant.
31180
31181 2018-01-19 Martin Liska <mliska@suse.cz>
31182
31183 * predict.c (dump_prediction): Add new format for
31184 analyze_brprob.py script which is enabled with -details
31185 suboption.
31186 * profile-count.h (precise_p): New function.
31187
31188 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31189
31190 PR tree-optimization/83922
31191 * tree-vect-loop.c (vect_verify_full_masking): Return false if
31192 there are no statements that need masking.
31193 (vect_active_double_reduction_p): New function.
31194 (vect_analyze_loop_operations): Use it when handling phis that
31195 are not in the loop header.
31196
31197 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31198
31199 PR tree-optimization/83914
31200 * tree-vect-loop.c (vectorizable_induction): Don't convert
31201 init_expr or apply the peeling adjustment for inductions
31202 that are nested within the vectorized loop.
31203
31204 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31205
31206 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
31207 instead of NEG.
31208
31209 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31210
31211 PR sanitizer/81715
31212 PR testsuite/83882
31213 * function.h (gimplify_parameters): Add gimple_seq * argument.
31214 * function.c: Include gimple.h and options.h.
31215 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
31216 for the added local temporaries if needed.
31217 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
31218 if there are any parameter cleanups, wrap whole body into a
31219 try/finally with the cleanups.
31220
31221 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
31222
31223 PR target/82964
31224 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
31225 Use GET_MODE_CLASS for scalar floating point.
31226
31227 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31228
31229 PR ipa/82256
31230 patch by PaX Team
31231 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
31232 Fix call of call_cgraph_insertion_hooks.
31233
31234 2018-01-18 Martin Sebor <msebor@redhat.com>
31235
31236 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
31237
31238 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31239
31240 PR ipa/83619
31241 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
31242 frequencies.
31243
31244 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
31245
31246 PR other/70268
31247 * common.opt: (-ffile-prefix-map): New option.
31248 * opts.c (common_handle_option): Defer it.
31249 * opts-global.c (handle_common_deferred_options): Handle it.
31250 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
31251 * file-prefix-map.h: New file.
31252 (remap_debug_filename, add_debug_prefix_map): ...here.
31253 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
31254 * final.c (debug_prefix_map, add_debug_prefix_map
31255 remap_debug_filename): Move to...
31256 * file-prefix-map.c: New file.
31257 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
31258 generalize, get rid of alloca(), use strrchr() instead of strchr().
31259 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
31260 Implement in terms of add_prefix_map().
31261 (remap_macro_filename, remap_debug_filename): Implement in term of
31262 remap_filename().
31263 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
31264 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
31265 * dbxout.c: Include file-prefix-map.h.
31266 * varasm.c: Likewise.
31267 * vmsdbgout.c: Likewise.
31268 * xcoffout.c: Likewise.
31269 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
31270 * doc/cppopts.texi (-fmacro-prefix-map): Document.
31271 * doc/invoke.texi (-ffile-prefix-map): Document.
31272 (-fdebug-prefix-map): Update description.
31273
31274 2018-01-18 Martin Liska <mliska@suse.cz>
31275
31276 * config/i386/i386.c (indirect_thunk_name): Document that also
31277 lfence is emitted.
31278 (output_indirect_thunk): Document why both instructions
31279 (pause and lfence) are generated.
31280
31281 2018-01-18 Richard Biener <rguenther@suse.de>
31282
31283 PR tree-optimization/83887
31284 * graphite-scop-detection.c
31285 (scop_detection::get_nearest_dom_with_single_entry): Remove.
31286 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
31287 (scop_detection::merge_sese): Re-implement with a flood-fill
31288 algorithm that properly finds a SESE region if it exists.
31289
31290 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31291
31292 PR c/61240
31293 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
31294 pointer_diff optimizations use view_convert instead of convert.
31295
31296 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31297
31298 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31299 Generate different code for -mno-speculate-indirect-jumps.
31300 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31301 (*call_indirect_aix<mode>): Disable for
31302 -mno-speculate-indirect-jumps.
31303 (*call_indirect_aix<mode>_nospec): New define_insn.
31304 (*call_value_indirect_aix<mode>): Disable for
31305 -mno-speculate-indirect-jumps.
31306 (*call_value_indirect_aix<mode>_nospec): New define_insn.
31307 (*sibcall_nonlocal_sysv<mode>): Generate different code for
31308 -mno-speculate-indirect-jumps.
31309 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31310
31311 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
31312
31313 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
31314 long double type, set the flags for noting the default long double
31315 type, even if we don't pass or return a long double type.
31316
31317 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
31318
31319 PR ipa/83051
31320 * ipa-inline.c (flatten_function): Do not overwrite final inlining
31321 failure.
31322
31323 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
31324
31325 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
31326 support for merge[hl].
31327 (fold_mergehl_helper): New helper function.
31328 (tree-vector-builder.h): New #include for tree_vector_builder usage.
31329 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
31330 (altivec_vmrglw_direct): Add xxmrglw insn.
31331
31332 2018-01-17 Andrew Waterman <andrew@sifive.com>
31333
31334 * config/riscv/riscv.c (riscv_conditional_register_usage): If
31335 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
31336
31337 2018-01-17 David Malcolm <dmalcolm@redhat.com>
31338
31339 PR lto/83121
31340 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
31341 call the lto_location_cache before reading the
31342 DECL_SOURCE_LOCATION of the types.
31343
31344 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
31345 Richard Sandiford <richard.sandiford@linaro.org>
31346
31347 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
31348 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
31349 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
31350 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
31351 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
31352 Add declaration.
31353 * config/aarch64/constraints.md (aarch64_movti_operand):
31354 Limit immediates.
31355 * config/aarch64/predicates.md (Uti): Add new constraint.
31356
31357 2018-01-17 Carl Love <cel@us.ibm.com>
31358
31359 * config/rs6000/vsx.md (define_expand xl_len_r,
31360 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
31361 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
31362 lxvll.
31363 (define_expand, define_insn): Move the shift left from the
31364 define_insn to the define_expand for lxvl and stxvl instructions.
31365 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
31366 and XL_LEN_R definitions to PURE.
31367
31368 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
31369
31370 * config/i386/i386.c (indirect_thunk_name): Declare regno
31371 as unsigned int. Compare regno with INVALID_REGNUM.
31372 (output_indirect_thunk): Ditto.
31373 (output_indirect_thunk_function): Ditto.
31374 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
31375 in the call to output_indirect_thunk_function.
31376
31377 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
31378
31379 PR middle-end/83884
31380 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
31381 rather than the size of inner_type to determine the stack slot size
31382 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
31383
31384 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
31385
31386 PR target/83546
31387 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
31388 to PTA_SILVERMONT.
31389
31390 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
31391
31392 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
31393 endian Linux systems to optionally enable multilibs for selecting
31394 the long double type if the user configured an explicit type.
31395 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
31396 have no long double multilibs if not defined.
31397 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
31398 warn if the user used -mabi={ieee,ibm}longdouble and we built
31399 multilibs for long double.
31400 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
31401 appropriate multilib option.
31402 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
31403 multilib options.
31404 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
31405 for building long double multilibs.
31406 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
31407
31408 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
31409
31410 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
31411 copies.
31412
31413 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
31414 64 bits.
31415 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
31416 128 bits.
31417
31418 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
31419 variables.
31420
31421 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
31422 return value.
31423
31424 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31425
31426 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
31427 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
31428
31429 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
31430
31431 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
31432 different rtl trees depending on TARGET_64BIT.
31433 (rs6000_gen_lvx): Likewise.
31434
31435 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31436
31437 * config/visium/visium.md (nop): Tweak comment.
31438 (hazard_nop): Likewise.
31439
31440 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31441
31442 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
31443 -mspeculate-indirect-jumps.
31444 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
31445 for -mno-speculate-indirect-jumps.
31446 (*call_indirect_elfv2<mode>_nospec): New define_insn.
31447 (*call_value_indirect_elfv2<mode>): Disable for
31448 -mno-speculate-indirect-jumps.
31449 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
31450 (indirect_jump): Emit different RTL for
31451 -mno-speculate-indirect-jumps.
31452 (*indirect_jump<mode>): Disable for
31453 -mno-speculate-indirect-jumps.
31454 (*indirect_jump<mode>_nospec): New define_insn.
31455 (tablejump): Emit different RTL for
31456 -mno-speculate-indirect-jumps.
31457 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
31458 (tablejumpsi_nospec): New define_expand.
31459 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
31460 (tablejumpdi_nospec): New define_expand.
31461 (*tablejump<mode>_internal1): Disable for
31462 -mno-speculate-indirect-jumps.
31463 (*tablejump<mode>_internal1_nospec): New define_insn.
31464 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
31465 option.
31466
31467 2018-01-16 Artyom Skrobov tyomitch@gmail.com
31468
31469 * caller-save.c (insert_save): Drop unnecessary parameter. All
31470 callers updated.
31471
31472 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31473 Richard Biener <rguenth@suse.de>
31474
31475 PR libgomp/83590
31476 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
31477 return early, inline manually is_gimple_sizepos. Make sure if we
31478 call gimplify_expr we don't end up with a gimple constant.
31479 * tree.c (variably_modified_type_p): Don't return true for
31480 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
31481 * gimplify.h (is_gimple_sizepos): Remove.
31482
31483 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31484
31485 PR tree-optimization/83857
31486 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
31487 vectorizable_live_operation for pure SLP statements.
31488 (vectorizable_live_operation): Handle PHIs.
31489
31490 2018-01-16 Richard Biener <rguenther@suse.de>
31491
31492 PR tree-optimization/83867
31493 * tree-vect-stmts.c (vect_transform_stmt): Precompute
31494 nested_in_vect_loop_p since the scalar stmt may get invalidated.
31495
31496 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31497
31498 PR c/83844
31499 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
31500 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
31501 If off is not INTEGER_CST, issue a may not be aligned warning
31502 rather than isn't aligned. Use isn%'t rather than isn't.
31503 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
31504 into MULT_EXPR.
31505 <case MULT_EXPR>: Improve the case when bottom and one of the
31506 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
31507 operand, in that case check if the other operand is multiple of
31508 bottom divided by the INTEGER_CST operand.
31509
31510 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31511
31512 PR target/83858
31513 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
31514 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
31515 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
31516 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
31517 * config/pa/pa.c (pa_function_arg_advance): Likewise.
31518 (pa_function_arg, pa_arg_partial_bytes): Likewise.
31519 (pa_function_arg_size): New function.
31520
31521 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31522
31523 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
31524 in a separate statement.
31525
31526 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31527
31528 PR tree-optimization/83847
31529 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
31530 group gathers and scatters.
31531
31532 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31533
31534 PR rtl-optimization/86620
31535 * params.def (max-sched-ready-insns): Bump minimum value to 1.
31536
31537 PR rtl-optimization/83213
31538 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
31539 to last if both are JUMP_INSNs.
31540
31541 PR tree-optimization/83843
31542 * gimple-ssa-store-merging.c
31543 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
31544 store_immediate_info for bswap/nop orig_stores.
31545
31546 2018-01-15 Andrew Waterman <andrew@sifive.com>
31547
31548 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
31549 !TARGET_MUL.
31550 <UDIV>: Increase cost if !TARGET_DIV.
31551
31552 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
31553
31554 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
31555 (define_attr "cr_logical_3op"): New.
31556 (cceq_ior_compare): Adjust.
31557 (cceq_ior_compare_complement): Adjust.
31558 (*cceq_rev_compare): Adjust.
31559 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
31560 (is_cracked_insn): Adjust.
31561 (insn_must_be_first_in_group): Adjust.
31562 * config/rs6000/40x.md: Adjust.
31563 * config/rs6000/440.md: Adjust.
31564 * config/rs6000/476.md: Adjust.
31565 * config/rs6000/601.md: Adjust.
31566 * config/rs6000/603.md: Adjust.
31567 * config/rs6000/6xx.md: Adjust.
31568 * config/rs6000/7450.md: Adjust.
31569 * config/rs6000/7xx.md: Adjust.
31570 * config/rs6000/8540.md: Adjust.
31571 * config/rs6000/cell.md: Adjust.
31572 * config/rs6000/e300c2c3.md: Adjust.
31573 * config/rs6000/e500mc.md: Adjust.
31574 * config/rs6000/e500mc64.md: Adjust.
31575 * config/rs6000/e5500.md: Adjust.
31576 * config/rs6000/e6500.md: Adjust.
31577 * config/rs6000/mpc.md: Adjust.
31578 * config/rs6000/power4.md: Adjust.
31579 * config/rs6000/power5.md: Adjust.
31580 * config/rs6000/power6.md: Adjust.
31581 * config/rs6000/power7.md: Adjust.
31582 * config/rs6000/power8.md: Adjust.
31583 * config/rs6000/power9.md: Adjust.
31584 * config/rs6000/rs64.md: Adjust.
31585 * config/rs6000/titan.md: Adjust.
31586
31587 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31588
31589 * config/i386/predicates.md (indirect_branch_operand): Rewrite
31590 ix86_indirect_branch_register logic.
31591
31592 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31593
31594 * config/i386/constraints.md (Bs): Update
31595 ix86_indirect_branch_register check. Don't check
31596 ix86_indirect_branch_register with GOT_memory_operand.
31597 (Bw): Likewise.
31598 * config/i386/predicates.md (GOT_memory_operand): Don't check
31599 ix86_indirect_branch_register here.
31600 (GOT32_symbol_operand): Likewise.
31601
31602 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31603
31604 * config/i386/predicates.md (constant_call_address_operand):
31605 Rewrite ix86_indirect_branch_register logic.
31606 (sibcall_insn_operand): Likewise.
31607
31608 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31609
31610 * config/i386/constraints.md (Bs): Replace
31611 ix86_indirect_branch_thunk_register with
31612 ix86_indirect_branch_register.
31613 (Bw): Likewise.
31614 * config/i386/i386.md (indirect_jump): Likewise.
31615 (tablejump): Likewise.
31616 (*sibcall_memory): Likewise.
31617 (*sibcall_value_memory): Likewise.
31618 Peepholes of indirect call and jump via memory: Likewise.
31619 * config/i386/i386.opt: Likewise.
31620 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31621 (GOT_memory_operand): Likewise.
31622 (call_insn_operand): Likewise.
31623 (sibcall_insn_operand): Likewise.
31624 (GOT32_symbol_operand): Likewise.
31625
31626 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31627
31628 PR middle-end/83837
31629 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
31630 type rather than type addr's type points to.
31631 (expand_omp_atomic_mutex): Likewise.
31632 (expand_omp_atomic): Likewise.
31633
31634 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31635
31636 PR target/83839
31637 * config/i386/i386.c (output_indirect_thunk_function): Use
31638 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
31639 for __x86_return_thunk.
31640
31641 2018-01-15 Richard Biener <rguenther@suse.de>
31642
31643 PR middle-end/83850
31644 * expmed.c (extract_bit_field_1): Fix typo.
31645
31646 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31647
31648 PR target/83687
31649 * config/arm/iterators.md (VF): New mode iterator.
31650 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
31651 Remove integer-related logic from pattern.
31652 (neon_vabd<mode>_3): Likewise.
31653
31654 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31655
31656 PR middle-end/82694
31657 * common.opt (fstrict-overflow): No longer an alias.
31658 (fwrapv-pointer): New option.
31659 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
31660 also for pointer types based on flag_wrapv_pointer.
31661 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
31662 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
31663 opts->x_flag_wrapv got set.
31664 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
31665 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
31666 POINTER_TYPE_OVERFLOW_UNDEFINED.
31667 * match.pd: Likewise in address comparison pattern.
31668 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
31669
31670 2018-01-15 Richard Biener <rguenther@suse.de>
31671
31672 PR lto/83804
31673 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
31674 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
31675 Reset type names to their identifier if their TYPE_DECL doesn't
31676 have linkage (and thus is used for ODR and devirt).
31677 (save_debug_info_for_decl): Remove.
31678 (save_debug_info_for_type): Likewise.
31679 (add_tree_to_fld_list): Adjust.
31680 * tree-pretty-print.c (dump_generic_node): Make dumping of
31681 type names more robust.
31682
31683 2018-01-15 Richard Biener <rguenther@suse.de>
31684
31685 * BASE-VER: Bump to 8.0.1.
31686
31687 2018-01-14 Martin Sebor <msebor@redhat.com>
31688
31689 PR other/83508
31690 * builtins.c (check_access): Avoid warning when the no-warning bit
31691 is set.
31692
31693 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
31694
31695 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
31696 * ira-color (allocno_hard_regs_compare): Likewise.
31697
31698 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
31699
31700 PR target/83013
31701 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
31702 Use .pushsection/.popsection.
31703
31704 2018-01-14 Martin Sebor <msebor@redhat.com>
31705
31706 PR c++/81327
31707 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
31708
31709 2018-01-14 Jakub Jelinek <jakub@redhat.com>
31710
31711 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
31712 entry from extra_headers.
31713 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
31714 extra_headers, make the list bitwise identical to the i?86-*-* one.
31715
31716 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31717
31718 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
31719 -mcmodel=large with -mindirect-branch=thunk,
31720 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
31721 -mfunction-return=thunk-extern.
31722 * doc/invoke.texi: Document -mcmodel=large is incompatible with
31723 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
31724 -mfunction-return=thunk and -mfunction-return=thunk-extern.
31725
31726 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31727
31728 * config/i386/i386.c (print_reg): Print the name of the full
31729 integer register without '%'.
31730 (ix86_print_operand): Handle 'V'.
31731 * doc/extend.texi: Document 'V' modifier.
31732
31733 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31734
31735 * config/i386/constraints.md (Bs): Disallow memory operand for
31736 -mindirect-branch-register.
31737 (Bw): Likewise.
31738 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31739 (GOT_memory_operand): Likewise.
31740 (call_insn_operand): Likewise.
31741 (sibcall_insn_operand): Likewise.
31742 (GOT32_symbol_operand): Likewise.
31743 * config/i386/i386.md (indirect_jump): Call convert_memory_address
31744 for -mindirect-branch-register.
31745 (tablejump): Likewise.
31746 (*sibcall_memory): Likewise.
31747 (*sibcall_value_memory): Likewise.
31748 Disallow peepholes of indirect call and jump via memory for
31749 -mindirect-branch-register.
31750 (*call_pop): Replace m with Bw.
31751 (*call_value_pop): Likewise.
31752 (*sibcall_pop_memory): Replace m with Bs.
31753 * config/i386/i386.opt (mindirect-branch-register): New option.
31754 * doc/invoke.texi: Document -mindirect-branch-register option.
31755
31756 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31757
31758 * config/i386/i386-protos.h (ix86_output_function_return): New.
31759 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
31760 set function_return_type.
31761 (indirect_thunk_name): Add ret_p to indicate thunk for function
31762 return.
31763 (output_indirect_thunk_function): Pass false to
31764 indirect_thunk_name.
31765 (ix86_output_indirect_branch_via_reg): Likewise.
31766 (ix86_output_indirect_branch_via_push): Likewise.
31767 (output_indirect_thunk_function): Create alias for function
31768 return thunk if regno < 0.
31769 (ix86_output_function_return): New function.
31770 (ix86_handle_fndecl_attribute): Handle function_return.
31771 (ix86_attribute_table): Add function_return.
31772 * config/i386/i386.h (machine_function): Add
31773 function_return_type.
31774 * config/i386/i386.md (simple_return_internal): Use
31775 ix86_output_function_return.
31776 (simple_return_internal_long): Likewise.
31777 * config/i386/i386.opt (mfunction-return=): New option.
31778 (indirect_branch): Mention -mfunction-return=.
31779 * doc/extend.texi: Document function_return function attribute.
31780 * doc/invoke.texi: Document -mfunction-return= option.
31781
31782 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31783
31784 * config/i386/i386-opts.h (indirect_branch): New.
31785 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
31786 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
31787 with local indirect jump when converting indirect call and jump.
31788 (ix86_set_indirect_branch_type): New.
31789 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
31790 (indirectlabelno): New.
31791 (indirect_thunk_needed): Likewise.
31792 (indirect_thunk_bnd_needed): Likewise.
31793 (indirect_thunks_used): Likewise.
31794 (indirect_thunks_bnd_used): Likewise.
31795 (INDIRECT_LABEL): Likewise.
31796 (indirect_thunk_name): Likewise.
31797 (output_indirect_thunk): Likewise.
31798 (output_indirect_thunk_function): Likewise.
31799 (ix86_output_indirect_branch_via_reg): Likewise.
31800 (ix86_output_indirect_branch_via_push): Likewise.
31801 (ix86_output_indirect_branch): Likewise.
31802 (ix86_output_indirect_jmp): Likewise.
31803 (ix86_code_end): Call output_indirect_thunk_function if needed.
31804 (ix86_output_call_insn): Call ix86_output_indirect_branch if
31805 needed.
31806 (ix86_handle_fndecl_attribute): Handle indirect_branch.
31807 (ix86_attribute_table): Add indirect_branch.
31808 * config/i386/i386.h (machine_function): Add indirect_branch_type
31809 and has_local_indirect_jump.
31810 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
31811 to true.
31812 (tablejump): Likewise.
31813 (*indirect_jump): Use ix86_output_indirect_jmp.
31814 (*tablejump_1): Likewise.
31815 (simple_return_indirect_internal): Likewise.
31816 * config/i386/i386.opt (mindirect-branch=): New option.
31817 (indirect_branch): New.
31818 (keep): Likewise.
31819 (thunk): Likewise.
31820 (thunk-inline): Likewise.
31821 (thunk-extern): Likewise.
31822 * doc/extend.texi: Document indirect_branch function attribute.
31823 * doc/invoke.texi: Document -mindirect-branch= option.
31824
31825 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
31826
31827 PR ipa/83051
31828 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
31829
31830 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
31831
31832 * ipa-inline.c (want_inline_small_function_p): Return false if
31833 inlining has already failed with CIF_FINAL_ERROR.
31834 (update_caller_keys): Call want_inline_small_function_p before
31835 can_inline_edge_p.
31836 (update_callee_keys): Likewise.
31837
31838 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
31839
31840 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
31841 New function.
31842 (rs6000_quadword_masked_address_p): Likewise.
31843 (quad_aligned_load_p): Likewise.
31844 (quad_aligned_store_p): Likewise.
31845 (const_load_sequence_p): Add comment to describe the outer-most loop.
31846 (mimic_memory_attributes_and_flags): New function.
31847 (rs6000_gen_stvx): Likewise.
31848 (replace_swapped_aligned_store): Likewise.
31849 (rs6000_gen_lvx): Likewise.
31850 (replace_swapped_aligned_load): Likewise.
31851 (replace_swapped_load_constant): Capitalize argument name in
31852 comment describing this function.
31853 (rs6000_analyze_swaps): Add a third pass to search for vector loads
31854 and stores that access quad-word aligned addresses and replace
31855 with stvx or lvx instructions when appropriate.
31856 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
31857 New function prototype.
31858 (rs6000_quadword_masked_address_p): Likewise.
31859 (rs6000_gen_lvx): Likewise.
31860 (rs6000_gen_stvx): Likewise.
31861 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
31862 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
31863 when memory address is aligned.
31864 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
31865 this split to select lvx instruction when memory address is aligned.
31866 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
31867 instruction when memory address is aligned.
31868 (*vsx_le_perm_load_v16qi): Likewise.
31869 (four unnamed splitters): Modify to select the stvx instruction
31870 when memory is aligned.
31871
31872 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
31873
31874 * predict.c (determine_unlikely_bbs): Handle correctly BBs
31875 which appears in the queue multiple times.
31876
31877 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31878 Alan Hayward <alan.hayward@arm.com>
31879 David Sherwood <david.sherwood@arm.com>
31880
31881 * tree-vectorizer.h (vec_lower_bound): New structure.
31882 (_loop_vec_info): Add check_nonzero and lower_bounds.
31883 (LOOP_VINFO_CHECK_NONZERO): New macro.
31884 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
31885 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
31886 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
31887 fields. Make seg_len the distance travelled, not including the
31888 access size.
31889 (dr_direction_indicator): Declare.
31890 (dr_zero_step_indicator): Likewise.
31891 (dr_known_forward_stride_p): Likewise.
31892 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
31893 tree-ssanames.h.
31894 (runtime_alias_check_p): Allow runtime alias checks with
31895 variable strides.
31896 (operator ==): Compare access_size and align.
31897 (prune_runtime_alias_test_list): Rework for new distinction between
31898 the access_size and seg_len.
31899 (create_intersect_range_checks_index): Likewise. Cope with polynomial
31900 segment lengths.
31901 (get_segment_min_max): New function.
31902 (create_intersect_range_checks): Use it.
31903 (dr_step_indicator): New function.
31904 (dr_direction_indicator): Likewise.
31905 (dr_zero_step_indicator): Likewise.
31906 (dr_known_forward_stride_p): Likewise.
31907 * tree-loop-distribution.c (data_ref_segment_size): Return
31908 DR_STEP * (niters - 1).
31909 (compute_alias_check_pairs): Update call to the dr_with_seg_len
31910 constructor.
31911 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
31912 (vect_preserves_scalar_order_p): New function, split out from...
31913 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
31914 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
31915 (vect_vfa_access_size): New function.
31916 (vect_vfa_align): Likewise.
31917 (vect_compile_time_alias): Take access_size_a and access_b arguments.
31918 (dump_lower_bound): New function.
31919 (vect_check_lower_bound): Likewise.
31920 (vect_small_gap_p): Likewise.
31921 (vectorizable_with_step_bound_p): Likewise.
31922 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
31923 depencies if the vectorization factor is 1. Convert the checks
31924 for nonzero steps into checks on the bounds of DR_STEP. Try using
31925 a bunds check for variable steps if the minimum required step is
31926 relatively small. Update calls to the dr_with_seg_len
31927 constructor and to vect_compile_time_alias.
31928 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
31929 function.
31930 (vect_loop_versioning): Call it.
31931 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
31932 when retrying.
31933 (vect_estimate_min_profitable_iters): Account for any bounds checks.
31934
31935 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31936 Alan Hayward <alan.hayward@arm.com>
31937 David Sherwood <david.sherwood@arm.com>
31938
31939 * doc/sourcebuild.texi (vect_scatter_store): Document.
31940 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
31941 optabs.
31942 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
31943 Document.
31944 * genopinit.c (main): Add supports_vec_scatter_store and
31945 supports_vec_scatter_store_cached to target_optabs.
31946 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
31947 IFN_MASK_SCATTER_STORE.
31948 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
31949 functions.
31950 * internal-fn.h (internal_store_fn_p): Declare.
31951 (internal_fn_stored_value_index): Likewise.
31952 * internal-fn.c (scatter_store_direct): New macro.
31953 (expand_scatter_store_optab_fn): New function.
31954 (direct_scatter_store_optab_supported_p): New macro.
31955 (internal_store_fn_p): New function.
31956 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
31957 IFN_MASK_SCATTER_STORE.
31958 (internal_fn_mask_index): Likewise.
31959 (internal_fn_stored_value_index): New function.
31960 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
31961 for scatter stores.
31962 * optabs-query.h (supports_vec_scatter_store_p): Declare.
31963 * optabs-query.c (supports_vec_scatter_store_p): New function.
31964 * tree-vectorizer.h (vect_get_store_rhs): Declare.
31965 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
31966 true for scatter stores.
31967 (vect_gather_scatter_fn_p): Handle scatter stores too.
31968 (vect_check_gather_scatter): Consider using scatter stores if
31969 supports_vec_scatter_store_p.
31970 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
31971 scatter stores too.
31972 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
31973 internal_fn_stored_value_index.
31974 (check_load_store_masking): Handle scatter stores too.
31975 (vect_get_store_rhs): Make public.
31976 (vectorizable_call): Use internal_store_fn_p.
31977 (vectorizable_store): Handle scatter store internal functions.
31978 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
31979 when deciding whether the end of the group has been reached.
31980 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
31981 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
31982 (mask_scatter_store<mode>): New insns.
31983
31984 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31985 Alan Hayward <alan.hayward@arm.com>
31986 David Sherwood <david.sherwood@arm.com>
31987
31988 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
31989 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
31990 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
31991 function.
31992 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
31993 Use vect_truncate_gather_scatter_offset if we can't treat the
31994 operation as a normal gather load or scatter store.
31995 (get_group_load_store_type): Take the gather_scatter_info
31996 as argument. Try using a gather load or scatter store for
31997 single-element groups.
31998 (get_load_store_type): Update calls to get_group_load_store_type
31999 and vect_use_strided_gather_scatters_p.
32000
32001 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32002 Alan Hayward <alan.hayward@arm.com>
32003 David Sherwood <david.sherwood@arm.com>
32004
32005 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
32006 optional tree argument.
32007 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
32008 null target hooks.
32009 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
32010 but continue to use the current value as a fallback.
32011 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
32012 to compare the updates.
32013 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
32014 (get_load_store_type): Use it when handling a strided access.
32015 (vect_get_strided_load_store_ops): New function.
32016 (vect_get_data_ptr_increment): Likewise.
32017 (vectorizable_load): Handle strided gather loads. Always pass
32018 a step to vect_create_data_ref_ptr and bump_vector_ptr.
32019
32020 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32021 Alan Hayward <alan.hayward@arm.com>
32022 David Sherwood <david.sherwood@arm.com>
32023
32024 * doc/md.texi (gather_load@var{m}): Document.
32025 (mask_gather_load@var{m}): Likewise.
32026 * genopinit.c (main): Add supports_vec_gather_load and
32027 supports_vec_gather_load_cached to target_optabs.
32028 * optabs-tree.c (init_tree_optimization_optabs): Use
32029 ggc_cleared_alloc to allocate target_optabs.
32030 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
32031 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
32032 functions.
32033 * internal-fn.h (internal_load_fn_p): Declare.
32034 (internal_gather_scatter_fn_p): Likewise.
32035 (internal_fn_mask_index): Likewise.
32036 (internal_gather_scatter_fn_supported_p): Likewise.
32037 * internal-fn.c (gather_load_direct): New macro.
32038 (expand_gather_load_optab_fn): New function.
32039 (direct_gather_load_optab_supported_p): New macro.
32040 (direct_internal_fn_optab): New function.
32041 (internal_load_fn_p): Likewise.
32042 (internal_gather_scatter_fn_p): Likewise.
32043 (internal_fn_mask_index): Likewise.
32044 (internal_gather_scatter_fn_supported_p): Likewise.
32045 * optabs-query.c (supports_at_least_one_mode_p): New function.
32046 (supports_vec_gather_load_p): Likewise.
32047 * optabs-query.h (supports_vec_gather_load_p): Declare.
32048 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
32049 and memory_type field.
32050 (NUM_PATTERNS): Bump to 15.
32051 * tree-vect-data-refs.c: Include internal-fn.h.
32052 (vect_gather_scatter_fn_p): New function.
32053 (vect_describe_gather_scatter_call): Likewise.
32054 (vect_check_gather_scatter): Try using internal functions for
32055 gather loads. Recognize existing calls to a gather load function.
32056 (vect_analyze_data_refs): Consider using gather loads if
32057 supports_vec_gather_load_p.
32058 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
32059 (vect_get_gather_scatter_offset_type): Likewise.
32060 (vect_convert_mask_for_vectype): Likewise.
32061 (vect_add_conversion_to_patterm): Likewise.
32062 (vect_try_gather_scatter_pattern): Likewise.
32063 (vect_recog_gather_scatter_pattern): New pattern recognizer.
32064 (vect_vect_recog_func_ptrs): Add it.
32065 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
32066 internal_fn_mask_index and internal_gather_scatter_fn_p.
32067 (check_load_store_masking): Take the gather_scatter_info as an
32068 argument and handle gather loads.
32069 (vect_get_gather_scatter_ops): New function.
32070 (vectorizable_call): Check internal_load_fn_p.
32071 (vectorizable_load): Likewise. Handle gather load internal
32072 functions.
32073 (vectorizable_store): Update call to check_load_store_masking.
32074 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
32075 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
32076 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
32077 (aarch64_gather_scale_operand_d): New predicates.
32078 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
32079 (mask_gather_load<mode>): New insns.
32080
32081 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32082 Alan Hayward <alan.hayward@arm.com>
32083 David Sherwood <david.sherwood@arm.com>
32084
32085 * optabs.def (fold_left_plus_optab): New optab.
32086 * doc/md.texi (fold_left_plus_@var{m}): Document.
32087 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
32088 * internal-fn.c (fold_left_direct): Define.
32089 (expand_fold_left_optab_fn): Likewise.
32090 (direct_fold_left_optab_supported_p): Likewise.
32091 * fold-const-call.c (fold_const_fold_left): New function.
32092 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
32093 * tree-parloops.c (valid_reduction_p): New function.
32094 (gather_scalar_reductions): Use it.
32095 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
32096 (vect_finish_replace_stmt): Declare.
32097 * tree-vect-loop.c (fold_left_reduction_fn): New function.
32098 (needs_fold_left_reduction_p): New function, split out from...
32099 (vect_is_simple_reduction): ...here. Accept reductions that
32100 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
32101 (vect_force_simple_reduction): Also store the reduction type in
32102 the assignment's STMT_VINFO_REDUC_TYPE.
32103 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
32104 (merge_with_identity): New function.
32105 (vect_expand_fold_left): Likewise.
32106 (vectorize_fold_left_reduction): Likewise.
32107 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
32108 scalar phi in place for it. Check for target support and reject
32109 cases that would reassociate the operation. Defer the transform
32110 phase to vectorize_fold_left_reduction.
32111 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
32112 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
32113 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
32114
32115 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32116
32117 * tree-if-conv.c (predicate_mem_writes): Remove redundant
32118 call to ifc_temp_var.
32119
32120 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32121 Alan Hayward <alan.hayward@arm.com>
32122 David Sherwood <david.sherwood@arm.com>
32123
32124 * target.def (legitimize_address_displacement): Take the original
32125 offset as a poly_int.
32126 * targhooks.h (default_legitimize_address_displacement): Update
32127 accordingly.
32128 * targhooks.c (default_legitimize_address_displacement): Likewise.
32129 * doc/tm.texi: Regenerate.
32130 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
32131 as an argument, moving assert of ad->disp == ad->disp_term to...
32132 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
32133 Try calling targetm.legitimize_address_displacement before expanding
32134 the address rather than afterwards, and adjust for the new interface.
32135 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
32136 Match the new hook interface. Handle SVE addresses.
32137 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
32138 new hook interface.
32139
32140 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32141
32142 * Makefile.in (OBJS): Add early-remat.o.
32143 * target.def (select_early_remat_modes): New hook.
32144 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
32145 * doc/tm.texi: Regenerate.
32146 * targhooks.h (default_select_early_remat_modes): Declare.
32147 * targhooks.c (default_select_early_remat_modes): New function.
32148 * timevar.def (TV_EARLY_REMAT): New timevar.
32149 * passes.def (pass_early_remat): New pass.
32150 * tree-pass.h (make_pass_early_remat): Declare.
32151 * early-remat.c: New file.
32152 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
32153 function.
32154 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
32155
32156 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32157 Alan Hayward <alan.hayward@arm.com>
32158 David Sherwood <david.sherwood@arm.com>
32159
32160 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
32161 vfm1 with a bound_epilog parameter.
32162 (vect_do_peeling): Update calls accordingly, and move the prologue
32163 call earlier in the function. Treat the base bound_epilog as 0 for
32164 fully-masked loops and retain vf - 1 for other loops. Add 1 to
32165 this base when peeling for gaps.
32166 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
32167 with fully-masked loops.
32168 (vect_estimate_min_profitable_iters): Handle the single peeled
32169 iteration in that case.
32170
32171 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32172 Alan Hayward <alan.hayward@arm.com>
32173 David Sherwood <david.sherwood@arm.com>
32174
32175 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
32176 single-element interleaving even if the size is not a power of 2.
32177 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
32178 accesses for single-element interleaving if the group size is
32179 not a power of 2.
32180
32181 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32182 Alan Hayward <alan.hayward@arm.com>
32183 David Sherwood <david.sherwood@arm.com>
32184
32185 * doc/md.texi (fold_extract_last_@var{m}): Document.
32186 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
32187 * optabs.def (fold_extract_last_optab): New optab.
32188 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
32189 * internal-fn.c (fold_extract_direct): New macro.
32190 (expand_fold_extract_optab_fn): Likewise.
32191 (direct_fold_extract_optab_supported_p): Likewise.
32192 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
32193 * tree-vect-loop.c (vect_model_reduction_cost): Handle
32194 EXTRACT_LAST_REDUCTION.
32195 (get_initial_def_for_reduction): Do not create an initial vector
32196 for EXTRACT_LAST_REDUCTION reductions.
32197 (vectorizable_reduction): Leave the scalar phi in place for
32198 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
32199 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
32200 epilogue code for EXTRACT_LAST_REDUCTION and defer the
32201 transform phase to vectorizable_condition.
32202 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
32203 split out from...
32204 (vect_finish_stmt_generation): ...here.
32205 (vect_finish_replace_stmt): New function.
32206 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
32207 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
32208 pattern.
32209 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
32210
32211 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32212 Alan Hayward <alan.hayward@arm.com>
32213 David Sherwood <david.sherwood@arm.com>
32214
32215 * doc/md.texi (extract_last_@var{m}): Document.
32216 * optabs.def (extract_last_optab): New optab.
32217 * internal-fn.def (EXTRACT_LAST): New internal function.
32218 * internal-fn.c (cond_unary_direct): New macro.
32219 (expand_cond_unary_optab_fn): Likewise.
32220 (direct_cond_unary_optab_supported_p): Likewise.
32221 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
32222 loops using EXTRACT_LAST.
32223 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
32224 (extract_last_<mode>): ...this optab.
32225 (vec_extract<mode><Vel>): Update accordingly.
32226
32227 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32228 Alan Hayward <alan.hayward@arm.com>
32229 David Sherwood <david.sherwood@arm.com>
32230
32231 * target.def (empty_mask_is_expensive): New hook.
32232 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
32233 * doc/tm.texi: Regenerate.
32234 * targhooks.h (default_empty_mask_is_expensive): Declare.
32235 * targhooks.c (default_empty_mask_is_expensive): New function.
32236 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
32237 if the target says that empty masks are expensive.
32238 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
32239 New function.
32240 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
32241
32242 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32243 Alan Hayward <alan.hayward@arm.com>
32244 David Sherwood <david.sherwood@arm.com>
32245
32246 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
32247 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
32248 (vect_use_loop_mask_for_alignment_p): New function.
32249 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
32250 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
32251 niters_skip argument. Make sure that the first niters_skip elements
32252 of the first iteration are inactive.
32253 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
32254 Update call to vect_set_loop_masks_directly.
32255 (get_misalign_in_elems): New function, split out from...
32256 (vect_gen_prolog_loop_niters): ...here.
32257 (vect_update_init_of_dr): Take a code argument that specifies whether
32258 the adjustment should be added or subtracted.
32259 (vect_update_init_of_drs): Likewise.
32260 (vect_prepare_for_masked_peels): New function.
32261 (vect_do_peeling): Skip prologue peeling if we're using a mask
32262 instead. Update call to vect_update_inits_of_drs.
32263 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32264 mask_skip_niters.
32265 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
32266 alignment. Do not include the number of peeled iterations in
32267 the minimum threshold in that case.
32268 (vectorizable_induction): Adjust the start value down by
32269 LOOP_VINFO_MASK_SKIP_NITERS iterations.
32270 (vect_transform_loop): Call vect_prepare_for_masked_peels.
32271 Take the number of skipped iterations into account when calculating
32272 the loop bounds.
32273 * tree-vect-stmts.c (vect_gen_while_not): New function.
32274
32275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32276 Alan Hayward <alan.hayward@arm.com>
32277 David Sherwood <david.sherwood@arm.com>
32278
32279 * doc/sourcebuild.texi (vect_fully_masked): Document.
32280 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
32281 default value to 0.
32282 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
32283 split out from...
32284 (vect_analyze_loop_2): ...here. Don't check the vectorization
32285 factor against the number of loop iterations if the loop is
32286 fully-masked.
32287
32288 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32289 Alan Hayward <alan.hayward@arm.com>
32290 David Sherwood <david.sherwood@arm.com>
32291
32292 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
32293 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
32294 (dump_groups): Update accordingly.
32295 (iv_use::mem_type): New member variable.
32296 (address_p): New function.
32297 (record_use): Add a mem_type argument and initialize the new
32298 mem_type field.
32299 (record_group_use): Add a mem_type argument. Use address_p.
32300 Remove obsolete null checks of base_object. Update call to record_use.
32301 (find_interesting_uses_op): Update call to record_group_use.
32302 (find_interesting_uses_cond): Likewise.
32303 (find_interesting_uses_address): Likewise.
32304 (get_mem_type_for_internal_fn): New function.
32305 (find_address_like_use): Likewise.
32306 (find_interesting_uses_stmt): Try find_address_like_use before
32307 calling find_interesting_uses_op.
32308 (addr_offset_valid_p): Use the iv mem_type field as the type
32309 of the addressed memory.
32310 (add_autoinc_candidates): Likewise.
32311 (get_address_cost): Likewise.
32312 (split_small_address_groups_p): Use address_p.
32313 (split_address_groups): Likewise.
32314 (add_iv_candidate_for_use): Likewise.
32315 (autoinc_possible_for_pair): Likewise.
32316 (rewrite_groups): Likewise.
32317 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
32318 (determine_group_iv_cost): Update after split of USE_ADDRESS.
32319 (get_alias_ptr_type_for_ptr_address): New function.
32320 (rewrite_use_address): Rewrite address uses in calls that were
32321 identified by find_address_like_use.
32322
32323 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32324 Alan Hayward <alan.hayward@arm.com>
32325 David Sherwood <david.sherwood@arm.com>
32326
32327 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
32328 TARGET_MEM_REFs.
32329 * gimple-expr.h (is_gimple_addressable: Likewise.
32330 * gimple-expr.c (is_gimple_address): Likewise.
32331 * internal-fn.c (expand_call_mem_ref): New function.
32332 (expand_mask_load_optab_fn): Use it.
32333 (expand_mask_store_optab_fn): Likewise.
32334
32335 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32336 Alan Hayward <alan.hayward@arm.com>
32337 David Sherwood <david.sherwood@arm.com>
32338
32339 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
32340 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
32341 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
32342 (cond_umax@var{mode}): Document.
32343 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
32344 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
32345 (cond_umin_optab, cond_umax_optab): New optabs.
32346 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
32347 (COND_IOR, COND_XOR): New internal functions.
32348 * internal-fn.h (get_conditional_internal_fn): Declare.
32349 * internal-fn.c (cond_binary_direct): New macro.
32350 (expand_cond_binary_optab_fn): Likewise.
32351 (direct_cond_binary_optab_supported_p): Likewise.
32352 (get_conditional_internal_fn): New function.
32353 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
32354 Cope with reduction statements that are vectorized as calls rather
32355 than assignments.
32356 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
32357 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
32358 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
32359 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
32360 (UNSPEC_COND_EOR): New unspecs.
32361 (optab): Add mappings for them.
32362 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
32363 (sve_int_op, sve_fp_op): New int attributes.
32364
32365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32366 Alan Hayward <alan.hayward@arm.com>
32367 David Sherwood <david.sherwood@arm.com>
32368
32369 * optabs.def (while_ult_optab): New optab.
32370 * doc/md.texi (while_ult@var{m}@var{n}): Document.
32371 * internal-fn.def (WHILE_ULT): New internal function.
32372 * internal-fn.h (direct_internal_fn_supported_p): New override
32373 that takes two types as argument.
32374 * internal-fn.c (while_direct): New macro.
32375 (expand_while_optab_fn): New function.
32376 (convert_optab_supported_p): Likewise.
32377 (direct_while_optab_supported_p): New macro.
32378 * wide-int.h (wi::udiv_ceil): New function.
32379 * tree-vectorizer.h (rgroup_masks): New structure.
32380 (vec_loop_masks): New typedef.
32381 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
32382 and fully_masked_p.
32383 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
32384 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
32385 (vect_max_vf): New function.
32386 (slpeel_make_loop_iterate_ntimes): Delete.
32387 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
32388 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
32389 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
32390 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
32391 internal-fn.h, stor-layout.h and optabs-query.h.
32392 (vect_set_loop_mask): New function.
32393 (add_preheader_seq): Likewise.
32394 (add_header_seq): Likewise.
32395 (interleave_supported_p): Likewise.
32396 (vect_maybe_permute_loop_masks): Likewise.
32397 (vect_set_loop_masks_directly): Likewise.
32398 (vect_set_loop_condition_masked): Likewise.
32399 (vect_set_loop_condition_unmasked): New function, split out from
32400 slpeel_make_loop_iterate_ntimes.
32401 (slpeel_make_loop_iterate_ntimes): Rename to..
32402 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
32403 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
32404 (vect_do_peeling): Update call accordingly.
32405 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
32406 loops.
32407 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32408 mask_compare_type, can_fully_mask_p and fully_masked_p.
32409 (release_vec_loop_masks): New function.
32410 (_loop_vec_info): Use it to free the loop masks.
32411 (can_produce_all_loop_masks_p): New function.
32412 (vect_get_max_nscalars_per_iter): Likewise.
32413 (vect_verify_full_masking): Likewise.
32414 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
32415 retries, and free the mask rgroups before retrying. Check loop-wide
32416 reasons for disallowing fully-masked loops. Make the final decision
32417 about whether use a fully-masked loop or not.
32418 (vect_estimate_min_profitable_iters): Do not assume that peeling
32419 for the number of iterations will be needed for fully-masked loops.
32420 (vectorizable_reduction): Disable fully-masked loops.
32421 (vectorizable_live_operation): Likewise.
32422 (vect_halve_mask_nunits): New function.
32423 (vect_double_mask_nunits): Likewise.
32424 (vect_record_loop_mask): Likewise.
32425 (vect_get_loop_mask): Likewise.
32426 (vect_transform_loop): Handle the case in which the final loop
32427 iteration might handle a partial vector. Call vect_set_loop_condition
32428 instead of slpeel_make_loop_iterate_ntimes.
32429 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
32430 (check_load_store_masking): New function.
32431 (prepare_load_store_mask): Likewise.
32432 (vectorizable_store): Handle fully-masked loops.
32433 (vectorizable_load): Likewise.
32434 (supportable_widening_operation): Use vect_halve_mask_nunits for
32435 booleans.
32436 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
32437 (vect_gen_while): New function.
32438 * config/aarch64/aarch64.md (umax<mode>3): New expander.
32439 (aarch64_uqdec<mode>): New insn.
32440
32441 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32442 Alan Hayward <alan.hayward@arm.com>
32443 David Sherwood <david.sherwood@arm.com>
32444
32445 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
32446 (reduc_xor_scal_optab): New optabs.
32447 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
32448 (reduc_xor_scal_@var{m}): Document.
32449 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
32450 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
32451 internal functions.
32452 * fold-const-call.c (fold_const_call): Handle them.
32453 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
32454 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
32455 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
32456 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
32457 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
32458 (UNSPEC_XORV): New unspecs.
32459 (optab): Add entries for them.
32460 (BITWISEV): New int iterator.
32461 (bit_reduc_op): New int attributes.
32462
32463 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32464 Alan Hayward <alan.hayward@arm.com>
32465 David Sherwood <david.sherwood@arm.com>
32466
32467 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
32468 * internal-fn.def (VEC_SHL_INSERT): New internal function.
32469 * optabs.def (vec_shl_insert_optab): New optab.
32470 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
32471 (duplicate_and_interleave): Likewise.
32472 * tree-vect-loop.c: Include internal-fn.h.
32473 (neutral_op_for_slp_reduction): New function, split out from
32474 get_initial_defs_for_reduction.
32475 (get_initial_def_for_reduction): Handle option 2 for variable-length
32476 vectors by loading the neutral value into a vector and then shifting
32477 the initial value into element 0.
32478 (get_initial_defs_for_reduction): Replace the code argument with
32479 the neutral value calculated by neutral_op_for_slp_reduction.
32480 Use gimple_build_vector for constant-length vectors.
32481 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
32482 but the first group_size elements have a neutral value.
32483 Use duplicate_and_interleave otherwise.
32484 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
32485 Update call to get_initial_defs_for_reduction. Handle SLP
32486 reductions for variable-length vectors by creating one vector
32487 result for each scalar result, with the elements associated
32488 with other scalar results stubbed out with the neutral value.
32489 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
32490 Require IFN_VEC_SHL_INSERT for double reductions on
32491 variable-length vectors, or SLP reductions that have
32492 a neutral value. Require can_duplicate_and_interleave_p
32493 support for variable-length unchained SLP reductions if there
32494 is no neutral value, such as for MIN/MAX reductions. Also require
32495 the number of vector elements to be a multiple of the number of
32496 SLP statements when doing variable-length unchained SLP reductions.
32497 Update call to vect_create_epilog_for_reduction.
32498 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
32499 and remove initial values.
32500 (duplicate_and_interleave): Make public.
32501 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
32502 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
32503
32504 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32505 Alan Hayward <alan.hayward@arm.com>
32506 David Sherwood <david.sherwood@arm.com>
32507
32508 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
32509 (can_duplicate_and_interleave_p): New function.
32510 (vect_get_and_check_slp_defs): Take the vector of statements
32511 rather than just the current one. Remove excess parentheses.
32512 Restriction rejectinon of vect_constant_def and vect_external_def
32513 for variable-length vectors to boolean types, or types for which
32514 can_duplicate_and_interleave_p is false.
32515 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
32516 (duplicate_and_interleave): New function.
32517 (vect_get_constant_vectors): Use gimple_build_vector for
32518 constant-length vectors and suitable variable-length constant
32519 vectors. Use duplicate_and_interleave for other variable-length
32520 vectors. Don't defer the update when inserting new statements.
32521
32522 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32523 Alan Hayward <alan.hayward@arm.com>
32524 David Sherwood <david.sherwood@arm.com>
32525
32526 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
32527 min_profitable_iters doesn't go negative.
32528
32529 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32530 Alan Hayward <alan.hayward@arm.com>
32531 David Sherwood <david.sherwood@arm.com>
32532
32533 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
32534 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
32535 * optabs.def (vec_mask_load_lanes_optab): New optab.
32536 (vec_mask_store_lanes_optab): Likewise.
32537 * internal-fn.def (MASK_LOAD_LANES): New internal function.
32538 (MASK_STORE_LANES): Likewise.
32539 * internal-fn.c (mask_load_lanes_direct): New macro.
32540 (mask_store_lanes_direct): Likewise.
32541 (expand_mask_load_optab_fn): Handle masked operations.
32542 (expand_mask_load_lanes_optab_fn): New macro.
32543 (expand_mask_store_optab_fn): Handle masked operations.
32544 (expand_mask_store_lanes_optab_fn): New macro.
32545 (direct_mask_load_lanes_optab_supported_p): Likewise.
32546 (direct_mask_store_lanes_optab_supported_p): Likewise.
32547 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
32548 parameter.
32549 (vect_load_lanes_supported): Likewise.
32550 * tree-vect-data-refs.c (strip_conversion): New function.
32551 (can_group_stmts_p): Likewise.
32552 (vect_analyze_data_ref_accesses): Use it instead of checking
32553 for a pair of assignments.
32554 (vect_store_lanes_supported): Take a masked_p parameter.
32555 (vect_load_lanes_supported): Likewise.
32556 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
32557 vect_store_lanes_supported and vect_load_lanes_supported.
32558 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
32559 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
32560 parameter. Don't allow gaps for masked accesses.
32561 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
32562 and vect_load_lanes_supported.
32563 (get_load_store_type): Take a masked_p parameter and update
32564 call to get_group_load_store_type.
32565 (vectorizable_store): Update call to get_load_store_type.
32566 Handle IFN_MASK_STORE_LANES.
32567 (vectorizable_load): Update call to get_load_store_type.
32568 Handle IFN_MASK_LOAD_LANES.
32569
32570 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32571 Alan Hayward <alan.hayward@arm.com>
32572 David Sherwood <david.sherwood@arm.com>
32573
32574 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
32575 modes for SVE.
32576 * config/aarch64/aarch64-protos.h
32577 (aarch64_sve_struct_memory_operand_p): Declare.
32578 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
32579 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
32580 (VPRED, vpred): Handle SVE structure modes.
32581 * config/aarch64/constraints.md (Utx): New constraint.
32582 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
32583 (aarch64_sve_struct_nonimmediate_operand): New predicates.
32584 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
32585 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
32586 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
32587 structure modes. Split into pieces after RA.
32588 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
32589 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
32590 New patterns.
32591 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
32592 SVE structure modes.
32593 (aarch64_classify_address): Likewise.
32594 (sizetochar): Move earlier in file.
32595 (aarch64_print_operand): Handle SVE register lists.
32596 (aarch64_array_mode): New function.
32597 (aarch64_sve_struct_memory_operand_p): Likewise.
32598 (TARGET_ARRAY_MODE): Redefine.
32599
32600 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32601 Alan Hayward <alan.hayward@arm.com>
32602 David Sherwood <david.sherwood@arm.com>
32603
32604 * target.def (array_mode): New target hook.
32605 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
32606 * doc/tm.texi: Regenerate.
32607 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
32608 * hooks.c (hook_optmode_mode_uhwi_none): New function.
32609 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
32610 targetm.array_mode.
32611 * stor-layout.c (mode_for_array): Likewise. Support polynomial
32612 type sizes.
32613
32614 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32615 Alan Hayward <alan.hayward@arm.com>
32616 David Sherwood <david.sherwood@arm.com>
32617
32618 * fold-const.c (fold_binary_loc): Check the argument types
32619 rather than the result type when testing for a vector operation.
32620
32621 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32622
32623 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
32624 * doc/tm.texi: Regenerate.
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/invoke.texi (-msve-vector-bits=): Document new option.
32631 (sve): Document new AArch64 extension.
32632 * doc/md.texi (w): Extend the description of the AArch64
32633 constraint to include SVE vectors.
32634 (Upl, Upa): Document new AArch64 predicate constraints.
32635 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
32636 enum.
32637 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
32638 (msve-vector-bits=): New option.
32639 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
32640 SVE when these are disabled.
32641 (sve): New extension.
32642 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
32643 modes. Adjust their number of units based on aarch64_sve_vg.
32644 (MAX_BITSIZE_MODE_ANY_MODE): Define.
32645 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
32646 aarch64_addr_query_type.
32647 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
32648 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
32649 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
32650 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
32651 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
32652 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
32653 (aarch64_simd_imm_zero_p): Delete.
32654 (aarch64_check_zero_based_sve_index_immediate): Declare.
32655 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32656 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32657 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32658 (aarch64_sve_float_mul_immediate_p): Likewise.
32659 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32660 rather than an rtx.
32661 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
32662 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
32663 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
32664 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
32665 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
32666 (aarch64_regmode_natural_size): Likewise.
32667 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
32668 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
32669 left one place.
32670 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
32671 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
32672 for VG and the SVE predicate registers.
32673 (V_ALIASES): Add a "z"-prefixed alias.
32674 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
32675 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
32676 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
32677 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
32678 (REG_CLASS_NAMES): Add entries for them.
32679 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
32680 and the predicate registers.
32681 (aarch64_sve_vg): Declare.
32682 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
32683 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
32684 (REGMODE_NATURAL_SIZE): Define.
32685 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
32686 SVE macros.
32687 * config/aarch64/aarch64.c: Include cfgrtl.h.
32688 (simd_immediate_info): Add a constructor for series vectors,
32689 and an associated step field.
32690 (aarch64_sve_vg): New variable.
32691 (aarch64_dbx_register_number): Handle VG and the predicate registers.
32692 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
32693 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
32694 (VEC_ANY_DATA, VEC_STRUCT): New constants.
32695 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
32696 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
32697 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
32698 (aarch64_get_mask_mode): New functions.
32699 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
32700 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
32701 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
32702 predicate modes and predicate registers. Explicitly restrict
32703 GPRs to modes of 16 bytes or smaller. Only allow FP registers
32704 to store a vector mode if it is recognized by
32705 aarch64_classify_vector_mode.
32706 (aarch64_regmode_natural_size): New function.
32707 (aarch64_hard_regno_caller_save_mode): Return the original mode
32708 for predicates.
32709 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
32710 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
32711 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
32712 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
32713 functions.
32714 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
32715 does not overlap dest if the function is frame-related. Handle
32716 SVE constants.
32717 (aarch64_split_add_offset): New function.
32718 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
32719 them aarch64_add_offset.
32720 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
32721 and update call to aarch64_sub_sp.
32722 (aarch64_add_cfa_expression): New function.
32723 (aarch64_expand_prologue): Pass extra temporary registers to the
32724 functions above. Handle the case in which we need to emit new
32725 DW_CFA_expressions for registers that were originally saved
32726 relative to the stack pointer, but now have to be expressed
32727 relative to the frame pointer.
32728 (aarch64_output_mi_thunk): Pass extra temporary registers to the
32729 functions above.
32730 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
32731 IP0 and IP1 values for SVE frames.
32732 (aarch64_expand_vec_series): New function.
32733 (aarch64_expand_sve_widened_duplicate): Likewise.
32734 (aarch64_expand_sve_const_vector): Likewise.
32735 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
32736 Handle SVE constants. Use emit_move_insn to move a force_const_mem
32737 into the register, rather than emitting a SET directly.
32738 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
32739 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
32740 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
32741 (offset_9bit_signed_scaled_p): New functions.
32742 (aarch64_replicate_bitmask_imm): New function.
32743 (aarch64_bitmask_imm): Use it.
32744 (aarch64_cannot_force_const_mem): Reject expressions involving
32745 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
32746 (aarch64_classify_index): Handle SVE indices, by requiring
32747 a plain register index with a scale that matches the element size.
32748 (aarch64_classify_address): Handle SVE addresses. Assert that
32749 the mode of the address is VOIDmode or an integer mode.
32750 Update call to aarch64_classify_symbol.
32751 (aarch64_classify_symbolic_expression): Update call to
32752 aarch64_classify_symbol.
32753 (aarch64_const_vec_all_in_range_p): New function.
32754 (aarch64_print_vector_float_operand): Likewise.
32755 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
32756 "vN" for FP registers with SVE modes. Handle (const ...) vectors
32757 and the FP immediates 1.0 and 0.5.
32758 (aarch64_print_address_internal): Handle SVE addresses.
32759 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
32760 (aarch64_regno_regclass): Handle predicate registers.
32761 (aarch64_secondary_reload): Handle big-endian reloads of SVE
32762 data modes.
32763 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
32764 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
32765 (aarch64_convert_sve_vector_bits): New function.
32766 (aarch64_override_options): Use it to handle -msve-vector-bits=.
32767 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32768 rather than an rtx.
32769 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
32770 Handle SVE vector and predicate modes. Accept VL-based constants
32771 that need only one temporary register, and VL offsets that require
32772 no temporary registers.
32773 (aarch64_conditional_register_usage): Mark the predicate registers
32774 as fixed if SVE isn't available.
32775 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
32776 Return true for SVE vector and predicate modes.
32777 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
32778 rather than an unsigned int. Handle SVE modes.
32779 (aarch64_preferred_simd_mode): Update call accordingly. Handle
32780 SVE modes.
32781 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
32782 if SVE is enabled.
32783 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32784 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32785 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32786 (aarch64_sve_float_mul_immediate_p): New functions.
32787 (aarch64_sve_valid_immediate): New function.
32788 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
32789 Explicitly reject structure modes. Check for INDEX constants.
32790 Handle PTRUE and PFALSE constants.
32791 (aarch64_check_zero_based_sve_index_immediate): New function.
32792 (aarch64_simd_imm_zero_p): Delete.
32793 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
32794 vector modes. Accept constants in the range of CNT[BHWD].
32795 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
32796 ask for an Advanced SIMD mode.
32797 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
32798 (aarch64_simd_vector_alignment): Handle SVE predicates.
32799 (aarch64_vectorize_preferred_vector_alignment): New function.
32800 (aarch64_simd_vector_alignment_reachable): Use it instead of
32801 the vector size.
32802 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
32803 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
32804 functions.
32805 (MAX_VECT_LEN): Delete.
32806 (expand_vec_perm_d): Add a vec_flags field.
32807 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
32808 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
32809 (aarch64_evpc_ext): Don't apply a big-endian lane correction
32810 for SVE modes.
32811 (aarch64_evpc_rev): Rename to...
32812 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
32813 (aarch64_evpc_rev_global): New function.
32814 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
32815 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
32816 MAX_VECT_LEN.
32817 (aarch64_evpc_sve_tbl): New function.
32818 (aarch64_expand_vec_perm_const_1): Update after rename of
32819 aarch64_evpc_rev. Handle SVE permutes too, trying
32820 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
32821 than aarch64_evpc_tbl.
32822 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
32823 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
32824 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
32825 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
32826 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
32827 (aarch64_expand_sve_vcond): New functions.
32828 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
32829 of aarch64_vector_mode_p.
32830 (aarch64_dwarf_poly_indeterminate_value): New function.
32831 (aarch64_compute_pressure_classes): Likewise.
32832 (aarch64_can_change_mode_class): Likewise.
32833 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
32834 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
32835 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
32836 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
32837 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
32838 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
32839 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
32840 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
32841 constraints.
32842 (Dn, Dl, Dr): Accept const as well as const_vector.
32843 (Dz): Likewise. Compare against CONST0_RTX.
32844 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
32845 of "vector" where appropriate.
32846 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
32847 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
32848 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
32849 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
32850 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
32851 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
32852 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
32853 (v_int_equiv): Extend to SVE modes.
32854 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
32855 mode attributes.
32856 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
32857 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
32858 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
32859 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
32860 (SVE_COND_FP_CMP): New int iterators.
32861 (perm_hilo): Handle the new unpack unspecs.
32862 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
32863 attributes.
32864 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
32865 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
32866 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
32867 (aarch64_equality_operator, aarch64_constant_vector_operand)
32868 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
32869 (aarch64_sve_nonimmediate_operand): Likewise.
32870 (aarch64_sve_general_operand): Likewise.
32871 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
32872 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
32873 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
32874 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
32875 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
32876 (aarch64_sve_float_arith_immediate): Likewise.
32877 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
32878 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
32879 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
32880 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
32881 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
32882 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
32883 (aarch64_sve_float_arith_operand): Likewise.
32884 (aarch64_sve_float_arith_with_sub_operand): Likewise.
32885 (aarch64_sve_float_mul_operand): Likewise.
32886 (aarch64_sve_vec_perm_operand): Likewise.
32887 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
32888 (aarch64_mov_operand): Accept const_poly_int and const_vector.
32889 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
32890 as well as const_vector.
32891 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
32892 in file. Use CONST0_RTX and CONSTM1_RTX.
32893 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
32894 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
32895 Use aarch64_simd_imm_zero.
32896 * config/aarch64/aarch64-sve.md: New file.
32897 * config/aarch64/aarch64.md: Include it.
32898 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
32899 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
32900 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
32901 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
32902 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
32903 (sve): New attribute.
32904 (enabled): Disable instructions with the sve attribute unless
32905 TARGET_SVE.
32906 (movqi, movhi): Pass CONST_POLY_INT operaneds through
32907 aarch64_expand_mov_immediate.
32908 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
32909 CNT[BHSD] immediates.
32910 (movti): Split CONST_POLY_INT moves into two halves.
32911 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
32912 Split additions that need a temporary here if the destination
32913 is the stack pointer.
32914 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
32915 (*add<mode>3_poly_1): New instruction.
32916 (set_clobber_cc): New expander.
32917
32918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32919
32920 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
32921 parameter and use it instead of GET_MODE_SIZE (innermode). Use
32922 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
32923 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
32924 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
32925 Change innermode from fixed_mode_size to machine_mode.
32926 (simplify_subreg): Update call accordingly. Handle a constant-sized
32927 subreg of a variable-length CONST_VECTOR.
32928
32929 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32930 Alan Hayward <alan.hayward@arm.com>
32931 David Sherwood <david.sherwood@arm.com>
32932
32933 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
32934 (add_offset_to_base): New function, split out from...
32935 (create_mem_ref): ...here. When handling a scale other than 1,
32936 check first whether the address is valid without the offset.
32937 Add it into the base if so, leaving the index and scale as-is.
32938
32939 2018-01-12 Jakub Jelinek <jakub@redhat.com>
32940
32941 PR c++/83778
32942 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
32943 fold_for_warn before checking if arg2 is INTEGER_CST.
32944
32945 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
32946
32947 * config/rs6000/predicates.md (load_multiple_operation): Delete.
32948 (store_multiple_operation): Delete.
32949 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
32950 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
32951 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
32952 guarded by TARGET_STRING.
32953 (rs6000_output_load_multiple): Delete.
32954 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
32955 OPTION_MASK_STRING / TARGET_STRING handling.
32956 (print_operand) <'N', 'O'>: Add comment that these are unused now.
32957 (const rs6000_opt_masks) <"string">: Change mask to 0.
32958 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
32959 (MASK_STRING): Delete.
32960 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
32961 parts. Simplify.
32962 (load_multiple): Delete.
32963 (*ldmsi8): Delete.
32964 (*ldmsi7): Delete.
32965 (*ldmsi6): Delete.
32966 (*ldmsi5): Delete.
32967 (*ldmsi4): Delete.
32968 (*ldmsi3): Delete.
32969 (store_multiple): Delete.
32970 (*stmsi8): Delete.
32971 (*stmsi7): Delete.
32972 (*stmsi6): Delete.
32973 (*stmsi5): Delete.
32974 (*stmsi4): Delete.
32975 (*stmsi3): Delete.
32976 (movmemsi_8reg): Delete.
32977 (corresponding unnamed define_insn): Delete.
32978 (movmemsi_6reg): Delete.
32979 (corresponding unnamed define_insn): Delete.
32980 (movmemsi_4reg): Delete.
32981 (corresponding unnamed define_insn): Delete.
32982 (movmemsi_2reg): Delete.
32983 (corresponding unnamed define_insn): Delete.
32984 (movmemsi_1reg): Delete.
32985 (corresponding unnamed define_insn): Delete.
32986 * config/rs6000/rs6000.opt (mno-string): New.
32987 (mstring): Replace by deprecation warning stub.
32988 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
32989
32990 2018-01-12 Jakub Jelinek <jakub@redhat.com>
32991
32992 * regrename.c (regrename_do_replace): If replacing the same
32993 reg multiple times, try to reuse last created gen_raw_REG.
32994
32995 PR debug/81155
32996 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
32997 main to workaround a bug in GDB.
32998
32999 2018-01-12 Tom de Vries <tom@codesourcery.com>
33000
33001 PR target/83737
33002 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
33003
33004 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
33005
33006 PR rtl-optimization/80481
33007 * ira-color.c (get_cap_member): New function.
33008 (allocnos_conflict_by_live_ranges_p): Use it.
33009 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
33010 (setup_slot_coalesced_allocno_live_ranges): Ditto.
33011
33012 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
33013
33014 PR target/83628
33015 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
33016 (*saddl_se_1): Ditto.
33017 (*ssubsi_1): Ditto.
33018 (*ssubl_se_1): Ditto.
33019
33020 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33021
33022 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
33023 rather than wi::to_widest for DR_INITs.
33024 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
33025 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
33026 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
33027 INTEGER_CSTs.
33028 (vect_analyze_group_access_1): Note that here.
33029
33030 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33031
33032 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
33033 polynomial type sizes.
33034
33035 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33036
33037 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
33038 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
33039 (gimple_add_tmp_var): Likewise.
33040
33041 2018-01-12 Martin Liska <mliska@suse.cz>
33042
33043 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
33044 (gimple_alloc_sizes): Likewise.
33045 (dump_gimple_statistics): Use PRIu64 in printf format.
33046 * gimple.h: Change uint64_t to int.
33047
33048 2018-01-12 Martin Liska <mliska@suse.cz>
33049
33050 * tree-core.h: Use uint64_t instead of int.
33051 * tree.c (tree_node_counts): Likewise.
33052 (tree_node_sizes): Likewise.
33053 (dump_tree_statistics): Use PRIu64 in printf format.
33054
33055 2018-01-12 Martin Liska <mliska@suse.cz>
33056
33057 * Makefile.in: As qsort_chk is implemented in vec.c, add
33058 vec.o to linkage of gencfn-macros.
33059 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
33060 passing the info to record_node_allocation_statistics.
33061 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
33062 and pass the info.
33063 * ggc-common.c (struct ggc_usage): Add operator== and use
33064 it in operator< and compare function.
33065 * mem-stats.h (struct mem_usage): Likewise.
33066 * vec.c (struct vec_usage): Remove operator< and compare
33067 function. Can be simply inherited.
33068
33069 2018-01-12 Martin Jambor <mjambor@suse.cz>
33070
33071 PR target/81616
33072 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
33073 * tree-ssa-math-opts.c: Include domwalk.h.
33074 (convert_mult_to_fma_1): New function.
33075 (fma_transformation_info): New type.
33076 (fma_deferring_state): Likewise.
33077 (cancel_fma_deferring): New function.
33078 (result_of_phi): Likewise.
33079 (last_fma_candidate_feeds_initial_phi): Likewise.
33080 (convert_mult_to_fma): Added deferring logic, split actual
33081 transformation to convert_mult_to_fma_1.
33082 (math_opts_dom_walker): New type.
33083 (math_opts_dom_walker::after_dom_children): New method, body moved
33084 here from pass_optimize_widening_mul::execute, added deferring logic
33085 bits.
33086 (pass_optimize_widening_mul::execute): Moved most of code to
33087 math_opts_dom_walker::after_dom_children.
33088 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
33089 * config/i386/i386.c (ix86_option_override_internal): Added
33090 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
33091
33092 2018-01-12 Richard Biener <rguenther@suse.de>
33093
33094 PR debug/83157
33095 * dwarf2out.c (gen_variable_die): Do not reset old_die for
33096 inline instance vars.
33097
33098 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
33099
33100 PR target/81819
33101 * config/rx/rx.c (rx_is_restricted_memory_address):
33102 Handle SUBREG case.
33103
33104 2018-01-12 Richard Biener <rguenther@suse.de>
33105
33106 PR tree-optimization/80846
33107 * target.def (split_reduction): New target hook.
33108 * targhooks.c (default_split_reduction): New function.
33109 * targhooks.h (default_split_reduction): Declare.
33110 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
33111 target requests first reduce vectors by combining low and high
33112 parts.
33113 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
33114 (get_vectype_for_scalar_type_and_size): Export.
33115 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
33116 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
33117 * doc/tm.texi: Regenerate.
33118 * config/i386/i386.c (ix86_split_reduction): Implement
33119 TARGET_VECTORIZE_SPLIT_REDUCTION.
33120
33121 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33122
33123 PR target/83368
33124 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
33125 in PIC mode except for TARGET_VXWORKS_RTP.
33126 * config/sparc/sparc.c: Include cfgrtl.h.
33127 (TARGET_INIT_PIC_REG): Define.
33128 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
33129 (sparc_pic_register_p): New predicate.
33130 (sparc_legitimate_address_p): Use it.
33131 (sparc_legitimize_pic_address): Likewise.
33132 (sparc_delegitimize_address): Likewise.
33133 (sparc_mode_dependent_address_p): Likewise.
33134 (gen_load_pcrel_sym): Remove 4th parameter.
33135 (load_got_register): Adjust call to above. Remove obsolete stuff.
33136 (sparc_expand_prologue): Do not call load_got_register here.
33137 (sparc_flat_expand_prologue): Likewise.
33138 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
33139 (sparc_use_pseudo_pic_reg): New function.
33140 (sparc_init_pic_reg): Likewise.
33141 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
33142 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
33143
33144 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
33145
33146 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
33147 Add item for branch_cost.
33148
33149 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33150
33151 PR rtl-optimization/83565
33152 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
33153 not extend the result to a larger mode for rotate operations.
33154 (num_sign_bit_copies1): Likewise.
33155
33156 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
33157
33158 PR target/40411
33159 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
33160 -symbolic.
33161 Use values-Xc.o for -pedantic.
33162 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
33163
33164 2018-01-12 Martin Liska <mliska@suse.cz>
33165
33166 PR ipa/83054
33167 * ipa-devirt.c (final_warning_record::grow_type_warnings):
33168 New function.
33169 (possible_polymorphic_call_targets): Use it.
33170 (ipa_devirt): Likewise.
33171
33172 2018-01-12 Martin Liska <mliska@suse.cz>
33173
33174 * profile-count.h (enum profile_quality): Use 0 as invalid
33175 enum value of profile_quality.
33176
33177 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
33178
33179 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
33180 -mext-string options.
33181
33182 2018-01-12 Richard Biener <rguenther@suse.de>
33183
33184 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
33185 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
33186 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
33187 Likewise.
33188 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
33189
33190 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
33191
33192 * configure.ac (--with-long-double-format): Add support for the
33193 configuration option to change the default long double format on
33194 PowerPC systems.
33195 * config.gcc (powerpc*-linux*-*): Likewise.
33196 * configure: Regenerate.
33197 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
33198 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
33199 used without modification.
33200
33201 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
33202
33203 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
33204 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
33205 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
33206 MISC_BUILTIN_SPEC_BARRIER.
33207 (rs6000_init_builtins): Likewise.
33208 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
33209 enum value.
33210 (speculation_barrier): New define_insn.
33211 * doc/extend.texi: Document __builtin_speculation_barrier.
33212
33213 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33214
33215 PR target/83203
33216 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
33217 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
33218 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
33219 iterators.
33220 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
33221 integral modes instead of "ss" and "sd".
33222 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
33223 vectors with 32-bit and 64-bit elements.
33224 (vecdupssescalarmodesuffix): New mode attribute.
33225 (vec_dup<mode>): Use it.
33226
33227 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
33228
33229 PR target/83330
33230 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
33231 frame if argument is passed on stack.
33232
33233 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33234
33235 PR target/82682
33236 * ree.c (combine_reaching_defs): Optimize also
33237 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
33238 reg2=any_extend(exp); reg1=reg2;, formatting fix.
33239
33240 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33241
33242 PR middle-end/83189
33243 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
33244
33245 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33246
33247 PR middle-end/83718
33248 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
33249 after they are computed.
33250
33251 2018-01-11 Bin Cheng <bin.cheng@arm.com>
33252
33253 PR tree-optimization/83695
33254 * gimple-loop-linterchange.cc
33255 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
33256 reset cached scev information after interchange.
33257 (pass_linterchange::execute): Remove call to scev_reset_htab.
33258
33259 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33260
33261 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
33262 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
33263 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
33264 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
33265 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
33266 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
33267 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
33268 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
33269 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
33270 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
33271 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
33272 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
33273 (V_lane_reg): Likewise.
33274 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
33275 New define_expand.
33276 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
33277 (vfmal_lane_low<mode>_intrinsic,
33278 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
33279 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
33280 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
33281 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
33282 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
33283 vfmsl_lane_high<mode>_intrinsic): New define_insns.
33284
33285 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33286
33287 * config/arm/arm-cpus.in (fp16fml): New feature.
33288 (ALL_SIMD): Add fp16fml.
33289 (armv8.2-a): Add fp16fml as an option.
33290 (armv8.3-a): Likewise.
33291 (armv8.4-a): Add fp16fml as part of fp16.
33292 * config/arm/arm.h (TARGET_FP16FML): Define.
33293 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
33294 when appropriate.
33295 * config/arm/arm-modes.def (V2HF): Define.
33296 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
33297 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
33298 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
33299 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
33300 vfmsl_low, vfmsl_high): New set of builtins.
33301 * config/arm/iterators.md (PLUSMINUS): New code iterator.
33302 (vfml_op): New code attribute.
33303 (VFMLHALVES): New int iterator.
33304 (VFML, VFMLSEL): New mode attributes.
33305 (V_reg): Define mapping for V2HF.
33306 (V_hi, V_lo): New mode attributes.
33307 (VF_constraint): Likewise.
33308 (vfml_half, vfml_half_selector): New int attributes.
33309 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
33310 define_expand.
33311 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
33312 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
33313 New define_insn.
33314 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
33315 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
33316 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
33317 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
33318 documentation.
33319 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
33320 Document new effective target and option set.
33321
33322 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33323
33324 * config/arm/arm-cpus.in (armv8_4): New feature.
33325 (ARMv8_4a): New fgroup.
33326 (armv8.4-a): New arch.
33327 * config/arm/arm-tables.opt: Regenerate.
33328 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
33329 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
33330 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
33331 Add matching rules for -march=armv8.4-a and extensions.
33332 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
33333
33334 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
33335
33336 PR target/81821
33337 * config/rx/rx.md (BW): New mode attribute.
33338 (sync_lock_test_and_setsi): Add mode suffix to insn output.
33339
33340 2018-01-11 Richard Biener <rguenther@suse.de>
33341
33342 PR tree-optimization/83435
33343 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
33344 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
33345 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
33346
33347 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33348 Alan Hayward <alan.hayward@arm.com>
33349 David Sherwood <david.sherwood@arm.com>
33350
33351 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
33352 field.
33353 (aarch64_classify_address): Initialize it. Track polynomial offsets.
33354 (aarch64_print_address_internal): Use it to check for a zero offset.
33355
33356 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33357 Alan Hayward <alan.hayward@arm.com>
33358 David Sherwood <david.sherwood@arm.com>
33359
33360 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
33361 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
33362 Return a poly_int64 rather than a HOST_WIDE_INT.
33363 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
33364 rather than a HOST_WIDE_INT.
33365 * config/aarch64/aarch64.h (aarch64_frame): Protect with
33366 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
33367 hard_fp_offset, frame_size, initial_adjust, callee_offset and
33368 final_offset from HOST_WIDE_INT to poly_int64.
33369 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
33370 to_constant when getting the number of units in an Advanced SIMD
33371 mode.
33372 (aarch64_builtin_vectorized_function): Check for a constant number
33373 of units.
33374 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
33375 GET_MODE_SIZE.
33376 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
33377 attribute instead of GET_MODE_NUNITS.
33378 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
33379 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
33380 GET_MODE_SIZE for fixed-size registers.
33381 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
33382 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
33383 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
33384 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
33385 (aarch64_print_operand, aarch64_print_address_internal)
33386 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
33387 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
33388 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
33389 Handle polynomial GET_MODE_SIZE.
33390 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
33391 wider than SImode without modification.
33392 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
33393 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
33394 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
33395 passing and returning SVE modes.
33396 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
33397 rather than GEN_INT.
33398 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
33399 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
33400 (aarch64_allocate_and_probe_stack_space): Likewise.
33401 (aarch64_layout_frame): Cope with polynomial offsets.
33402 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
33403 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
33404 polynomial offsets.
33405 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
33406 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
33407 poly_int64 rather than a HOST_WIDE_INT.
33408 (aarch64_get_separate_components, aarch64_process_components)
33409 (aarch64_expand_prologue, aarch64_expand_epilogue)
33410 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
33411 (aarch64_anchor_offset): New function, split out from...
33412 (aarch64_legitimize_address): ...here.
33413 (aarch64_builtin_vectorization_cost): Handle polynomial
33414 TYPE_VECTOR_SUBPARTS.
33415 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
33416 GET_MODE_NUNITS.
33417 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
33418 number of elements from the PARALLEL rather than the mode.
33419 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
33420 rather than GET_MODE_BITSIZE.
33421 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
33422 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
33423 (aarch64_expand_vec_perm_const_1): Handle polynomial
33424 d->perm.length () and d->perm elements.
33425 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
33426 Apply to_constant to d->perm elements.
33427 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
33428 polynomial CONST_VECTOR_NUNITS.
33429 (aarch64_move_pointer): Take amount as a poly_int64 rather
33430 than an int.
33431 (aarch64_progress_pointer): Avoid temporary variable.
33432 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
33433 the mode attribute instead of GET_MODE.
33434
33435 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33436 Alan Hayward <alan.hayward@arm.com>
33437 David Sherwood <david.sherwood@arm.com>
33438
33439 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
33440 x exists before using it.
33441 (aarch64_add_constant_internal): Rename to...
33442 (aarch64_add_offset_1): ...this. Replace regnum with separate
33443 src and dest rtxes. Handle the case in which they're different,
33444 including when the offset is zero. Replace scratchreg with an rtx.
33445 Use 2 additions if there is no spare register into which we can
33446 move a 16-bit constant.
33447 (aarch64_add_constant): Delete.
33448 (aarch64_add_offset): Replace reg with separate src and dest
33449 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
33450 Use aarch64_add_offset_1.
33451 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
33452 an rtx rather than an int. Take the delta as a poly_int64
33453 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
33454 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
33455 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
33456 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
33457 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
33458 and aarch64_add_sp.
33459 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
33460 aarch64_add_constant.
33461
33462 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33463
33464 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
33465 Use scalar_float_mode.
33466
33467 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33468
33469 * config/aarch64/aarch64-simd.md
33470 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
33471 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
33472 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
33473 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
33474 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
33475 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
33476 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
33477 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
33478 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
33479 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
33480
33481 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33482
33483 PR target/83514
33484 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
33485 targ_options->x_arm_arch_string is non NULL.
33486
33487 2018-01-11 Tamar Christina <tamar.christina@arm.com>
33488
33489 * config/aarch64/aarch64.h
33490 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
33491
33492 2018-01-11 Sudakshina Das <sudi.das@arm.com>
33493
33494 PR target/82096
33495 * expmed.c (emit_store_flag_force): Swap if const op0
33496 and change VOIDmode to mode of op0.
33497
33498 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33499
33500 PR rtl-optimization/83761
33501 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
33502 than bytes to mode_for_size.
33503
33504 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33505
33506 PR middle-end/83189
33507 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
33508 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
33509 profile.
33510
33511 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33512
33513 PR middle-end/83575
33514 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
33515 when in layout mode.
33516 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
33517 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
33518 partition fixup.
33519
33520 2018-01-10 Michael Collison <michael.collison@arm.com>
33521
33522 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
33523 * config/aarch64/aarch64-option-extension.def: Add
33524 AARCH64_OPT_EXTENSION of 'fp16fml'.
33525 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33526 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
33527 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
33528 * config/aarch64/constraints.md (Ui7): New constraint.
33529 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
33530 (VFMLA_SEL_W): Ditto.
33531 (f16quad): Ditto.
33532 (f16mac1): Ditto.
33533 (VFMLA16_LOW): New int iterator.
33534 (VFMLA16_HIGH): Ditto.
33535 (UNSPEC_FMLAL): New unspec.
33536 (UNSPEC_FMLSL): Ditto.
33537 (UNSPEC_FMLAL2): Ditto.
33538 (UNSPEC_FMLSL2): Ditto.
33539 (f16mac): New code attribute.
33540 * config/aarch64/aarch64-simd-builtins.def
33541 (aarch64_fmlal_lowv2sf): Ditto.
33542 (aarch64_fmlsl_lowv2sf): Ditto.
33543 (aarch64_fmlalq_lowv4sf): Ditto.
33544 (aarch64_fmlslq_lowv4sf): Ditto.
33545 (aarch64_fmlal_highv2sf): Ditto.
33546 (aarch64_fmlsl_highv2sf): Ditto.
33547 (aarch64_fmlalq_highv4sf): Ditto.
33548 (aarch64_fmlslq_highv4sf): Ditto.
33549 (aarch64_fmlal_lane_lowv2sf): Ditto.
33550 (aarch64_fmlsl_lane_lowv2sf): Ditto.
33551 (aarch64_fmlal_laneq_lowv2sf): Ditto.
33552 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
33553 (aarch64_fmlalq_lane_lowv4sf): Ditto.
33554 (aarch64_fmlsl_lane_lowv4sf): Ditto.
33555 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
33556 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
33557 (aarch64_fmlal_lane_highv2sf): Ditto.
33558 (aarch64_fmlsl_lane_highv2sf): Ditto.
33559 (aarch64_fmlal_laneq_highv2sf): Ditto.
33560 (aarch64_fmlsl_laneq_highv2sf): Ditto.
33561 (aarch64_fmlalq_lane_highv4sf): Ditto.
33562 (aarch64_fmlsl_lane_highv4sf): Ditto.
33563 (aarch64_fmlalq_laneq_highv4sf): Ditto.
33564 (aarch64_fmlsl_laneq_highv4sf): Ditto.
33565 * config/aarch64/aarch64-simd.md:
33566 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
33567 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33568 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
33569 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33570 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
33571 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
33572 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
33573 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
33574 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
33575 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
33576 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
33577 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
33578 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
33579 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
33580 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
33581 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
33582 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
33583 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
33584 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
33585 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
33586 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
33587 (vfmlsl_low_u32): Ditto.
33588 (vfmlalq_low_u32): Ditto.
33589 (vfmlslq_low_u32): Ditto.
33590 (vfmlal_high_u32): Ditto.
33591 (vfmlsl_high_u32): Ditto.
33592 (vfmlalq_high_u32): Ditto.
33593 (vfmlslq_high_u32): Ditto.
33594 (vfmlal_lane_low_u32): Ditto.
33595 (vfmlsl_lane_low_u32): Ditto.
33596 (vfmlal_laneq_low_u32): Ditto.
33597 (vfmlsl_laneq_low_u32): Ditto.
33598 (vfmlalq_lane_low_u32): Ditto.
33599 (vfmlslq_lane_low_u32): Ditto.
33600 (vfmlalq_laneq_low_u32): Ditto.
33601 (vfmlslq_laneq_low_u32): Ditto.
33602 (vfmlal_lane_high_u32): Ditto.
33603 (vfmlsl_lane_high_u32): Ditto.
33604 (vfmlal_laneq_high_u32): Ditto.
33605 (vfmlsl_laneq_high_u32): Ditto.
33606 (vfmlalq_lane_high_u32): Ditto.
33607 (vfmlslq_lane_high_u32): Ditto.
33608 (vfmlalq_laneq_high_u32): Ditto.
33609 (vfmlslq_laneq_high_u32): Ditto.
33610 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
33611 (AARCH64_FL_FOR_ARCH8_4): New.
33612 (AARCH64_ISA_F16FML): New ISA flag.
33613 (TARGET_F16FML): New feature flag for fp16fml.
33614 (doc/invoke.texi): Document new fp16fml option.
33615
33616 2018-01-10 Michael Collison <michael.collison@arm.com>
33617
33618 * config/aarch64/aarch64-builtins.c:
33619 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
33620 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33621 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
33622 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
33623 (AARCH64_ISA_SHA3): New ISA flag.
33624 (TARGET_SHA3): New feature flag for sha3.
33625 * config/aarch64/iterators.md (sha512_op): New int attribute.
33626 (CRYPTO_SHA512): New int iterator.
33627 (UNSPEC_SHA512H): New unspec.
33628 (UNSPEC_SHA512H2): Ditto.
33629 (UNSPEC_SHA512SU0): Ditto.
33630 (UNSPEC_SHA512SU1): Ditto.
33631 * config/aarch64/aarch64-simd-builtins.def
33632 (aarch64_crypto_sha512hqv2di): New builtin.
33633 (aarch64_crypto_sha512h2qv2di): Ditto.
33634 (aarch64_crypto_sha512su0qv2di): Ditto.
33635 (aarch64_crypto_sha512su1qv2di): Ditto.
33636 (aarch64_eor3qv8hi): Ditto.
33637 (aarch64_rax1qv2di): Ditto.
33638 (aarch64_xarqv2di): Ditto.
33639 (aarch64_bcaxqv8hi): Ditto.
33640 * config/aarch64/aarch64-simd.md:
33641 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
33642 (aarch64_crypto_sha512su0qv2di): Ditto.
33643 (aarch64_crypto_sha512su1qv2di): Ditto.
33644 (aarch64_eor3qv8hi): Ditto.
33645 (aarch64_rax1qv2di): Ditto.
33646 (aarch64_xarqv2di): Ditto.
33647 (aarch64_bcaxqv8hi): Ditto.
33648 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
33649 (vsha512h2q_u64): Ditto.
33650 (vsha512su0q_u64): Ditto.
33651 (vsha512su1q_u64): Ditto.
33652 (veor3q_u16): Ditto.
33653 (vrax1q_u64): Ditto.
33654 (vxarq_u64): Ditto.
33655 (vbcaxq_u16): Ditto.
33656 * config/arm/types.md (crypto_sha512): New type attribute.
33657 (crypto_sha3): Ditto.
33658 (doc/invoke.texi): Document new sha3 option.
33659
33660 2018-01-10 Michael Collison <michael.collison@arm.com>
33661
33662 * config/aarch64/aarch64-builtins.c:
33663 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
33664 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33665 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
33666 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
33667 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
33668 (AARCH64_ISA_SM4): New ISA flag.
33669 (TARGET_SM4): New feature flag for sm4.
33670 * config/aarch64/aarch64-simd-builtins.def
33671 (aarch64_sm3ss1qv4si): Ditto.
33672 (aarch64_sm3tt1aq4si): Ditto.
33673 (aarch64_sm3tt1bq4si): Ditto.
33674 (aarch64_sm3tt2aq4si): Ditto.
33675 (aarch64_sm3tt2bq4si): Ditto.
33676 (aarch64_sm3partw1qv4si): Ditto.
33677 (aarch64_sm3partw2qv4si): Ditto.
33678 (aarch64_sm4eqv4si): Ditto.
33679 (aarch64_sm4ekeyqv4si): Ditto.
33680 * config/aarch64/aarch64-simd.md:
33681 (aarch64_sm3ss1qv4si): Ditto.
33682 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
33683 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
33684 (aarch64_sm4eqv4si): Ditto.
33685 (aarch64_sm4ekeyqv4si): Ditto.
33686 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
33687 (sm3part_op): Ditto.
33688 (CRYPTO_SM3TT): Ditto.
33689 (CRYPTO_SM3PART): Ditto.
33690 (UNSPEC_SM3SS1): New unspec.
33691 (UNSPEC_SM3TT1A): Ditto.
33692 (UNSPEC_SM3TT1B): Ditto.
33693 (UNSPEC_SM3TT2A): Ditto.
33694 (UNSPEC_SM3TT2B): Ditto.
33695 (UNSPEC_SM3PARTW1): Ditto.
33696 (UNSPEC_SM3PARTW2): Ditto.
33697 (UNSPEC_SM4E): Ditto.
33698 (UNSPEC_SM4EKEY): Ditto.
33699 * config/aarch64/constraints.md (Ui2): New constraint.
33700 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
33701 * config/arm/types.md (crypto_sm3): New type attribute.
33702 (crypto_sm4): Ditto.
33703 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
33704 (vsm3tt1aq_u32): Ditto.
33705 (vsm3tt1bq_u32): Ditto.
33706 (vsm3tt2aq_u32): Ditto.
33707 (vsm3tt2bq_u32): Ditto.
33708 (vsm3partw1q_u32): Ditto.
33709 (vsm3partw2q_u32): Ditto.
33710 (vsm4eq_u32): Ditto.
33711 (vsm4ekeyq_u32): Ditto.
33712 (doc/invoke.texi): Document new sm4 option.
33713
33714 2018-01-10 Michael Collison <michael.collison@arm.com>
33715
33716 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
33717 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
33718 (AARCH64_FL_FOR_ARCH8_4): New.
33719 (AARCH64_FL_V8_4): New flag.
33720 (doc/invoke.texi): Document new armv8.4-a option.
33721
33722 2018-01-10 Michael Collison <michael.collison@arm.com>
33723
33724 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33725 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
33726 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
33727 * config/aarch64/aarch64-option-extension.def: Add
33728 AARCH64_OPT_EXTENSION of 'sha2'.
33729 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
33730 (crypto): Disable sha2 and aes if crypto disabled.
33731 (crypto): Enable aes and sha2 if enabled.
33732 (simd): Disable sha2 and aes if simd disabled.
33733 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
33734 New flags.
33735 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
33736 (TARGET_SHA2): New feature flag for sha2.
33737 (TARGET_AES): New feature flag for aes.
33738 * config/aarch64/aarch64-simd.md:
33739 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
33740 conditional on TARGET_AES.
33741 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
33742 (aarch64_crypto_sha1hsi): Make pattern conditional
33743 on TARGET_SHA2.
33744 (aarch64_crypto_sha1hv4si): Ditto.
33745 (aarch64_be_crypto_sha1hv4si): Ditto.
33746 (aarch64_crypto_sha1su1v4si): Ditto.
33747 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
33748 (aarch64_crypto_sha1su0v4si): Ditto.
33749 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
33750 (aarch64_crypto_sha256su0v4si): Ditto.
33751 (aarch64_crypto_sha256su1v4si): Ditto.
33752 (doc/invoke.texi): Document new aes and sha2 options.
33753
33754 2018-01-10 Martin Sebor <msebor@redhat.com>
33755
33756 PR tree-optimization/83781
33757 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
33758 as string arrays.
33759
33760 2018-01-11 Martin Sebor <msebor@gmail.com>
33761 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33762
33763 PR tree-optimization/83501
33764 PR tree-optimization/81703
33765
33766 * tree-ssa-strlen.c (get_string_cst): Rename...
33767 (get_string_len): ...to this. Handle global constants.
33768 (handle_char_store): Adjust.
33769
33770 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
33771 Jim Wilson <jimw@sifive.com>
33772
33773 * config/riscv/riscv-protos.h (riscv_output_return): New.
33774 * config/riscv/riscv.c (struct machine_function): New naked_p field.
33775 (riscv_attribute_table, riscv_output_return),
33776 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
33777 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
33778 (riscv_compute_frame_info): Only compute frame->mask if not a naked
33779 function.
33780 (riscv_expand_prologue): Add early return for naked function.
33781 (riscv_expand_epilogue): Likewise.
33782 (riscv_function_ok_for_sibcall): Return false for naked function.
33783 (riscv_set_current_function): New.
33784 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
33785 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
33786 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
33787 * doc/extend.texi (RISC-V Function Attributes): New.
33788
33789 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
33790
33791 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
33792 check for 128-bit long double before checking TCmode.
33793 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
33794 128-bit long doubles before checking TFmode or TCmode.
33795 (FLOAT128_IBM_P): Likewise.
33796
33797 2018-01-10 Martin Sebor <msebor@redhat.com>
33798
33799 PR tree-optimization/83671
33800 * builtins.c (c_strlen): Unconditionally return zero for the empty
33801 string.
33802 Use -Warray-bounds for warnings.
33803 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
33804 for non-constant array indices with COMPONENT_REF, arrays of
33805 arrays, and pointers to arrays.
33806 (gimple_fold_builtin_strlen): Determine and set length range for
33807 non-constant character arrays.
33808
33809 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
33810
33811 PR middle-end/81897
33812 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
33813 empty blocks.
33814
33815 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
33816
33817 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
33818
33819 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33820
33821 PR target/83399
33822 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
33823 VECTOR_MEM_ALTIVEC_OR_VSX_P.
33824 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
33825 indexed_or_indirect_operand predicate.
33826 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
33827 (*vsx_le_perm_load_v8hi): Likewise.
33828 (*vsx_le_perm_load_v16qi): Likewise.
33829 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
33830 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
33831 (*vsx_le_perm_store_v8hi): Likewise.
33832 (*vsx_le_perm_store_v16qi): Likewise.
33833 (eight unnamed splitters): Likewise.
33834
33835 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33836
33837 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
33838 * config/rs6000/emmintrin.h: Likewise.
33839 * config/rs6000/mmintrin.h: Likewise.
33840 * config/rs6000/xmmintrin.h: Likewise.
33841
33842 2018-01-10 David Malcolm <dmalcolm@redhat.com>
33843
33844 PR c++/43486
33845 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
33846 "public_flag".
33847 * tree.c (tree_nop_conversion): Return true for location wrapper
33848 nodes.
33849 (maybe_wrap_with_location): New function.
33850 (selftest::check_strip_nops): New function.
33851 (selftest::test_location_wrappers): New function.
33852 (selftest::tree_c_tests): Call it.
33853 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
33854 (maybe_wrap_with_location): New decl.
33855 (EXPR_LOCATION_WRAPPER_P): New macro.
33856 (location_wrapper_p): New inline function.
33857 (tree_strip_any_location_wrapper): New inline function.
33858
33859 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
33860
33861 PR target/83735
33862 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
33863 stack_realign_offset for the largest alignment of stack slot
33864 actually used.
33865 (ix86_find_max_used_stack_alignment): New function.
33866 (ix86_finalize_stack_frame_flags): Use it. Set
33867 max_used_stack_alignment if we don't realign stack.
33868 * config/i386/i386.h (machine_function): Add
33869 max_used_stack_alignment.
33870
33871 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
33872
33873 * config/arm/arm.opt (-mbranch-cost): New option.
33874 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
33875 account.
33876
33877 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
33878
33879 PR target/83629
33880 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
33881 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
33882
33883 2018-01-10 Richard Biener <rguenther@suse.de>
33884
33885 PR debug/83765
33886 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
33887 early out so it also covers the case where we have a non-NULL
33888 origin.
33889
33890 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
33891
33892 PR tree-optimization/83753
33893 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
33894 for non-strided grouped accesses if the number of elements is 1.
33895
33896 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33897
33898 PR target/81616
33899 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
33900 * i386.h (TARGET_USE_GATHER): Define.
33901 * x86-tune.def (X86_TUNE_USE_GATHER): New.
33902
33903 2018-01-10 Martin Liska <mliska@suse.cz>
33904
33905 PR bootstrap/82831
33906 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
33907 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
33908 partitioning.
33909 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
33910 CLEANUP_NO_PARTITIONING is not set.
33911
33912 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
33913
33914 * doc/rtl.texi: Remove documentation of (const ...) wrappers
33915 for vectors, as a partial revert of r254296.
33916 * rtl.h (const_vec_p): Delete.
33917 (const_vec_duplicate_p): Don't test for vector CONSTs.
33918 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
33919 * expmed.c (make_tree): Likewise.
33920
33921 Revert:
33922 * common.md (E, F): Use CONSTANT_P instead of checking for
33923 CONST_VECTOR.
33924 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
33925 checking for CONST_VECTOR.
33926
33927 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
33928
33929 PR middle-end/83575
33930 * predict.c (force_edge_cold): Handle in more sane way edges
33931 with no prediction.
33932
33933 2018-01-09 Carl Love <cel@us.ibm.com>
33934
33935 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
33936 V4SI, V4SF types.
33937 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
33938 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
33939 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
33940 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
33941 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
33942 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
33943 * config/rs6000/rs6000-protos.h: Add extern defition for
33944 rs6000_generate_float2_double_code.
33945 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
33946 function.
33947 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
33948 (float2_v2df): Add define_expand.
33949
33950 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
33951
33952 PR target/83628
33953 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
33954 op_mode in the force_to_mode call.
33955
33956 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
33957
33958 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
33959 instead of checking each element individually.
33960 (aarch64_evpc_uzp): Likewise.
33961 (aarch64_evpc_zip): Likewise.
33962 (aarch64_evpc_ext): Likewise.
33963 (aarch64_evpc_rev): Likewise.
33964 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
33965 instead of checking each element individually. Return true without
33966 generating rtl if
33967 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
33968 whether all selected elements come from the same input, instead of
33969 checking each element individually. Remove calls to gen_rtx_REG,
33970 start_sequence and end_sequence and instead assert that no rtl is
33971 generated.
33972
33973 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
33974
33975 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
33976 order of HIGH and CONST checks.
33977
33978 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
33979
33980 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
33981 if the destination isn't an SSA_NAME.
33982
33983 2018-01-09 Richard Biener <rguenther@suse.de>
33984
33985 PR tree-optimization/83668
33986 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
33987 move prologue...
33988 (canonicalize_loop_form): ... here, renamed from ...
33989 (canonicalize_loop_closed_ssa_form): ... this and amended to
33990 swap successor edges for loop exit blocks to make us use
33991 the RPO order we need for initial schedule generation.
33992
33993 2018-01-09 Joseph Myers <joseph@codesourcery.com>
33994
33995 PR tree-optimization/64811
33996 * match.pd: When optimizing comparisons with Inf, avoid
33997 introducing or losing exceptions from comparisons with NaN.
33998
33999 2018-01-09 Martin Liska <mliska@suse.cz>
34000
34001 PR sanitizer/82517
34002 * asan.c (shadow_mem_size): Add gcc_assert.
34003
34004 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
34005
34006 Don't save registers in main().
34007
34008 PR target/83738
34009 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
34010 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
34011 * config/avr/avr.c (avr_set_current_function): Don't error if
34012 naked, OS_task or OS_main are specified at the same time.
34013 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
34014 OS_main.
34015 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
34016 attribute.
34017 * common/config/avr/avr-common.c (avr_option_optimization_table):
34018 Switch on -mmain-is-OS_task for optimizing compilations.
34019
34020 2018-01-09 Richard Biener <rguenther@suse.de>
34021
34022 PR tree-optimization/83572
34023 * graphite.c: Include cfganal.h.
34024 (graphite_transform_loops): Connect infinite loops to exit
34025 and remove fake edges at the end.
34026
34027 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34028
34029 * ipa-inline.c (edge_badness): Revert accidental checkin.
34030
34031 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34032
34033 PR ipa/80763
34034 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
34035 symbols; not inline clones.
34036
34037 2018-01-09 Jakub Jelinek <jakub@redhat.com>
34038
34039 PR target/83507
34040 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
34041 hard registers. Formatting fixes.
34042
34043 PR preprocessor/83722
34044 * gcc.c (try_generate_repro): Pass
34045 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
34046 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
34047 do_report_bug.
34048
34049 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
34050 Kito Cheng <kito.cheng@gmail.com>
34051
34052 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
34053 (riscv_leaf_function_p): Delete.
34054 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
34055
34056 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34057
34058 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
34059 function.
34060 (do_ifelse): New function.
34061 (do_isel): New function.
34062 (do_sub3): New function.
34063 (do_add3): New function.
34064 (do_load_mask_compare): New function.
34065 (do_overlap_load_compare): New function.
34066 (expand_compare_loop): New function.
34067 (expand_block_compare): Call expand_compare_loop() when appropriate.
34068 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
34069 option description.
34070 (-mblock-compare-inline-loop-limit): New option.
34071
34072 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
34073
34074 PR target/83677
34075 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
34076 Reverse order of second and third operands in first alternative.
34077 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
34078 of first and second elements in UNSPEC_VPERMR vector.
34079 (altivec_expand_vec_perm_le): Likewise.
34080
34081 2018-01-08 Jeff Law <law@redhat.com>
34082
34083 PR rtl-optimizatin/81308
34084 * tree-switch-conversion.c (cfg_altered): New file scoped static.
34085 (process_switch): If group_case_labels makes a change, then set
34086 cfg_altered.
34087 (pass_convert_switch::execute): If a switch is converted, then
34088 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
34089
34090 PR rtl-optimization/81308
34091 * recog.c (split_all_insns): Conditionally cleanup the CFG after
34092 splitting insns.
34093
34094 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
34095
34096 PR target/83663 - Revert r255946
34097 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
34098 generation for cases where splatting a value is not useful.
34099 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
34100 across a vec_duplicate and a paradoxical subreg forming a vector
34101 mode to a vec_concat.
34102
34103 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
34104
34105 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
34106 -march=armv8.3-a variants.
34107 * config/arm/t-multilib: Likewise.
34108 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
34109
34110 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34111
34112 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
34113 to generate rtl.
34114 (cceq_ior_compare_complement): Give it a name so I can use it, and
34115 change boolean_or_operator predicate to boolean_operator so it can
34116 be used to generate a crand.
34117 (eqne): New code iterator.
34118 (bd/bd_neg): New code_attrs.
34119 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
34120 a single define_insn.
34121 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
34122 decrement (bdnzt/bdnzf/bdzt/bdzf).
34123 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
34124 with the new names of the branch decrement patterns, and added the
34125 names of the branch decrement conditional patterns.
34126
34127 2018-01-08 Richard Biener <rguenther@suse.de>
34128
34129 PR tree-optimization/83563
34130 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
34131 cache.
34132
34133 2018-01-08 Richard Biener <rguenther@suse.de>
34134
34135 PR middle-end/83713
34136 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
34137
34138 2018-01-08 Richard Biener <rguenther@suse.de>
34139
34140 PR tree-optimization/83685
34141 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
34142 references to abnormals.
34143
34144 2018-01-08 Richard Biener <rguenther@suse.de>
34145
34146 PR lto/83719
34147 * dwarf2out.c (output_indirect_strings): Handle empty
34148 skeleton_debug_str_hash.
34149 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
34150
34151 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34152
34153 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
34154 (emit_store_direct): Likewise.
34155 (arc_trampoline_adjust_address): Likewise.
34156 (arc_asm_trampoline_template): New function.
34157 (arc_initialize_trampoline): Use asm_trampoline_template.
34158 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
34159 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
34160 * config/arc/arc.md (flush_icache): Delete pattern.
34161
34162 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34163
34164 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
34165 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
34166 munaligned-access.
34167
34168 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34169
34170 PR target/83681
34171 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
34172 by not USED_FOR_TARGET.
34173 (make_pass_resolve_sw_modes): Likewise.
34174
34175 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34176
34177 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
34178 USED_FOR_TARGET.
34179
34180 2018-01-08 Richard Biener <rguenther@suse.de>
34181
34182 PR middle-end/83580
34183 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
34184
34185 2018-01-08 Richard Biener <rguenther@suse.de>
34186
34187 PR middle-end/83517
34188 * match.pd ((t * 2) / 2) -> t): Add missing :c.
34189
34190 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
34191
34192 PR middle-end/81897
34193 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
34194 basic blocks with a small number of successors.
34195 (convert_control_dep_chain_into_preds): Improve handling of
34196 forwarder blocks.
34197 (dump_predicates): Split apart into...
34198 (dump_pred_chain): ...here...
34199 (dump_pred_info): ...and here.
34200 (can_one_predicate_be_invalidated_p): Add debugging printfs.
34201 (can_chain_union_be_invalidated_p): Improve check for invalidation
34202 of paths.
34203 (uninit_uses_cannot_happen): Avoid unnecessary if
34204 convert_control_dep_chain_into_preds yielded nothing.
34205
34206 2018-01-06 Martin Sebor <msebor@redhat.com>
34207
34208 PR tree-optimization/83640
34209 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
34210 subtracting negative offset from size.
34211 (builtin_access::overlap): Adjust offset bounds of the access to fall
34212 within the size of the object if possible.
34213
34214 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
34215
34216 PR rtl-optimization/83699
34217 * expmed.c (extract_bit_field_1): Restrict the vector usage of
34218 extract_bit_field_as_subreg to cases in which the extracted
34219 value is also a vector.
34220
34221 * lra-constraints.c (process_alt_operands): Test for the equivalence
34222 substitutions when detecting a possible reload cycle.
34223
34224 2018-01-06 Jakub Jelinek <jakub@redhat.com>
34225
34226 PR debug/83480
34227 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
34228 by default if flag_selective_schedling{,2}. Formatting fixes.
34229
34230 PR rtl-optimization/83682
34231 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
34232 if it has non-VECTOR_MODE element mode.
34233 (vec_duplicate_p): Likewise.
34234
34235 PR middle-end/83694
34236 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
34237 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
34238
34239 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34240
34241 PR target/83604
34242 * config/i386/i386-builtin.def
34243 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
34244 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
34245 Require also OPTION_MASK_ISA_AVX512F in addition to
34246 OPTION_MASK_ISA_GFNI.
34247 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
34248 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
34249 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
34250 to OPTION_MASK_ISA_GFNI.
34251 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
34252 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
34253 OPTION_MASK_ISA_AVX512BW.
34254 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
34255 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
34256 addition to OPTION_MASK_ISA_GFNI.
34257 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
34258 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
34259 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
34260 to OPTION_MASK_ISA_GFNI.
34261 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
34262 a requirement for all ISAs rather than any of them with a few
34263 exceptions.
34264 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
34265 processing.
34266 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
34267 bitmasks to be enabled with 3 exceptions, instead of requiring any
34268 enabled ISA with lots of exceptions.
34269 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
34270 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
34271 Change avx512bw in isa attribute to avx512f.
34272 * config/i386/sgxintrin.h: Add license boilerplate.
34273 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
34274 to __AVX512F__ and __AVX512VL to __AVX512VL__.
34275 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
34276 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
34277 defined.
34278 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
34279 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
34280 temporarily sse2 rather than sse if not enabled already.
34281
34282 PR target/83604
34283 * config/i386/sse.md (VI248_VLBW): Rename to ...
34284 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
34285 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
34286 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
34287 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
34288 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
34289 mode iterator instead of VI248_VLBW.
34290
34291 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
34292
34293 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
34294 (record_modified): Skip clobbers; add debug output.
34295 (param_change_prob): Use sreal frequencies.
34296
34297 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34298
34299 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
34300 punt for user-aligned variables.
34301
34302 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34303
34304 * tree-chrec.c (chrec_contains_symbols): Return true for
34305 POLY_INT_CST.
34306
34307 2018-01-05 Sudakshina Das <sudi.das@arm.com>
34308
34309 PR target/82439
34310 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
34311 of (x|y) == x for BICS pattern.
34312
34313 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34314
34315 PR tree-optimization/83605
34316 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
34317 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
34318 can throw.
34319
34320 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
34321
34322 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
34323 * config/epiphany/rtems.h: New file.
34324
34325 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34326 Uros Bizjak <ubizjak@gmail.com>
34327
34328 PR target/83554
34329 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
34330 QIreg_operand instead of register_operand predicate.
34331 * config/i386/i386.c (ix86_rop_should_change_byte_p,
34332 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
34333 comments instead of -fmitigate[-_]rop.
34334
34335 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
34336
34337 PR bootstrap/81926
34338 * cgraphunit.c (symbol_table::compile): Switch to text_section
34339 before calling assembly_start debug hook.
34340 * run-rtl-passes.c (run_rtl_passes): Likewise.
34341 Include output.h.
34342
34343 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34344
34345 * tree-vrp.c (extract_range_from_binary_expr_1): Check
34346 range_int_cst_p rather than !symbolic_range_p before calling
34347 extract_range_from_multiplicative_op_1.
34348
34349 2018-01-04 Jeff Law <law@redhat.com>
34350
34351 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
34352 redundant test in assertion.
34353
34354 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34355
34356 * doc/rtl.texi: Document machine_mode wrapper classes.
34357
34358 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34359
34360 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
34361 using tree_to_uhwi.
34362
34363 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34364
34365 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
34366 the VEC_PERM_EXPR fold to fail.
34367
34368 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34369
34370 PR debug/83585
34371 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
34372 to switched_sections.
34373
34374 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34375
34376 PR target/83680
34377 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
34378 test for d.testing.
34379
34380 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
34381
34382 PR target/83387
34383 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
34384 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
34385
34386 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34387
34388 PR debug/83666
34389 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
34390 is BLKmode and bitpos not zero or mode change is needed.
34391
34392 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34393
34394 PR target/83675
34395 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
34396 TARGET_VIS2.
34397
34398 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
34399
34400 PR target/83628
34401 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
34402 instead of MULT rtx. Update all corresponding splitters.
34403 (*saddl_se): Ditto.
34404 (*ssub<modesuffix>): Ditto.
34405 (*ssubl_se): Ditto.
34406 (*cmp_sadd_di): Update split patterns.
34407 (*cmp_sadd_si): Ditto.
34408 (*cmp_sadd_sidi): Ditto.
34409 (*cmp_ssub_di): Ditto.
34410 (*cmp_ssub_si): Ditto.
34411 (*cmp_ssub_sidi): Ditto.
34412 * config/alpha/predicates.md (const23_operand): New predicate.
34413 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
34414 Look for ASHIFT, not MULT inner operand.
34415 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
34416
34417 2018-01-04 Martin Liska <mliska@suse.cz>
34418
34419 PR gcov-profile/83669
34420 * gcov.c (output_intermediate_file): Add version to intermediate
34421 gcov file.
34422 * doc/gcov.texi: Document new field 'version' in intermediate
34423 file format. Fix location of '-k' option of gcov command.
34424
34425 2018-01-04 Martin Liska <mliska@suse.cz>
34426
34427 PR ipa/82352
34428 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
34429
34430 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34431
34432 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
34433
34434 2018-01-03 Martin Sebor <msebor@redhat.com>
34435
34436 PR tree-optimization/83655
34437 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
34438 checking calls with invalid arguments.
34439
34440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34441
34442 * tree-vect-stmts.c (vect_get_store_rhs): New function.
34443 (vectorizable_mask_load_store): Delete.
34444 (vectorizable_call): Return false for masked loads and stores.
34445 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
34446 instead of gimple_assign_rhs1.
34447 (vectorizable_load): Handle IFN_MASK_LOAD.
34448 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
34449
34450 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34451
34452 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
34453 split out from..,
34454 (vectorizable_mask_load_store): ...here.
34455 (vectorizable_load): ...and here.
34456
34457 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34458
34459 * tree-vect-stmts.c (vect_build_all_ones_mask)
34460 (vect_build_zero_merge_argument): New functions, split out from...
34461 (vectorizable_load): ...here.
34462
34463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34464
34465 * tree-vect-stmts.c (vect_check_store_rhs): New function,
34466 split out from...
34467 (vectorizable_mask_load_store): ...here.
34468 (vectorizable_store): ...and here.
34469
34470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34471
34472 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
34473 split out from...
34474 (vectorizable_mask_load_store): ...here.
34475
34476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34477
34478 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
34479 (vect_model_store_cost): Take a vec_load_store_type instead of a
34480 vect_def_type.
34481 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
34482 (vect_model_store_cost): Take a vec_load_store_type instead of a
34483 vect_def_type.
34484 (vectorizable_mask_load_store): Update accordingly.
34485 (vectorizable_store): Likewise.
34486 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
34487
34488 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34489
34490 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
34491 IFN_MASK_LOAD calls here rather than...
34492 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
34493
34494 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34495 Alan Hayward <alan.hayward@arm.com>
34496 David Sherwood <david.sherwood@arm.com>
34497
34498 * expmed.c (extract_bit_field_1): For vector extracts,
34499 fall back to extract_bit_field_as_subreg if vec_extract
34500 isn't available.
34501
34502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34503 Alan Hayward <alan.hayward@arm.com>
34504 David Sherwood <david.sherwood@arm.com>
34505
34506 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
34507 they are variable or constant sized.
34508 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
34509 slots for constant-sized data.
34510
34511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34512 Alan Hayward <alan.hayward@arm.com>
34513 David Sherwood <david.sherwood@arm.com>
34514
34515 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
34516 handling COND_EXPRs with boolean comparisons, try to find a better
34517 basis for the mask type than the boolean itself.
34518
34519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34520
34521 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
34522 is calculated and how it can be overridden.
34523 * genmodes.c (max_bitsize_mode_any_mode): New variable.
34524 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
34525 if defined.
34526 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
34527 if nonzero.
34528
34529 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34530 Alan Hayward <alan.hayward@arm.com>
34531 David Sherwood <david.sherwood@arm.com>
34532
34533 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
34534 Remove the mode argument.
34535 (aarch64_simd_valid_immediate): Remove the mode and inverse
34536 arguments.
34537 * config/aarch64/iterators.md (bitsize): New iterator.
34538 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
34539 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
34540 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
34541 aarch64_simd_valid_immediate.
34542 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
34543 (aarch64_reg_or_bic_imm): Likewise.
34544 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
34545 with an insn_type enum and msl with a modifier_type enum.
34546 Replace element_width with a scalar_mode. Change the shift
34547 to unsigned int. Add constructors for scalar_float_mode and
34548 scalar_int_mode elements.
34549 (aarch64_vect_float_const_representable_p): Delete.
34550 (aarch64_can_const_movi_rtx_p)
34551 (aarch64_simd_scalar_immediate_valid_for_move)
34552 (aarch64_simd_make_constant): Update call to
34553 aarch64_simd_valid_immediate.
34554 (aarch64_advsimd_valid_immediate_hs): New function.
34555 (aarch64_advsimd_valid_immediate): Likewise.
34556 (aarch64_simd_valid_immediate): Remove mode and inverse
34557 arguments. Rewrite to use the above. Use const_vec_duplicate_p
34558 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
34559 and aarch64_float_const_representable_p on the result.
34560 (aarch64_output_simd_mov_immediate): Remove mode argument.
34561 Update call to aarch64_simd_valid_immediate and use of
34562 simd_immediate_info.
34563 (aarch64_output_scalar_simd_mov_immediate): Update call
34564 accordingly.
34565
34566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34567 Alan Hayward <alan.hayward@arm.com>
34568 David Sherwood <david.sherwood@arm.com>
34569
34570 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
34571 (mode_nunits): Likewise CONST_MODE_NUNITS.
34572 * machmode.def (ADJUST_NUNITS): Document.
34573 * genmodes.c (mode_data::need_nunits_adj): New field.
34574 (blank_mode): Update accordingly.
34575 (adj_nunits): New variable.
34576 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
34577 parameter.
34578 (emit_mode_size_inline): Set need_bytesize_adj for all modes
34579 listed in adj_nunits.
34580 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
34581 listed in adj_nunits. Don't emit case statements for such modes.
34582 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
34583 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
34584 nothing if adj_nunits is nonnull.
34585 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
34586 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
34587 (emit_mode_fbit): Update use of print_maybe_const_decl.
34588 (emit_move_size): Likewise. Treat the array as non-const
34589 if adj_nunits.
34590 (emit_mode_adjustments): Handle adj_nunits.
34591
34592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34593
34594 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
34595 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
34596 (VECTOR_MODES): Use it.
34597 (make_vector_modes): Take the prefix as an argument.
34598
34599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34600 Alan Hayward <alan.hayward@arm.com>
34601 David Sherwood <david.sherwood@arm.com>
34602
34603 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
34604 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
34605 for MODE_VECTOR_BOOL.
34606 * machmode.def (VECTOR_BOOL_MODE): Document.
34607 * genmodes.c (VECTOR_BOOL_MODE): New macro.
34608 (make_vector_bool_mode): New function.
34609 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
34610 MODE_VECTOR_BOOL.
34611 * lto-streamer-in.c (lto_input_mode_table): Likewise.
34612 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
34613 Likewise.
34614 * stor-layout.c (int_mode_for_mode): Likewise.
34615 * tree.c (build_vector_type_for_mode): Likewise.
34616 * varasm.c (output_constant_pool_2): Likewise.
34617 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
34618 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
34619 for MODE_VECTOR_BOOL.
34620 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
34621 of mode class checks.
34622 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
34623 instead of a list of mode class checks.
34624 (expand_vector_scalar_condition): Likewise.
34625 (type_for_widest_vector_mode): Handle BImode as an inner mode.
34626
34627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34628 Alan Hayward <alan.hayward@arm.com>
34629 David Sherwood <david.sherwood@arm.com>
34630
34631 * machmode.h (mode_size): Change from unsigned short to
34632 poly_uint16_pod.
34633 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
34634 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34635 or if measurement_type is not polynomial.
34636 (fixed_size_mode::includes_p): Check for constant-sized modes.
34637 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
34638 return a poly_uint16 rather than an unsigned short.
34639 (emit_mode_size): Change the type of mode_size from unsigned short
34640 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
34641 (emit_mode_adjustments): Cope with polynomial vector sizes.
34642 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34643 for GET_MODE_SIZE.
34644 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34645 for GET_MODE_SIZE.
34646 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
34647 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
34648 * caller-save.c (setup_save_areas): Likewise.
34649 (replace_reg_with_saved_mem): Likewise.
34650 * calls.c (emit_library_call_value_1): Likewise.
34651 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
34652 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
34653 (gen_lowpart_for_combine): Likewise.
34654 * convert.c (convert_to_integer_1): Likewise.
34655 * cse.c (equiv_constant, cse_insn): Likewise.
34656 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
34657 (cselib_subst_to_values): Likewise.
34658 * dce.c (word_dce_process_block): Likewise.
34659 * df-problems.c (df_word_lr_mark_ref): Likewise.
34660 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
34661 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
34662 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
34663 (rtl_for_decl_location): Likewise.
34664 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
34665 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
34666 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
34667 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
34668 (expand_expr_real_1): Likewise.
34669 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
34670 (pad_below): Likewise.
34671 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34672 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
34673 * ira.c (get_subreg_tracking_sizes): Likewise.
34674 * ira-build.c (ira_create_allocno_objects): Likewise.
34675 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
34676 (ira_sort_regnos_for_alter_reg): Likewise.
34677 * ira-costs.c (record_operand_costs): Likewise.
34678 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
34679 (resolve_simple_move): Likewise.
34680 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
34681 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
34682 (lra_constraints): Likewise.
34683 (CONST_POOL_OK_P): Reject variable-sized modes.
34684 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
34685 (add_pseudo_to_slot, lra_spill): Likewise.
34686 * omp-low.c (omp_clause_aligned_alignment): Likewise.
34687 * optabs-query.c (get_best_extraction_insn): Likewise.
34688 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
34689 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
34690 (expand_mult_highpart, valid_multiword_target_p): Likewise.
34691 * recog.c (offsettable_address_addr_space_p): Likewise.
34692 * regcprop.c (maybe_mode_change): Likewise.
34693 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
34694 * regrename.c (build_def_use): Likewise.
34695 * regstat.c (dump_reg_info): Likewise.
34696 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
34697 (find_reloads, find_reloads_subreg_address): Likewise.
34698 * reload1.c (eliminate_regs_1): Likewise.
34699 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
34700 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
34701 (simplify_binary_operation_1, simplify_subreg): Likewise.
34702 * targhooks.c (default_function_arg_padding): Likewise.
34703 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
34704 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
34705 (verify_gimple_assign_ternary): Likewise.
34706 * tree-inline.c (estimate_move_cost): Likewise.
34707 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34708 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
34709 (get_address_cost_ainc): Likewise.
34710 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
34711 (vect_supportable_dr_alignment): Likewise.
34712 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
34713 (vectorizable_reduction): Likewise.
34714 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
34715 (vectorizable_operation, vectorizable_load): Likewise.
34716 * tree.c (build_same_sized_truth_vector_type): Likewise.
34717 * valtrack.c (cleanup_auto_inc_dec): Likewise.
34718 * var-tracking.c (emit_note_insn_var_location): Likewise.
34719 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
34720 (ADDR_VEC_ALIGN): Likewise.
34721
34722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34723 Alan Hayward <alan.hayward@arm.com>
34724 David Sherwood <david.sherwood@arm.com>
34725
34726 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
34727 unsigned short.
34728 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34729 or if measurement_type is polynomial.
34730 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
34731 * combine.c (make_extraction): Likewise.
34732 * dse.c (find_shift_sequence): Likewise.
34733 * dwarf2out.c (mem_loc_descriptor): Likewise.
34734 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
34735 (extract_bit_field, extract_low_bits): Likewise.
34736 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
34737 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
34738 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
34739 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
34740 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34741 * reload.c (find_reloads): Likewise.
34742 * reload1.c (alter_reg): Likewise.
34743 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
34744 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
34745 * tree-if-conv.c (predicate_mem_writes): Likewise.
34746 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
34747 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
34748 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
34749 * valtrack.c (dead_debug_insert_temp): Likewise.
34750 * varasm.c (mergeable_constant_section): Likewise.
34751 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
34752
34753 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34754 Alan Hayward <alan.hayward@arm.com>
34755 David Sherwood <david.sherwood@arm.com>
34756
34757 * expr.c (expand_assignment): Cope with polynomial mode sizes
34758 when assigning to a CONCAT.
34759
34760 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34761 Alan Hayward <alan.hayward@arm.com>
34762 David Sherwood <david.sherwood@arm.com>
34763
34764 * machmode.h (mode_precision): Change from unsigned short to
34765 poly_uint16_pod.
34766 (mode_to_precision): Return a poly_uint16 rather than an unsigned
34767 short.
34768 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
34769 or if measurement_type is not polynomial.
34770 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
34771 in which the mode is already known to be a scalar_int_mode.
34772 * genmodes.c (emit_mode_precision): Change the type of mode_precision
34773 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
34774 initializer.
34775 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34776 for GET_MODE_PRECISION.
34777 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34778 for GET_MODE_PRECISION.
34779 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
34780 as polynomial.
34781 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
34782 (expand_field_assignment, make_extraction): Likewise.
34783 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
34784 (get_last_value): Likewise.
34785 * convert.c (convert_to_integer_1): Likewise.
34786 * cse.c (cse_insn): Likewise.
34787 * expr.c (expand_expr_real_1): Likewise.
34788 * lra-constraints.c (simplify_operand_subreg): Likewise.
34789 * optabs-query.c (can_atomic_load_p): Likewise.
34790 * optabs.c (expand_atomic_load): Likewise.
34791 (expand_atomic_store): Likewise.
34792 * ree.c (combine_reaching_defs): Likewise.
34793 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
34794 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
34795 * tree.h (type_has_mode_precision_p): Likewise.
34796 * ubsan.c (instrument_si_overflow): Likewise.
34797
34798 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34799 Alan Hayward <alan.hayward@arm.com>
34800 David Sherwood <david.sherwood@arm.com>
34801
34802 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
34803 polynomial numbers of units.
34804 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
34805 (valid_vector_subparts_p): New function.
34806 (build_vector_type): Remove temporary shim and take the number
34807 of units as a poly_uint64 rather than an int.
34808 (build_opaque_vector_type): Take the number of units as a
34809 poly_uint64 rather than an int.
34810 * tree.c (build_vector_from_ctor): Handle polynomial
34811 TYPE_VECTOR_SUBPARTS.
34812 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
34813 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
34814 (build_vector_from_val): If the number of units is variable,
34815 use build_vec_duplicate_cst for constant operands and
34816 VEC_DUPLICATE_EXPR otherwise.
34817 (make_vector_type): Remove temporary is_constant ().
34818 (build_vector_type, build_opaque_vector_type): Take the number of
34819 units as a poly_uint64 rather than an int.
34820 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
34821 VECTOR_CST_NELTS.
34822 * cfgexpand.c (expand_debug_expr): Likewise.
34823 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
34824 (store_constructor, expand_expr_real_1): Likewise.
34825 (const_scalar_mask_from_tree): Likewise.
34826 * fold-const-call.c (fold_const_reduction): Likewise.
34827 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
34828 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
34829 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
34830 (fold_relational_const): Likewise.
34831 (native_interpret_vector): Likewise. Change the size from an
34832 int to an unsigned int.
34833 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
34834 TYPE_VECTOR_SUBPARTS.
34835 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
34836 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
34837 duplicating a non-constant operand into a variable-length vector.
34838 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
34839 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
34840 * ipa-icf.c (sem_variable::equals): Likewise.
34841 * match.pd: Likewise.
34842 * omp-simd-clone.c (simd_clone_subparts): Likewise.
34843 * print-tree.c (print_node): Likewise.
34844 * stor-layout.c (layout_type): Likewise.
34845 * targhooks.c (default_builtin_vectorization_cost): Likewise.
34846 * tree-cfg.c (verify_gimple_comparison): Likewise.
34847 (verify_gimple_assign_binary): Likewise.
34848 (verify_gimple_assign_ternary): Likewise.
34849 (verify_gimple_assign_single): Likewise.
34850 * tree-pretty-print.c (dump_generic_node): Likewise.
34851 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34852 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
34853 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
34854 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
34855 (vect_shift_permute_load_chain): Likewise.
34856 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
34857 (expand_vector_condition, optimize_vector_constructor): Likewise.
34858 (lower_vec_perm, get_compute_type): Likewise.
34859 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
34860 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
34861 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
34862 (vect_recog_mask_conversion_pattern): Likewise.
34863 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
34864 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
34865 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34866 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
34867 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
34868 (vectorizable_shift, vectorizable_operation, vectorizable_store)
34869 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
34870 (supportable_widening_operation): Likewise.
34871 (supportable_narrowing_operation): Likewise.
34872 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
34873 Likewise.
34874 * varasm.c (output_constant): Likewise.
34875
34876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34877 Alan Hayward <alan.hayward@arm.com>
34878 David Sherwood <david.sherwood@arm.com>
34879
34880 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
34881 so that both the length == 3 and length != 3 cases set up their
34882 own permute vectors. Add comments explaining why we know the
34883 number of elements is constant.
34884 (vect_permute_load_chain): Likewise.
34885
34886 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34887 Alan Hayward <alan.hayward@arm.com>
34888 David Sherwood <david.sherwood@arm.com>
34889
34890 * machmode.h (mode_nunits): Change from unsigned char to
34891 poly_uint16_pod.
34892 (ONLY_FIXED_SIZE_MODES): New macro.
34893 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
34894 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
34895 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
34896 New typedefs.
34897 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
34898 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
34899 or if measurement_type is not polynomial.
34900 * genmodes.c (ZERO_COEFFS): New macro.
34901 (emit_mode_nunits_inline): Make mode_nunits_inline return a
34902 poly_uint16.
34903 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
34904 Use ZERO_COEFFS when emitting initializers.
34905 * data-streamer.h (bp_pack_poly_value): New function.
34906 (bp_unpack_poly_value): Likewise.
34907 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34908 for GET_MODE_NUNITS.
34909 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34910 for GET_MODE_NUNITS.
34911 * tree.c (make_vector_type): Remove temporary shim and make
34912 the real function take the number of units as a poly_uint64
34913 rather than an int.
34914 (build_vector_type_for_mode): Handle polynomial nunits.
34915 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
34916 * emit-rtl.c (const_vec_series_p_1): Likewise.
34917 (gen_rtx_CONST_VECTOR): Likewise.
34918 * fold-const.c (test_vec_duplicate_folding): Likewise.
34919 * genrecog.c (validate_pattern): Likewise.
34920 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
34921 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
34922 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
34923 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
34924 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
34925 * rtlanal.c (subreg_get_info): Likewise.
34926 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34927 (vect_grouped_load_supported): Likewise.
34928 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
34929 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
34930 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
34931 (simplify_const_unary_operation, simplify_binary_operation_1)
34932 (simplify_const_binary_operation, simplify_ternary_operation)
34933 (test_vector_ops_duplicate, test_vector_ops): Likewise.
34934 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
34935 instead of CONST_VECTOR_NUNITS.
34936 * varasm.c (output_constant_pool_2): Likewise.
34937 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
34938 explicit-encoded elements in the XVEC for variable-length vectors.
34939
34940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34941
34942 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
34943
34944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34945 Alan Hayward <alan.hayward@arm.com>
34946 David Sherwood <david.sherwood@arm.com>
34947
34948 * coretypes.h (fixed_size_mode): Declare.
34949 (fixed_size_mode_pod): New typedef.
34950 * builtins.h (target_builtins::x_apply_args_mode)
34951 (target_builtins::x_apply_result_mode): Change type to
34952 fixed_size_mode_pod.
34953 * builtins.c (apply_args_size, apply_result_size, result_vector)
34954 (expand_builtin_apply_args_1, expand_builtin_apply)
34955 (expand_builtin_return): Update accordingly.
34956
34957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34958
34959 * cse.c (hash_rtx_cb): Hash only the encoded elements.
34960 * cselib.c (cselib_hash_rtx): Likewise.
34961 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
34962 CONST_VECTOR encoding.
34963
34964 2018-01-03 Jakub Jelinek <jakub@redhat.com>
34965 Jeff Law <law@redhat.com>
34966
34967 PR target/83641
34968 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
34969 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
34970 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
34971 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
34972
34973 PR target/83641
34974 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
34975 explicitly probe *sp in a noreturn function if there were any callee
34976 register saves or frame pointer is needed.
34977
34978 2018-01-03 Jakub Jelinek <jakub@redhat.com>
34979
34980 PR debug/83621
34981 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
34982 BLKmode for ternary, binary or unary expressions.
34983
34984 PR debug/83645
34985 * var-tracking.c (delete_vta_debug_insn): New inline function.
34986 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
34987 insns from get_insns () to NULL instead of each bb separately.
34988 Use delete_vta_debug_insn. No longer static.
34989 (vt_debug_insns_local, variable_tracking_main_1): Adjust
34990 delete_vta_debug_insns callers.
34991 * rtl.h (delete_vta_debug_insns): Declare.
34992 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
34993 instead of variable_tracking_main.
34994
34995 2018-01-03 Martin Sebor <msebor@redhat.com>
34996
34997 PR tree-optimization/83603
34998 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
34999 arguments past the endof the argument list in functions declared
35000 without a prototype.
35001 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
35002 Avoid checking when arguments are null.
35003
35004 2018-01-03 Martin Sebor <msebor@redhat.com>
35005
35006 PR c/83559
35007 * doc/extend.texi (attribute const): Fix a typo.
35008 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
35009 issuing -Wsuggest-attribute for void functions.
35010
35011 2018-01-03 Martin Sebor <msebor@redhat.com>
35012
35013 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
35014 offset_int::from instead of wide_int::to_shwi.
35015 (maybe_diag_overlap): Remove assertion.
35016 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
35017 * gimple-ssa-sprintf.c (format_directive): Same.
35018 (parse_directive): Same.
35019 (sprintf_dom_walker::compute_format_length): Same.
35020 (try_substitute_return_value): Same.
35021
35022 2018-01-03 Jeff Law <law@redhat.com>
35023
35024 PR middle-end/83654
35025 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
35026 non-constant residual for zero at runtime and avoid probing in
35027 that case. Reorganize code for trailing problem to mirror handling
35028 of the residual.
35029
35030 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
35031
35032 PR tree-optimization/83501
35033 * tree-ssa-strlen.c (get_string_cst): New.
35034 (handle_char_store): Call get_string_cst.
35035
35036 2018-01-03 Martin Liska <mliska@suse.cz>
35037
35038 PR tree-optimization/83593
35039 * tree-ssa-strlen.c: Include tree-cfg.h.
35040 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
35041 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
35042 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
35043 to false.
35044 (strlen_dom_walker::before_dom_children): Call
35045 gimple_purge_dead_eh_edges. Dump tranformation with details
35046 dump flags.
35047 (strlen_dom_walker::before_dom_children): Update call by adding
35048 new argument cleanup_eh.
35049 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
35050
35051 2018-01-03 Martin Liska <mliska@suse.cz>
35052
35053 PR ipa/83549
35054 * cif-code.def (VARIADIC_THUNK): New enum value.
35055 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
35056 thunks.
35057
35058 2018-01-03 Jan Beulich <jbeulich@suse.com>
35059
35060 * sse.md (mov<mode>_internal): Tighten condition for when to use
35061 vmovdqu<ssescalarsize> for TI and OI modes.
35062
35063 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35064
35065 Update copyright years.
35066
35067 2018-01-03 Martin Liska <mliska@suse.cz>
35068
35069 PR ipa/83594
35070 * ipa-visibility.c (function_and_variable_visibility): Skip
35071 functions with noipa attribure.
35072
35073 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35074
35075 * gcc.c (process_command): Update copyright notice dates.
35076 * gcov-dump.c (print_version): Ditto.
35077 * gcov.c (print_version): Ditto.
35078 * gcov-tool.c (print_version): Ditto.
35079 * gengtype.c (create_file): Ditto.
35080 * doc/cpp.texi: Bump @copying's copyright year.
35081 * doc/cppinternals.texi: Ditto.
35082 * doc/gcc.texi: Ditto.
35083 * doc/gccint.texi: Ditto.
35084 * doc/gcov.texi: Ditto.
35085 * doc/install.texi: Ditto.
35086 * doc/invoke.texi: Ditto.
35087
35088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35089
35090 * vector-builder.h (vector_builder::m_full_nelts): Change from
35091 unsigned int to poly_uint64.
35092 (vector_builder::full_nelts): Update prototype accordingly.
35093 (vector_builder::new_vector): Likewise.
35094 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
35095 (vector_builder::operator ==): Likewise.
35096 (vector_builder::finalize): Likewise.
35097 * int-vector-builder.h (int_vector_builder::int_vector_builder):
35098 Take the number of elements as a poly_uint64 rather than an
35099 unsigned int.
35100 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
35101 from unsigned int to poly_uint64.
35102 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
35103 (vec_perm_indices::new_vector): Likewise.
35104 (vec_perm_indices::length): Likewise.
35105 (vec_perm_indices::nelts_per_input): Likewise.
35106 (vec_perm_indices::input_nelts): Likewise.
35107 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
35108 number of elements per input as a poly_uint64 rather than an
35109 unsigned int. Use the original encoding for variable-length
35110 vectors, rather than clamping each individual element.
35111 For the second and subsequent elements in each pattern,
35112 clamp the step and base before clamping their sum.
35113 (vec_perm_indices::series_p): Handle polynomial element counts.
35114 (vec_perm_indices::all_in_range_p): Likewise.
35115 (vec_perm_indices_to_tree): Likewise.
35116 (vec_perm_indices_to_rtx): Likewise.
35117 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
35118 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
35119 (tree_vector_builder::new_binary_operation): Handle polynomial
35120 element counts. Return false if we need to know the number
35121 of elements at compile time.
35122 * fold-const.c (fold_vec_perm): Punt if the number of elements
35123 isn't known at compile time.
35124
35125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35126
35127 * vec-perm-indices.h (vec_perm_builder): Change element type
35128 from HOST_WIDE_INT to poly_int64.
35129 (vec_perm_indices::element_type): Update accordingly.
35130 (vec_perm_indices::clamp): Handle polynomial element_types.
35131 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35132 (vec_perm_indices::all_in_range_p): Likewise.
35133 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
35134 than shwi trees.
35135 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
35136 polynomial vec_perm_indices element types.
35137 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
35138 * fold-const.c (fold_vec_perm): Likewise.
35139 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
35140 * tree-vect-generic.c (lower_vec_perm): Likewise.
35141 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35142 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
35143 element type to HOST_WIDE_INT.
35144
35145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35146 Alan Hayward <alan.hayward@arm.com>
35147 David Sherwood <david.sherwood@arm.com>
35148
35149 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
35150 rather than an int. Use plus_constant.
35151 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
35152 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
35153
35154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35155 Alan Hayward <alan.hayward@arm.com>
35156 David Sherwood <david.sherwood@arm.com>
35157
35158 * calls.c (emit_call_1, expand_call): Change struct_value_size from
35159 a HOST_WIDE_INT to a poly_int64.
35160
35161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35162 Alan Hayward <alan.hayward@arm.com>
35163 David Sherwood <david.sherwood@arm.com>
35164
35165 * calls.c (load_register_parameters): Cope with polynomial
35166 mode sizes. Require a constant size for BLKmode parameters
35167 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
35168 forces a parameter to be padded at the lsb end in order to
35169 fill a complete number of words, require the parameter size
35170 to be ordered wrt UNITS_PER_WORD.
35171
35172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35173 Alan Hayward <alan.hayward@arm.com>
35174 David Sherwood <david.sherwood@arm.com>
35175
35176 * reload1.c (spill_stack_slot_width): Change element type
35177 from unsigned int to poly_uint64_pod.
35178 (alter_reg): Treat mode sizes as polynomial.
35179
35180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35181 Alan Hayward <alan.hayward@arm.com>
35182 David Sherwood <david.sherwood@arm.com>
35183
35184 * reload.c (complex_word_subreg_p): New function.
35185 (reload_inner_reg_of_subreg, push_reload): Use it.
35186
35187 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35188 Alan Hayward <alan.hayward@arm.com>
35189 David Sherwood <david.sherwood@arm.com>
35190
35191 * lra-constraints.c (process_alt_operands): Reject matched
35192 operands whose sizes aren't ordered.
35193 (match_reload): Refer to this check here.
35194
35195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35196 Alan Hayward <alan.hayward@arm.com>
35197 David Sherwood <david.sherwood@arm.com>
35198
35199 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
35200 that the mode size is in the set {1, 2, 4, 8, 16}.
35201
35202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35203 Alan Hayward <alan.hayward@arm.com>
35204 David Sherwood <david.sherwood@arm.com>
35205
35206 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
35207 Use plus_constant instead of gen_rtx_PLUS.
35208
35209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35210 Alan Hayward <alan.hayward@arm.com>
35211 David Sherwood <david.sherwood@arm.com>
35212
35213 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
35214 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
35215 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
35216 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
35217 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
35218 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
35219 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
35220 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
35221 * config/i386/i386.c (ix86_push_rounding): ...this new function.
35222 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
35223 a poly_int64.
35224 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
35225 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
35226 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
35227 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
35228 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
35229 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
35230 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
35231 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
35232 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
35233 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
35234 function.
35235 * expr.c (emit_move_resolve_push): Treat the input and result
35236 of PUSH_ROUNDING as a poly_int64.
35237 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
35238 (emit_push_insn): Likewise.
35239 * lra-eliminations.c (mark_not_eliminable): Likewise.
35240 * recog.c (push_operand): Likewise.
35241 * reload1.c (elimination_effects): Likewise.
35242 * rtlanal.c (nonzero_bits1): Likewise.
35243 * calls.c (store_one_arg): Likewise. Require the padding to be
35244 known at compile time.
35245
35246 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35247 Alan Hayward <alan.hayward@arm.com>
35248 David Sherwood <david.sherwood@arm.com>
35249
35250 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
35251 Use plus_constant instead of gen_rtx_PLUS.
35252
35253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35254 Alan Hayward <alan.hayward@arm.com>
35255 David Sherwood <david.sherwood@arm.com>
35256
35257 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
35258 rather than an int.
35259
35260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35261 Alan Hayward <alan.hayward@arm.com>
35262 David Sherwood <david.sherwood@arm.com>
35263
35264 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
35265 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
35266 via stack temporaries. Treat the mode size as polynomial too.
35267
35268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35269 Alan Hayward <alan.hayward@arm.com>
35270 David Sherwood <david.sherwood@arm.com>
35271
35272 * expr.c (expand_expr_real_2): When handling conversions involving
35273 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
35274 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
35275 as a poly_uint64 too.
35276
35277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35278 Alan Hayward <alan.hayward@arm.com>
35279 David Sherwood <david.sherwood@arm.com>
35280
35281 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
35282
35283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35284 Alan Hayward <alan.hayward@arm.com>
35285 David Sherwood <david.sherwood@arm.com>
35286
35287 * combine.c (can_change_dest_mode): Handle polynomial
35288 REGMODE_NATURAL_SIZE.
35289 * expmed.c (store_bit_field_1): Likewise.
35290 * expr.c (store_constructor): Likewise.
35291 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
35292 and polynomial REGMODE_NATURAL_SIZE.
35293 (gen_lowpart_common): Likewise.
35294 * reginfo.c (record_subregs_of_mode): Likewise.
35295 * rtlanal.c (read_modify_subreg_p): Likewise.
35296
35297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35298 Alan Hayward <alan.hayward@arm.com>
35299 David Sherwood <david.sherwood@arm.com>
35300
35301 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
35302 numbers of elements.
35303
35304 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35305 Alan Hayward <alan.hayward@arm.com>
35306 David Sherwood <david.sherwood@arm.com>
35307
35308 * match.pd: Cope with polynomial numbers of vector elements.
35309
35310 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35311 Alan Hayward <alan.hayward@arm.com>
35312 David Sherwood <david.sherwood@arm.com>
35313
35314 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
35315 in a POINTER_PLUS_EXPR.
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 * omp-simd-clone.c (simd_clone_subparts): New function.
35322 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
35323 (ipa_simd_modify_function_body): Likewise.
35324
35325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35326 Alan Hayward <alan.hayward@arm.com>
35327 David Sherwood <david.sherwood@arm.com>
35328
35329 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
35330 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
35331 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
35332 (expand_vector_condition, vector_element): Likewise.
35333 (subparts_gt): New function.
35334 (get_compute_type): Use subparts_gt.
35335 (count_type_subparts): Delete.
35336 (expand_vector_operations_1): Use subparts_gt instead of
35337 count_type_subparts.
35338
35339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35340 Alan Hayward <alan.hayward@arm.com>
35341 David Sherwood <david.sherwood@arm.com>
35342
35343 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
35344 (vect_compile_time_alias): ...this new function. Do the calculation
35345 on poly_ints rather than trees.
35346 (vect_prune_runtime_alias_test_list): Update call accordingly.
35347
35348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35349 Alan Hayward <alan.hayward@arm.com>
35350 David Sherwood <david.sherwood@arm.com>
35351
35352 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
35353 numbers of units.
35354 (vect_schedule_slp_instance): Likewise.
35355
35356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35357 Alan Hayward <alan.hayward@arm.com>
35358 David Sherwood <david.sherwood@arm.com>
35359
35360 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
35361 constant and extern definitions for variable-length vectors.
35362 (vect_get_constant_vectors): Note that the number of units
35363 is known to be constant.
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 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
35370 of units as polynomial. Choose between WIDE and NARROW based
35371 on multiple_p.
35372
35373 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35374 Alan Hayward <alan.hayward@arm.com>
35375 David Sherwood <david.sherwood@arm.com>
35376
35377 * tree-vect-stmts.c (simd_clone_subparts): New function.
35378 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
35379
35380 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35381 Alan Hayward <alan.hayward@arm.com>
35382 David Sherwood <david.sherwood@arm.com>
35383
35384 * tree-vect-stmts.c (vectorizable_call): Treat the number of
35385 vectors as polynomial. Use build_index_vector for
35386 IFN_GOMP_SIMD_LANE.
35387
35388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35389 Alan Hayward <alan.hayward@arm.com>
35390 David Sherwood <david.sherwood@arm.com>
35391
35392 * tree-vect-stmts.c (get_load_store_type): Treat the number of
35393 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
35394 for variable-length vectors.
35395 (vectorizable_mask_load_store): Treat the number of units as
35396 polynomial, asserting that it is constant if the condition has
35397 already been enforced.
35398 (vectorizable_store, vectorizable_load): Likewise.
35399
35400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35401 Alan Hayward <alan.hayward@arm.com>
35402 David Sherwood <david.sherwood@arm.com>
35403
35404 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
35405 of units as polynomial. Punt if we can't tell at compile time
35406 which vector contains the final result.
35407
35408 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35409 Alan Hayward <alan.hayward@arm.com>
35410 David Sherwood <david.sherwood@arm.com>
35411
35412 * tree-vect-loop.c (vectorizable_induction): Treat the number
35413 of units as polynomial. Punt on SLP inductions. Use an integer
35414 VEC_SERIES_EXPR for variable-length integer reductions. Use a
35415 cast of such a series for variable-length floating-point
35416 reductions.
35417
35418 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35419 Alan Hayward <alan.hayward@arm.com>
35420 David Sherwood <david.sherwood@arm.com>
35421
35422 * tree.h (build_index_vector): Declare.
35423 * tree.c (build_index_vector): New function.
35424 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
35425 of units as polynomial, forcibly converting it to a constant if
35426 vectorizable_reduction has already enforced the condition.
35427 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
35428 to create a {1,2,3,...} vector.
35429 (vectorizable_reduction): Treat the number of units as polynomial.
35430 Choose vectype_in based on the largest scalar element size rather
35431 than the smallest number of units. Enforce the restrictions
35432 relied on above.
35433
35434 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35435 Alan Hayward <alan.hayward@arm.com>
35436 David Sherwood <david.sherwood@arm.com>
35437
35438 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
35439 number of units as polynomial.
35440
35441 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35442 Alan Hayward <alan.hayward@arm.com>
35443 David Sherwood <david.sherwood@arm.com>
35444
35445 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
35446 * target.def (autovectorize_vector_sizes): Return the vector sizes
35447 by pointer, using vector_sizes rather than a bitmask.
35448 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
35449 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
35450 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
35451 Likewise.
35452 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
35453 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
35454 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
35455 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
35456 * omp-general.c (omp_max_vf): Likewise.
35457 * omp-low.c (omp_clause_aligned_alignment): Likewise.
35458 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
35459 * tree-vect-loop.c (vect_analyze_loop): Likewise.
35460 * tree-vect-slp.c (vect_slp_bb): Likewise.
35461 * doc/tm.texi: Regenerate.
35462 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
35463 to a poly_uint64.
35464 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
35465 the vector size as a poly_uint64 rather than an unsigned int.
35466 (current_vector_size): Change from an unsigned int to a poly_uint64.
35467 (get_vectype_for_scalar_type): Update accordingly.
35468 * tree.h (build_truth_vector_type): Take the size and number of
35469 units as a poly_uint64 rather than an unsigned int.
35470 (build_vector_type): Add a temporary overload that takes
35471 the number of units as a poly_uint64 rather than an unsigned int.
35472 * tree.c (make_vector_type): Likewise.
35473 (build_truth_vector_type): Take the number of units as a poly_uint64
35474 rather than an unsigned int.
35475
35476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35477 Alan Hayward <alan.hayward@arm.com>
35478 David Sherwood <david.sherwood@arm.com>
35479
35480 * target.def (get_mask_mode): Take the number of units and length
35481 as poly_uint64s rather than unsigned ints.
35482 * targhooks.h (default_get_mask_mode): Update accordingly.
35483 * targhooks.c (default_get_mask_mode): Likewise.
35484 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
35485 * doc/tm.texi: Regenerate.
35486
35487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35488 Alan Hayward <alan.hayward@arm.com>
35489 David Sherwood <david.sherwood@arm.com>
35490
35491 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
35492 * omp-general.c (omp_max_vf): Likewise.
35493 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
35494 (expand_omp_simd): Handle polynomial safelen.
35495 * omp-low.c (omplow_simd_context): Add a default constructor.
35496 (omplow_simd_context::max_vf): Change from int to poly_uint64.
35497 (lower_rec_simd_input_clauses): Update accordingly.
35498 (lower_rec_input_clauses): Likewise.
35499
35500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35501 Alan Hayward <alan.hayward@arm.com>
35502 David Sherwood <david.sherwood@arm.com>
35503
35504 * tree-vectorizer.h (vect_nunits_for_cost): New function.
35505 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
35506 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
35507 (vect_analyze_slp_cost): Likewise.
35508 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
35509 (vect_model_load_cost): Likewise.
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_record_max_nunits, vect_build_slp_tree_1)
35516 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
35517 from an unsigned int * to a poly_uint64_pod *.
35518 (calculate_unrolling_factor): New function.
35519 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
35520
35521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35522 Alan Hayward <alan.hayward@arm.com>
35523 David Sherwood <david.sherwood@arm.com>
35524
35525 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
35526 from an unsigned int to a poly_uint64.
35527 (_loop_vec_info::slp_unrolling_factor): Likewise.
35528 (_loop_vec_info::vectorization_factor): Change from an int
35529 to a poly_uint64.
35530 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
35531 (vect_get_num_vectors): New function.
35532 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
35533 (vect_get_num_copies): Use vect_get_num_vectors.
35534 (vect_analyze_data_ref_dependences): Change max_vf from an int *
35535 to an unsigned int *.
35536 (vect_analyze_data_refs): Change min_vf from an int * to a
35537 poly_uint64 *.
35538 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35539 than an unsigned HOST_WIDE_INT.
35540 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
35541 (vect_analyze_data_ref_dependence): Change max_vf from an int *
35542 to an unsigned int *.
35543 (vect_analyze_data_ref_dependences): Likewise.
35544 (vect_compute_data_ref_alignment): Handle polynomial vf.
35545 (vect_enhance_data_refs_alignment): Likewise.
35546 (vect_prune_runtime_alias_test_list): Likewise.
35547 (vect_shift_permute_load_chain): Likewise.
35548 (vect_supportable_dr_alignment): Likewise.
35549 (dependence_distance_ge_vf): Take the vectorization factor as a
35550 poly_uint64 rather than an unsigned HOST_WIDE_INT.
35551 (vect_analyze_data_refs): Change min_vf from an int * to a
35552 poly_uint64 *.
35553 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
35554 vfm1 as a poly_uint64 rather than an int. Make the same change
35555 for the returned bound_scalar.
35556 (vect_gen_vector_loop_niters): Handle polynomial vf.
35557 (vect_do_peeling): Likewise. Update call to
35558 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
35559 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
35560 be constant.
35561 * tree-vect-loop.c (vect_determine_vectorization_factor)
35562 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
35563 (vect_get_known_peeling_cost): Likewise.
35564 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
35565 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
35566 (vect_transform_loop): Likewise. Use the lowest possible VF when
35567 updating the upper bounds of the loop.
35568 (vect_min_worthwhile_factor): Make static. Return an unsigned int
35569 rather than an int.
35570 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
35571 polynomial unroll factors.
35572 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
35573 (vect_make_slp_decision): Likewise.
35574 (vect_supported_load_permutation_p): Likewise, and polynomial
35575 vf too.
35576 (vect_analyze_slp_cost): Handle polynomial vf.
35577 (vect_slp_analyze_node_operations): Likewise.
35578 (vect_slp_analyze_bb_1): Likewise.
35579 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35580 than an unsigned HOST_WIDE_INT.
35581 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
35582 (vectorizable_load): Handle polynomial vf.
35583 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
35584 a poly_uint64.
35585 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
35586
35587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35588 Alan Hayward <alan.hayward@arm.com>
35589 David Sherwood <david.sherwood@arm.com>
35590
35591 * match.pd: Handle bit operations involving three constants
35592 and try to fold one pair.
35593
35594 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35595
35596 * tree-vect-loop-manip.c: Include gimple-fold.h.
35597 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
35598 niters_maybe_zero parameters. Handle other cases besides a step of 1.
35599 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
35600 Add a path that uses a step of VF instead of 1, but disable it
35601 for now.
35602 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
35603 and niters_no_overflow parameters. Update calls to
35604 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
35605 Create a new SSA name if the latter choses to use a ste other
35606 than zero, and return it via niters_vector_mult_vf_var.
35607 * tree-vect-loop.c (vect_transform_loop): Update calls to
35608 vect_do_peeling, vect_gen_vector_loop_niters and
35609 slpeel_make_loop_iterate_ntimes.
35610 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
35611 (vect_gen_vector_loop_niters): Update declarations after above changes.
35612
35613 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
35614
35615 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
35616 128-bit round to integer instructions.
35617 (ceil<mode>2): Likewise.
35618 (btrunc<mode>2): Likewise.
35619 (round<mode>2): Likewise.
35620
35621 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
35622
35623 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
35624 unaligned VSX load/store on P8/P9.
35625 (expand_block_clear): Allow the use of unaligned VSX
35626 load/store on P8/P9.
35627
35628 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35629
35630 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
35631 New function.
35632 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
35633 swap associated with both a load and a store.
35634
35635 2018-01-02 Andrew Waterman <andrew@sifive.com>
35636
35637 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
35638 * config/riscv/riscv.md (clear_cache): Use it.
35639
35640 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
35641
35642 * web.c: Remove out-of-date comment.
35643
35644 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35645
35646 * expr.c (fixup_args_size_notes): Check that any existing
35647 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
35648 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
35649 (emit_single_push_insn): ...here.
35650
35651 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35652
35653 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
35654 (const_vector_encoded_nelts): New function.
35655 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
35656 (const_vector_int_elt, const_vector_elt): Declare.
35657 * emit-rtl.c (const_vector_int_elt_1): New function.
35658 (const_vector_elt): Likewise.
35659 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
35660 of CONST_VECTOR_ELT.
35661
35662 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35663
35664 * expr.c: Include rtx-vector-builder.h.
35665 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
35666 directly on the tree encoding.
35667 (const_vector_from_tree): Likewise.
35668 * optabs.c: Include rtx-vector-builder.h.
35669 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
35670 sequence of "u" values.
35671 * vec-perm-indices.c: Include rtx-vector-builder.h.
35672 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
35673 directly on the vec_perm_indices encoding.
35674
35675 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35676
35677 * doc/rtl.texi (const_vector): Describe new encoding scheme.
35678 * Makefile.in (OBJS): Add rtx-vector-builder.o.
35679 * rtx-vector-builder.h: New file.
35680 * rtx-vector-builder.c: Likewise.
35681 * rtl.h (rtx_def::u2): Add a const_vector field.
35682 (CONST_VECTOR_NPATTERNS): New macro.
35683 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
35684 (CONST_VECTOR_DUPLICATE_P): Likewise.
35685 (CONST_VECTOR_STEPPED_P): Likewise.
35686 (CONST_VECTOR_ENCODED_ELT): Likewise.
35687 (const_vec_duplicate_p): Check for a duplicated vector encoding.
35688 (unwrap_const_vec_duplicate): Likewise.
35689 (const_vec_series_p): Check for a non-duplicated vector encoding.
35690 Say that the function only returns true for integer vectors.
35691 * emit-rtl.c: Include rtx-vector-builder.h.
35692 (gen_const_vec_duplicate_1): Delete.
35693 (gen_const_vector): Call gen_const_vec_duplicate instead of
35694 gen_const_vec_duplicate_1.
35695 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
35696 (gen_const_vec_duplicate): Use rtx_vector_builder.
35697 (gen_const_vec_series): Likewise.
35698 (gen_rtx_CONST_VECTOR): Likewise.
35699 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
35700 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35701 Build a new vector rather than modifying a CONST_VECTOR in-place.
35702 (handle_special_swappables): Update call accordingly.
35703 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
35704 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35705 Build a new vector rather than modifying a CONST_VECTOR in-place.
35706 (handle_special_swappables): Update call accordingly.
35707
35708 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35709
35710 * simplify-rtx.c (simplify_const_binary_operation): Use
35711 CONST_VECTOR_ELT instead of XVECEXP.
35712
35713 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35714
35715 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
35716 the selector elements to be different from the data elements
35717 if the selector is a VECTOR_CST.
35718 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
35719 ssizetype for the selector.
35720
35721 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35722
35723 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
35724 before testing each element individually.
35725 * tree-vect-generic.c (lower_vec_perm): Likewise.
35726
35727 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35728
35729 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
35730 * selftest-run-tests.c (selftest::run_tests): Call it.
35731 * vector-builder.h (vector_builder::operator ==): New function.
35732 (vector_builder::operator !=): Likewise.
35733 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
35734 (vec_perm_indices::all_from_input_p): New function.
35735 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35736 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
35737 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
35738 instead of reading the VECTOR_CST directly. Detect whether both
35739 vector inputs are the same before constructing the vec_perm_indices,
35740 and update the number of inputs argument accordingly. Use the
35741 utility functions added above. Only construct sel2 if we need to.
35742
35743 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35744
35745 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
35746 the broadcast of the low byte.
35747 (expand_mult_highpart): Use an explicit encoding for the permutes.
35748 * optabs-query.c (can_mult_highpart_p): Likewise.
35749 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
35750 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35751 (vectorizable_bswap): Likewise.
35752 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
35753 explicit encoding for the power-of-2 permutes.
35754 (vect_permute_store_chain): Likewise.
35755 (vect_grouped_load_supported): Likewise.
35756 (vect_permute_load_chain): Likewise.
35757
35758 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35759
35760 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
35761 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
35762 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
35763 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35764 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
35765 (vect_gen_perm_mask_any): Likewise.
35766
35767 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35768
35769 * int-vector-builder.h: New file.
35770 * vec-perm-indices.h: Include int-vector-builder.h.
35771 (vec_perm_indices): Redefine as an int_vector_builder.
35772 (auto_vec_perm_indices): Delete.
35773 (vec_perm_builder): Redefine as a stand-alone class.
35774 (vec_perm_indices::vec_perm_indices): New function.
35775 (vec_perm_indices::clamp): Likewise.
35776 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
35777 (vec_perm_indices::new_vector): New function.
35778 (vec_perm_indices::new_expanded_vector): Update for new
35779 vec_perm_indices class.
35780 (vec_perm_indices::rotate_inputs): New function.
35781 (vec_perm_indices::all_in_range_p): Operate directly on the
35782 encoded form, without computing elided elements.
35783 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
35784 encoding. Update for new vec_perm_indices class.
35785 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
35786 the given vec_perm_builder.
35787 (expand_vec_perm_var): Update vec_perm_builder constructor.
35788 (expand_mult_highpart): Use vec_perm_builder instead of
35789 auto_vec_perm_indices.
35790 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
35791 vec_perm_indices instead of auto_vec_perm_indices. Use a single
35792 or double series encoding as appropriate.
35793 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
35794 vec_perm_indices instead of auto_vec_perm_indices.
35795 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35796 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35797 (vect_permute_store_chain): Likewise.
35798 (vect_grouped_load_supported): Likewise.
35799 (vect_permute_load_chain): Likewise.
35800 (vect_shift_permute_load_chain): Likewise.
35801 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
35802 (vect_transform_slp_perm_load): Likewise.
35803 (vect_schedule_slp_instance): Likewise.
35804 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35805 (vectorizable_mask_load_store): Likewise.
35806 (vectorizable_bswap): Likewise.
35807 (vectorizable_store): Likewise.
35808 (vectorizable_load): Likewise.
35809 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
35810 vec_perm_indices instead of auto_vec_perm_indices. Use
35811 tree_to_vec_perm_builder to read the vector from a tree.
35812 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
35813 vec_perm_builder instead of a vec_perm_indices.
35814 (have_whole_vector_shift): Use vec_perm_builder and
35815 vec_perm_indices instead of auto_vec_perm_indices. Leave the
35816 truncation to calc_vec_perm_mask_for_shift.
35817 (vect_create_epilog_for_reduction): Likewise.
35818 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
35819 from auto_vec_perm_indices to vec_perm_indices.
35820 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35821 instead of changing individual elements.
35822 (aarch64_vectorize_vec_perm_const): Use new_vector to install
35823 the vector in d.perm.
35824 * config/arm/arm.c (expand_vec_perm_d::perm): Change
35825 from auto_vec_perm_indices to vec_perm_indices.
35826 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35827 instead of changing individual elements.
35828 (arm_vectorize_vec_perm_const): Use new_vector to install
35829 the vector in d.perm.
35830 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
35831 Update vec_perm_builder constructor.
35832 (rs6000_expand_interleave): Likewise.
35833 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
35834 (rs6000_expand_interleave): Likewise.
35835
35836 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35837
35838 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
35839 to qimode could truncate the indices.
35840 * optabs.c (expand_vec_perm_var): Likewise.
35841
35842 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35843
35844 * Makefile.in (OBJS): Add vec-perm-indices.o.
35845 * vec-perm-indices.h: New file.
35846 * vec-perm-indices.c: Likewise.
35847 * target.h (vec_perm_indices): Replace with a forward class
35848 declaration.
35849 (auto_vec_perm_indices): Move to vec-perm-indices.h.
35850 * optabs.h: Include vec-perm-indices.h.
35851 (expand_vec_perm): Delete.
35852 (selector_fits_mode_p, expand_vec_perm_var): Declare.
35853 (expand_vec_perm_const): Declare.
35854 * target.def (vec_perm_const_ok): Replace with...
35855 (vec_perm_const): ...this new hook.
35856 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
35857 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
35858 * doc/tm.texi: Regenerate.
35859 * optabs.def (vec_perm_const): Delete.
35860 * doc/md.texi (vec_perm_const): Likewise.
35861 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
35862 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
35863 expand_vec_perm for constant permutation vectors. Assert that
35864 the mode of variable permutation vectors is the integer equivalent
35865 of the mode that is being permuted.
35866 * optabs-query.h (selector_fits_mode_p): Declare.
35867 * optabs-query.c: Include vec-perm-indices.h.
35868 (selector_fits_mode_p): New function.
35869 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
35870 is defined, instead of checking whether the vec_perm_const_optab
35871 exists. Use targetm.vectorize.vec_perm_const instead of
35872 targetm.vectorize.vec_perm_const_ok. Check whether the indices
35873 fit in the vector mode before using a variable permute.
35874 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
35875 vec_perm_indices instead of an rtx.
35876 (expand_vec_perm): Replace with...
35877 (expand_vec_perm_const): ...this new function. Take the selector
35878 as a vec_perm_indices rather than an rtx. Also take the mode of
35879 the selector. Update call to shift_amt_for_vec_perm_mask.
35880 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
35881 Use vec_perm_indices::new_expanded_vector to expand the original
35882 selector into bytes. Check whether the indices fit in the vector
35883 mode before using a variable permute.
35884 (expand_vec_perm_var): Make global.
35885 (expand_mult_highpart): Use expand_vec_perm_const.
35886 * fold-const.c: Includes vec-perm-indices.h.
35887 * tree-ssa-forwprop.c: Likewise.
35888 * tree-vect-data-refs.c: Likewise.
35889 * tree-vect-generic.c: Likewise.
35890 * tree-vect-loop.c: Likewise.
35891 * tree-vect-slp.c: Likewise.
35892 * tree-vect-stmts.c: Likewise.
35893 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
35894 Delete.
35895 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
35896 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
35897 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
35898 (aarch64_vectorize_vec_perm_const): ...this new function.
35899 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35900 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35901 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
35902 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
35903 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35904 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35905 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
35906 into...
35907 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
35908 check for NEON modes.
35909 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
35910 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
35911 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
35912 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
35913 into...
35914 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
35915 the old VEC_PERM_CONST conditions.
35916 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
35917 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
35918 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
35919 (ia64_vectorize_vec_perm_const_ok): Merge into...
35920 (ia64_vectorize_vec_perm_const): ...this new function.
35921 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
35922 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
35923 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
35924 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
35925 * config/mips/mips.c (mips_expand_vec_perm_const)
35926 (mips_vectorize_vec_perm_const_ok): Merge into...
35927 (mips_vectorize_vec_perm_const): ...this new function.
35928 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
35929 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
35930 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
35931 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
35932 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
35933 (rs6000_expand_vec_perm_const): Delete.
35934 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
35935 Delete.
35936 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35937 (altivec_expand_vec_perm_const_le): Take each operand individually.
35938 Operate on constant selectors rather than rtxes.
35939 (altivec_expand_vec_perm_const): Likewise. Update call to
35940 altivec_expand_vec_perm_const_le.
35941 (rs6000_expand_vec_perm_const): Delete.
35942 (rs6000_vectorize_vec_perm_const_ok): Delete.
35943 (rs6000_vectorize_vec_perm_const): New function.
35944 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
35945 an element count and rtx array.
35946 (rs6000_expand_extract_even): Update call accordingly.
35947 (rs6000_expand_interleave): Likewise.
35948 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
35949 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
35950 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
35951 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
35952 (rs6000_expand_vec_perm_const): Delete.
35953 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35954 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35955 (altivec_expand_vec_perm_const_le): Take each operand individually.
35956 Operate on constant selectors rather than rtxes.
35957 (altivec_expand_vec_perm_const): Likewise. Update call to
35958 altivec_expand_vec_perm_const_le.
35959 (rs6000_expand_vec_perm_const): Delete.
35960 (rs6000_vectorize_vec_perm_const_ok): Delete.
35961 (rs6000_vectorize_vec_perm_const): New function. Remove stray
35962 reference to the SPE evmerge intructions.
35963 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
35964 an element count and rtx array.
35965 (rs6000_expand_extract_even): Update call accordingly.
35966 (rs6000_expand_interleave): Likewise.
35967 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
35968 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
35969 new function.
35970 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35971
35972 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35973
35974 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
35975 vector mode and that that mode matches the mode of the data
35976 being permuted.
35977 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
35978 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
35979 directly using expand_vec_perm_1 when forcing selectors into
35980 registers.
35981 (expand_vec_perm_var): New function, split out from expand_vec_perm.
35982
35983 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35984
35985 * optabs-query.h (can_vec_perm_p): Delete.
35986 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
35987 * optabs-query.c (can_vec_perm_p): Split into...
35988 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
35989 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
35990 particular selector is valid.
35991 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35992 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35993 (vect_grouped_load_supported): Likewise.
35994 (vect_shift_permute_load_chain): Likewise.
35995 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
35996 (vect_transform_slp_perm_load): Likewise.
35997 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35998 (vectorizable_bswap): Likewise.
35999 (vect_gen_perm_mask_checked): Likewise.
36000 * fold-const.c (fold_ternary_loc): Likewise. Don't take
36001 implementations of variable permutation vectors into account
36002 when deciding which selector to use.
36003 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
36004 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
36005 with a false third argument.
36006 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
36007 to test whether the constant selector is valid and can_vec_perm_var_p
36008 to test whether a variable selector is valid.
36009
36010 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36011
36012 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
36013 * optabs-query.c (can_vec_perm_p): Likewise.
36014 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
36015 instead of vec_perm_indices.
36016 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
36017 (vect_gen_perm_mask_checked): Likewise,
36018 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
36019 (vect_gen_perm_mask_checked): Likewise,
36020
36021 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36022
36023 * optabs-query.h (qimode_for_vec_perm): Declare.
36024 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
36025 (qimode_for_vec_perm): ...this new function.
36026 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
36027
36028 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
36029
36030 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
36031 does not have a conditional at the top.
36032
36033 2018-01-02 Richard Biener <rguenther@suse.de>
36034
36035 * ipa-inline.c (big_speedup_p): Fix expression.
36036
36037 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36038
36039 PR target/81616
36040 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
36041 for generic 4->6.
36042
36043 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36044
36045 PR target/81616
36046 Generic tuning.
36047 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
36048 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
36049 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
36050 cond_taken_branch_cost 3->4.
36051
36052 2018-01-01 Jakub Jelinek <jakub@redhat.com>
36053
36054 PR tree-optimization/83581
36055 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
36056 TODO_cleanup_cfg if any changes have been made.
36057
36058 PR middle-end/83608
36059 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
36060 convert_modes if target mode has the right side, but different mode
36061 class.
36062
36063 PR middle-end/83609
36064 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
36065 last argument when extracting from CONCAT. If either from_real or
36066 from_imag is NULL, use expansion through memory. If result is not
36067 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
36068 the parts directly to inner mode, if even that fails, use expansion
36069 through memory.
36070
36071 PR middle-end/83623
36072 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
36073 check for bswap in mode rather than HImode and use that in expand_unop
36074 too.
36075 \f
36076 Copyright (C) 2018 Free Software Foundation, Inc.
36077
36078 Copying and distribution of this file, with or without modification,
36079 are permitted in any medium without royalty provided the copyright
36080 notice and this notice are preserved.