ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
[gcc.git] / gcc / ChangeLog
1 2018-11-06 Jan Hubicka <jh@suse.cz>
2
3 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
4 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
5 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
6 stream TYPE_NEEDS_CONSTRUCTING.
7 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
8 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
9
10 2018-11-06 Richard Biener <rguenther@suse.de>
11
12 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
13 dump-scope ...
14 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
15
16 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17
18 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
19 REG_CLASS_CONTENTS[GEN_REGS].
20 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
21
22 2018-11-06 Jan Hubicka <jh@suse.cz>
23
24 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
25
26 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27
28 PR sanitizer/80953
29 * config/sol2.h (ASAN_CC1_SPEC): Define.
30 (LD_WHOLE_ARCHIVE_OPTION): Define.
31 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
32 (ASAN_REJECT_SPEC): Provide default.
33 (LIBASAN_EARLY_SPEC): Define.
34 (LIBTSAN_EARLY_SPEC): Define.
35 (LIBLSAN_EARLY_SPEC): Define.
36 * config/i386/sol2.h (CC1_SPEC): Redefine.
37 (ASAN_REJECT_SPEC): Define.
38
39 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
40 (TARGET_ASAN_SHADOW_OFFSET): Define.
41 (sparc_asan_shadow_offset): New function.
42 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
43 (ASAN_REJECT_SPEC): Define.
44
45 2018-11-06 Jan Hubicka <jh@suse.cz>
46
47 * tree.c (fld_type_variant): Copy canonical type.
48 (fld_incomplete_type_of): Check that canonical types looks sane;
49 copy canonical type.
50 (verify_type): Accept when incomplete type has complete canonical type.
51
52 2018-11-06 Jan Hubicka <jh@suse.cz>
53
54 * tree.c (free_lang_data): Reset overwite_assembler_name,
55 print_xnode, print_decl, print_type and print_identifier of
56 langhooks.
57
58 2018-11-06 Richard Biener <rguenther@suse.de>
59
60 PR tree-optimization/87889
61 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
62 Do nothing if old and new arg are the same
63
64 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
65
66 PR target/87723
67 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
68 attributes for operands 3 and 4.
69
70 2018-11-06 Richard Biener <rguenther@suse.de>
71
72 PR middle-end/18041
73 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
74 matching bitfield insertion.
75
76 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
77
78 * auto-inc-dec.c: Include valtrack.h. Improve comments.
79 (reg_next_debug_use): New.
80 (attempt_change): Propagate adjusted expression into affected
81 debug insns.
82 (merge_in_block): Track uses in debug insns.
83 (pass_inc_dec::execute): Allocate and release
84 reg_next_debug_use.
85
86 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
87
88 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
89 (_mm512_fixupimm_round_pd): Update parameters and builtin.
90 (_mm512_maskz_fixupimm_round_pd): Ditto.
91 (_mm512_fixupimm_round_ps): Ditto.
92 (_mm512_maskz_fixupimm_round_ps): Ditto.
93 (_mm_fixupimm_round_sd): Ditto.
94 (_mm_maskz_fixupimm_round_sd): Ditto.
95 (_mm_fixupimm_round_ss): Ditto.
96 (_mm_maskz_fixupimm_round_ss): Ditto.
97 (_mm512_fixupimm_pd): Ditto.
98 (_mm512_maskz_fixupimm_pd): Ditto.
99 (_mm512_fixupimm_ps): Ditto.
100 (_mm512_maskz_fixupimm_ps): Ditto.
101 (_mm_fixupimm_sd): Ditto.
102 (_mm_maskz_fixupimm_sd): Ditto.
103 (_mm_fixupimm_ss): Ditto.
104 (_mm_maskz_fixupimm_ss): Ditto.
105 (_mm512_mask_fixupimm_round_pd): Update builtin.
106 (_mm512_mask_fixupimm_round_ps): Ditto.
107 (_mm_mask_fixupimm_round_sd): Ditto.
108 (_mm_mask_fixupimm_round_ss): Ditto.
109 (_mm512_mask_fixupimm_pd): Ditto.
110 (_mm512_mask_fixupimm_ps): Ditto.
111 (_mm_mask_fixupimm_sd): Ditto.
112 (_mm_mask_fixupimm_ss): Ditto.
113 * config/i386/avx512vlintrin.h:
114 (_mm256_fixupimm_pd): Update parameters and builtin.
115 (_mm256_maskz_fixupimm_pd): Ditto.
116 (_mm256_fixupimm_ps): Ditto.
117 (_mm256_maskz_fixupimm_ps): Ditto.
118 (_mm_fixupimm_pd): Ditto.
119 (_mm_maskz_fixupimm_pd): Ditto.
120 (_mm_fixupimm_ps): Ditto.
121 (_mm_maskz_fixupimm_ps): Ditto.
122 (_mm256_mask_fixupimm_pd): Update builtin.
123 (_mm256_mask_fixupimm_ps): Ditto.
124 (_mm_mask_fixupimm_pd): Ditto.
125 (_mm_mask_fixupimm_ps): Ditto.
126 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
127 * config/i386/i386-builtin.def: Update builtin definitions.
128 * config/i386/i386.c: Handle new builtin types and remove useless ones.
129 * config/i386/sse.md: Update VFIXUPIMM* patterns.
130 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
131 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
132 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
133 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
134 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
135 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
136 * config/i386/subst.md:
137 (round_saeonly_sd_mask_operand4): Add new subst_attr.
138 (round_saeonly_sd_mask_op4): Ditto.
139 (round_saeonly_expand_operand5): Ditto.
140 (round_saeonly_expand): Update.
141
142 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
143
144 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
145
146 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
147
148 PR rtl-optimization/87871
149 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
150
151 2018-11-05 Paul Koning <ni1d@arrl.net>
152
153 * doc/sourcebuild.texi (target attributes): Document new "inf"
154 effective target keyword.
155
156 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
157
158 * config/s390/s390.c (s390_register_move_cost): Increase costs for
159 moves involving the CC reg.
160
161 2018-11-05 Richard Biener <rguenther@suse.de>
162
163 PR tree-optimization/87873
164 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
165 argument.
166 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
167 * tree-vect-loop.c (vect_transform_loop): When splitting the
168 loop exit also create forwarder PHIs for constants.
169 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
170 Handle constant to_arg, add extra checking we match up the correct
171 PHIs.
172
173 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
174
175 * config/s390/s390.md: QImode and HImode for load on condition.
176
177 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
178
179 * config/s390/predicates.md: Fix typo.
180 * config/s390/s390.md: Allow immediates for load on condition.
181
182 2018-11-05 Martin Liska <mliska@suse.cz>
183
184 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
185 * bitmap.h (struct bitmap_usage): Likewise.
186 * ggc-common.c (SCALE): Remove.
187 (LABEL): Likewise.
188 (struct ggc_usage): Use SIZE_AMOUNT. And update
189 compare method.
190 * ggc-page.c (SCALE): Remove.
191 (STAT_LABEL): Remove.
192 (ggc_print_statistics): Use SIZE_AMOUNT.
193 * gimple.h (SCALE): Remove.
194 (LABEL): Likewise.
195 * input.c (ONE_K): Remove.
196 (ONE_M): Likewise.
197 (SCALE): Likewise.
198 (STAT_LABEL): Likewise.
199 (FORMAT_AMOUNT): Likewise.
200 (dump_line_table_statistics): Use SIZE_AMOUNT.
201 * mem-stats.h (struct mem_usage): Likewise.
202 * rtl.c (dump_rtx_statistics): Likewise.
203 (rtx_alloc_counts): Change type to size_t.
204 (rtx_alloc_sizes): Likewise.
205 (rtx_count_cmp): New.
206 (dump_rtx_statistics): Sort first based on counts.
207 * tree.c (tree_nodes_cmp): New.
208 (tree_codes_cmp): New.
209 (dump_tree_statistics): Sort first based on counts.
210 * system.h (ONE_K): New.
211 (ONE_M): Likewise.
212 (SIZE_SCALE): Likewise.
213 (SIZE_LABEL): Likewise.
214 (SIZE_AMOUNT): Likewise.
215 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
216 * tree-dfa.c (dump_dfa_stats): Likewise.
217 * tree-phinodes.c (phinodes_print_statistics): Likewise.
218 * tree-ssanames.c (ssanames_print_statistics): Likewise.
219 * tree.c (dump_tree_statistics): Likewise.
220 * vec.c (struct vec_usage): Likewise.
221 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
222 trigger a -Werror=format-overflow with
223 --enable-gather-detailed-stats.
224
225 2018-11-05 Martin Liska <mliska@suse.cz>
226
227 * mem-stats.h (mem_alloc_description::release_instance_overhead):
228 Return T *.
229 * vec.c (struct vec_usage): Register m_element_size.
230 (vec_prefix::register_overhead): New arguments: elements and
231 element_size.
232 (vec_prefix::release_overhead): Subtract elements.
233 * vec.h (struct vec_prefix): Change signature.
234 (va_heap::reserve): Pass proper arguments.
235 (va_heap::release): Likewise.
236
237 2018-11-05 Martin Liska <mliska@suse.cz>
238
239 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
240 style.
241 * vec.c: Likewise.
242
243 2018-11-05 Richard Biener <rguenther@suse.de>
244
245 * tree-scalar-evolution.h (final_value_replacement_loop): Update
246 prototype.
247 * tree-scalar-evolution.c (final_value_replacement_loop): Return
248 whether anything was done.
249 (scev_const_prop): Remove constant propagation part, fold
250 remains into ...
251 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
252 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
253 conditionally.
254
255 2018-11-05 Jakub Jelinek <jakub@redhat.com>
256
257 PR tree-optimization/87859
258 * gimple-ssa-store-merging.c (struct merged_store_group): Add
259 only_constants and first_nonmergeable_order members.
260 (merged_store_group::merged_store_group): Initialize them.
261 (merged_store_group::do_merge): Clear only_constants member if
262 adding something other than INTEGER_CST store.
263 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
264 stores with order >= first_nonmergeable_order. Use
265 merged_store->only_constants instead of always recomputing it.
266 Set merged_store->first_nonmergeable_order if we've skipped any
267 stores. Attempt to merge overlapping INTEGER_CST stores that
268 we would otherwise skip.
269
270 PR sanitizer/87837
271 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
272
273 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
274
275 PR target/87853
276 * config/i386/emmintrin.h (__v16qs): New to cope with option
277 -funsigned-char.
278 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
279 (_mm_cmplt_epi8): Likewise.
280 (_mm_cmpgt_epi8): Likewise.
281
282 2018-11-05 Richard Biener <rguenther@suse.de>
283
284 PR rtl-optimization/87852
285 * fwprop.c (use_killed_between): Only consider single-defs of the
286 use whose definition statement dominates the use.
287
288 2018-11-05 Martin Liska <mliska@suse.cz>
289
290 PR web/87829
291 * doc/invoke.texi: Remove options that are
292 not disabled with -Os.
293
294 2018-11-05 Martin Liska <mliska@suse.cz>
295
296 PR c/87811
297 * doc/extend.texi: Update constrain about the last argument
298 of __builtin_expect_with_probability.
299
300 2018-11-05 Martin Liska <mliska@suse.cz>
301
302 PR c/87811
303 * predict.c (expr_expected_value_1): Verify
304 that last argument is a real constants and emit
305 error.
306
307 2018-11-05 Martin Liska <mliska@suse.cz>
308
309 PR gcov-profile/77698
310 * ipa-profile.c (ipa_profile): Adjust hotness threshold
311 only in LTO mode.
312
313 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
314
315 PR tree-optimization/86572
316 * builtins.c (c_strlen): Handle negative offsets in a safe way.
317
318 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
319
320 PR tree-optimization/87672
321 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
322 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
323
324 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
325
326 PR middle-end/58372
327 * cfgexpand.c (pass_expand::execute): Move the call to
328 finish_eh_generation in front of the call to expand_stack_alignment.
329
330 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
331
332 * common/config/i386/i386-common.c (processor_alias_table): Add
333 znver2 entry.
334 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
335 (case ${target}): Add znver2.
336 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
337 -march=native recognize znver2 processors.
338 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
339 * config/i386/i386.c (m_znver2): New definition.
340 (m_ZNVER): New definition.
341 (m_AMD_MULTIPLE): Includes m_znver2.
342 (processor_cost_table): Add znver2 entry.
343 (processor_target_table): Add znver2 entry.
344 (get_builtin_code_for_version): Set priority for
345 PROCESSOR_ZNVER2.
346 (processor_model): Add M_AMDFAM17H_ZNVER2.
347 (arch_names_table): Ditto.
348 (ix86_reassociation_width): Include znver2.
349 * config/i386/i386.h (TARGET_znver2): New definition.
350 (struct ix86_size_cost): Add TARGET_ZNVER2.
351 (enum processor_type): Add PROCESSOR_ZNVER2.
352 * config/i386/i386.md (define_attr "cpu"): Add znver2.
353 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
354 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
355 (ix86_adjust_cost): Add znver2.
356 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
357 * gcc/doc/extend.texi: Add details about znver2.
358 * gcc/doc/invoke.texi: Add details about znver2.
359
360 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
361
362 PR target/87079
363
364 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
365 pattern.
366
367 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
368
369 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
370 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
371
372 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
373
374 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
375 shrink-wrapping when -mtrack-speculation.
376
377 2018-11-02 Richard Biener <rguenther@suse.de>
378
379 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
380 (pop_cost_one_pair): Do not free pair.
381 (pop_best_coalesce): Likewise.
382 (create_coalesce_list): Initialize obstack.
383 (delete_coalesce_list): Free obstack.
384 (find_coalesce_pair): Obstack-allocate coalesce pairs.
385 (add_cost_one_coalesce): Likewise.
386 (struct live_track): Remove bitmap pointer indirections.
387 (new_live_track): Adjust.
388 (delete_live_track): Likewise.
389 (live_track_remove_partition): Likewise.
390 (live_track_add_partition): Likewise.
391 (live_track_live_p): Likewise.
392 (live_track_process_def): Likewise.
393 (live_track_clear_base_vars): Likewise.
394
395 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
396
397 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
398 * configure: Regenerate.
399 * config.in: Regenerate.
400 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
401 HAVE_AS_REGISTER_PSEUDO_OP guard.
402 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
403 !HAVE_AS_REGISTER_PSEUDO_OP support.
404 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
405 guard.
406
407 2018-11-02 Richard Biener <rguenther@suse.de>
408
409 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
410 with is_type_die.
411
412 2018-11-02 Richard Biener <rguenther@suse.de>
413
414 PR tree-optimization/87776
415 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
416 executable when iterating but running into rpo-vn-max-loop-depth
417 and not eliding the iteration.
418
419 2018-11-30 Jan Hubicka <jh@suse.cz>
420
421 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
422 TYPE_DECL.
423
424 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
425
426 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
427 prototype.
428 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
429 Combine with rs6000_address_for_fpconvert.
430 (rs6000_address_for_fpconvert): Combine with
431 rs6000_force_indexed_or_indirect_mem.
432 (rs6000_expand_vector_init): Change function call from
433 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
434 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
435 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
436 (floatsi<mode>2_lfiwax_mem): Ditto.
437 (floatunssi<mode>2_lfiwzx): Ditto.
438 (floatunssi<mode>2_lfiwzx_mem): Ditto.
439 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
440 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
441 (fix_trunc<mode>si2_stfiwx): Ditto.
442 (fixuns_trunc<mode>si2_stfiwx): Ditto.
443 (float_<mode>si2_hw): Ditto.
444 (floatuns_<mode>si2_hw): Ditto.
445 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
446 (vsx_splat_<mode>): Ditto.
447
448 2018-11-01 Joseph Myers <joseph@codesourcery.com>
449
450 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
451 at end of assembler input text.
452 * configure: Regenerate.
453
454 2018-11-01 Jakub Jelinek <jakub@redhat.com>
455
456 PR tree-optimization/87826
457 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
458 negative or larger or equal to type's precision.
459
460 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
461
462 * opts.c (default_options_table): Do not enable
463 OPT_fdelayed_branch at -Og.
464 * doc/invoke.texi (-fdelayed-branch): Document it.
465
466 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
467
468 * optabs-libfuncs.c (build_libfunc_function_visibility):
469 New, split out from...
470 (build_libfunc_function): ... here.
471 (init_one_libfunc_visibility): New, split out from ...
472 (init_one_libfunc): ... here.
473
474 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
475 scratch register need not be early-clobber. Document the reason
476 why we cannot use ST<OP>.
477
478 2018-10-31 Joseph Myers <joseph@codesourcery.com>
479
480 PR bootstrap/82856
481 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
482 line for second argument of AC_DEFINE_UNQUOTED.
483 * doc/install.texi (Tools/packages necessary for modifying GCC):
484 Update to autoconf 2.69 and automake 1.15.1.
485 * aclocal.m4, config.in, configure: Regenerate.
486
487 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
488
489 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
490 initialization.
491
492 2018-10-31 Martin Liska <mliska@suse.cz>
493
494 PR driver/83193
495 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
496 Add new argument invalid_extension.
497 (aarch64_get_all_extension_candidates): New function.
498 (aarch64_rewrite_selected_cpu): Add NULL to function call.
499 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
500 new argument.
501 (aarch64_get_all_extension_candidates): New function.
502 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
503 argument invalid_extension.
504 (aarch64_parse_cpu): Likewise.
505 (aarch64_print_hint_for_extensions): New function.
506 (aarch64_validate_mcpu): Provide hint about invalid extension.
507 (aarch64_validate_march): Likewise.
508 (aarch64_handle_attr_arch): Pass new argument.
509 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
510 (aarch64_handle_attr_isa_flags): Likewise.
511
512 2018-10-31 Richard Biener <rguenther@suse.de>
513
514 PR middle-end/70359
515 PR middle-end/86270
516 * tree-outof-ssa.c (insert_backedge_copies): Restrict
517 copy generation to useful cases. Place the copy before
518 the definition of the backedge value when possible.
519
520 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
521
522 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
523 * config/arc/arc.c (arc_active_insn): New function.
524 (check_store_cacheline_hazard): Likewise.
525 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
526 (arc_override_options): Disable delay slot scheduler for older
527 A7.
528 (arc_store_addr_hazard_p): New implementation, old one renamed to
529 ...
530 (arc_store_addr_hazard_internal_p): Renamed.
531 (arc_reorg): Don't combine into brcc instructions which are part
532 of hardware hazard solution.
533 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
534 (tune_arc700): Likewise.
535 * config/arc/arc.opt (arc7xx): New tune value.
536 * config/arc/arc700.md: Improve A7 scheduler.
537
538 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
539
540 * config/arc/arc.c (arc_override_options): Remove
541 TARGET_COMPACT_CASESI.
542 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
543 (CASE_VECTOR_MODE): Likewise.
544 (CASE_VECTOR_PC_RELATIVE): Likewise.
545 (CASE_VECTOR_SHORTEN_MODE): Likewise.
546 (CASE_VECTOR_SHORTEN_MODE1): Delete.
547 (ADDR_VEC_ALIGN): Update.
548 (ASM_OUTPUT_CASE_LABEL): Undefine.
549 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
550 (TARGET_BI_BIH): Define.
551 (DEFAULT_BRANCH_INDEX): Likewise.
552 * config/arc/arc.md (casesi): Rework to accept BI/BIH
553 instructions, remove compact_casesi use case.
554 (casesi_compact_jump): Remove.
555 (casesi_dispatch): New pattern.
556 * config/arc/arc.opt: Add mbranch-index option. Deprecate
557 compact_casesi option.
558 * doc/invoke.texi: Document mbranch-index option.
559
560 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
561
562 * config/arc/arc.c (arc_get_tp): Remove function.
563 (arc_emit_call_tls_get_addr): Likewise.
564 (arc_call_tls_get_addr): New function.
565 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
566 * config/arc/arc.md (tls_load_tp_soft): Remove.
567 (tls_gd_get_addr): Likewise.
568
569 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
570
571 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
572 (mulsi3_600_lib): Remove pattern.
573 (umulsi3_highpart_600_lib_le): Likewise.
574 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
575 (umulsidi3): Remove call to umulsidi3_600_lib.
576 (umulsidi3_600_lib): Remove pattern.
577 (peephole2): Remove peephole using the above deprecated patterns.
578
579 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
580
581 PR target/87374
582 * config/arm/arm.c (arm_option_check_internal): Disable the combined
583 use of -mslow-flash-data and -mword-relocations.
584 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
585 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
586 flag_pic.
587 * doc/invoke.texi (-mword-relocations): Mention conflict with
588 -mslow-flash-data.
589 (-mslow-flash-data): Reciprocally.
590
591 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
592
593 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
594 16-byte modes held in GP registers to use an even regno.
595
596 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
597 (aarch64_atomic_ldop_supported_p): Remove.
598 (aarch64_gen_atomic_ldop): Remove.
599 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
600 Fully expand LSE operations here.
601 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
602 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
603 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
604 and use ATOMIC_LDOP instead; use register_operand for the input;
605 drop the split and emit insns directly.
606 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
607 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
608 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
609
610 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
611 (aarch64_gen_atomic_ldop): Don't call it.
612 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
613 Use aarch64_reg_or_zero.
614 (aarch64_atomic_exchange<ALLI>): Likewise.
615 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
616 operand 0; use aarch64_reg_or_zero for input; merge ...
617 (@aarch64_atomic_swp<ALLI>): ... this and remove.
618
619 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
620 (aarch64_split_compare_and_swap): Use it.
621 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
622 test oldval against the proper predicate.
623 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
624 Use nonmemory_operand for expected.
625 (cas_short_expected_pred): New.
626 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
627 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
628 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
629 (aarch64_plushi_operand): New.
630
631 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
632 Force oldval into the rval register for TARGET_LSE; emit the compare
633 during initial expansion so that it may be deleted if unused.
634 (aarch64_gen_atomic_cas): Remove.
635 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
636 Change =&r to +r for operand 0; use match_dup for operand 2;
637 remove is_weak and mod_f operands as unused. Drop the split
638 and merge with...
639 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
640 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
641 (@aarch64_atomic_cas<GPI>): Similarly.
642
643 2018-10-31 Richard Biener <rguenther@suse.de>
644
645 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
646 using ABSU_EXPR.
647
648 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
649
650 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
651 * config/aarch64/aarch64.md: Include saphira.md
652 * config/aarch64/saphira.md: New file for pipeline description.
653
654 2018-10-30 Martin Sebor <msebor@redhat.com>
655
656 PR middle-end/87041
657 * gimple-ssa-sprintf.c (format_directive): Use %G to include
658 inlining context.
659 (sprintf_dom_walker::compute_format_length):
660 Avoid setting POSUNDER4K here.
661 (get_destination_size): Handle null argument values.
662 (get_user_idx_format): New function.
663 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
664 functions, including user-defined with attribute format printf.
665 Use %G to include inlining context.
666 Set POSUNDER4K here.
667
668 2018-10-30 Jan Hubicka <jh@suse.cz>
669
670 * params.def (lto-partitions): Bump from 32 to 128.
671
672 2018-10-30 Jan Hubicka <jh@suse.cz>
673
674 * tree.c
675 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
676 head in file.
677 (free_lang_data_in_type): Forward declare.
678 (fld_type_variant_equal_p): New function.
679 (fld_type_variant): New function
680 (fld_incomplete_types): New hash.
681 (fld_incomplete_type_of): New function
682 (fld_simplfied-type): New function.
683 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
684 (free_lang_data): Allocate and free fld_incomplete_type; update call
685 of free_lang_data_in_decl.
686
687 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
688
689 * gcov.c (output_lines): Remove duplicate line.
690
691 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
692
693 * config/rs6000/rs6000.md (bswapdi2): Force address into register
694 if not in indexed or indirect form.
695 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
696 (bswapdi2_store): Ditto.
697 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
698 helper function.
699 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
700 Prototype for helper function.
701
702 2018-10-30 Martin Sebor <msebor@redhat.com>
703
704 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
705 (target, pragma GCC optimize, pragma GCC target): Ditto.
706
707 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
708
709 * doc/extend.texi: Fix prototype and description of
710 __builtin_expect_with_probability.
711
712 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
713
714 * cgraph.h (clone_function_name_1): Replaced by new
715 clone_function_name_numbered that takes name as string; for
716 privatize_symbol_name_1 use only.
717 (clone_function_name): Renamed to
718 clone_function_name_numbered to be explicit about numbering.
719 (clone_function_name): New two-argument function that does
720 not number its output.
721 (clone_function_name): New three-argument function that
722 takes a number to append to its output.
723 * cgraphclones.c (duplicate_thunk_for_node):
724 (clone_function_name_1): Renamed.
725 (clone_function_name_numbered): Two new functions.
726 (clone_function_name): Improved documentation.
727 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
728 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
729 * final.c (final_scan_insn_1): Use the new clone_function_name
730 without numbering.
731 * multiple_target.c (create_dispatcher_calls): Ditto.
732 (create_target_clone): Ditto.
733 * omp-expand.c (grid_expand_target_grid_body): Ditto.
734 * omp-low.c (create_omp_child_function_name): Ditto.
735 * omp-simd-clone.c (simd_clone_create): Ditto.
736 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
737 new clone_function_name without numbering.
738
739 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
740
741 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
742 Assert that the allocation size is not zero.
743
744 2018-10-30 Richard Biener <rguenther@suse.de>
745
746 PR tree-optimization/87800
747 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
748 non-induction or reduction PHIs.
749
750 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
751
752 * config/aarch64/falkor-tag-collision-avoidance.c
753 (execute_tag_collision_avoidance): Call df_note_add_problem.
754
755 2018-10-30 Martin Liska <mliska@suse.cz>
756
757 * doc/extend.texi: Fix typo in documentation
758 of __builtin_expect_with_probability.
759
760 2018-10-29 David Malcolm <dmalcolm@redhat.com>
761
762 PR c++/87721
763 * input.c (get_substring_ranges_for_loc): Detect if
764 linemap_resolve_location gives us a NULL map, and reject
765 this case.
766
767 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
768
769 * config.gcc (xstormy16-*-elf): Set tm_d_file.
770
771 2018-10-29 David Malcolm <dmalcolm@redhat.com>
772 Martin Sebor <msebor@redhat.com>
773 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
774
775 * doc/ux.texi (Quoting): New subsection, adapted from material at
776 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
777 MartinSebor and ManuelLopezIbanez.
778 (Fix-it hints): Note that fix-it hints shouldn't be marked for
779 translation.
780
781 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
782
783 PR middle-end/87469
784 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
785 max value.
786
787 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
788
789 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
790
791 2018-10-29 Paul Koning <ni1d@arrl.net>
792
793 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
794
795 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
796
797 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
798 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
799 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
800 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
801 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
802 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
803 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
804 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
805 Change 'vector' to '__vector'.
806 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
807 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
808 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
809 _mm_avg_pu16): Likewise. And, whitespace corrections.
810
811 2018-10-29 Richard Biener <rguenther@suse.de>
812
813 PR tree-optimization/87785
814 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
815 internal defs.
816
817 2018-10-29 Olivier Hainque <hainque@adacore.com>
818
819 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
820
821 2018-10-29 Olivier Hainque <hainque@adacore.com>
822
823 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
824 ports configuration macro, defaults to "gnu".
825 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
826 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
827
828 2018-10-29 Olivier Hainque <hainque@adacore.com>
829
830 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
831
832 2018-10-29 Richard Biener <rguenther@suse.de>
833
834 PR tree-optimization/87790
835 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
836 (vect_make_slp_decision): Adjust.
837 (vect_slp_analyze_bb_1): Likewise.
838 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
839 edges.
840
841 2018-10-29 Richard Biener <rguenther@suse.de>
842
843 PR tree-optimization/87785
844 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
845 and processing.
846 (vect_build_slp_tree): Likewise.
847 (vect_gather_slp_loads): New function.
848 (vect_analyze_slp_instance): Gather loads separately from the
849 SLP tree build.
850
851 2018-10-29 Martin Liska <mliska@suse.cz>
852
853 * Makefile.in: Make dependency to json.o.
854 * doc/gcov.texi: Document new JSON format, remove
855 old intermediate format documentation.
856 * gcov.c (struct function_info): Come up with m_name and
857 m_demangled_name.
858 (function_info::function_info): Initialize it.
859 (function_info::~function_info): Release it.
860 (main): Rename flag_intermediate_format to flag_json_format.
861 (print_usage): Describe --json-format.
862 (process_args): Set flag_json_format.
863 (output_intermediate_line): Remove.
864 (output_intermediate_json_line): Likewise.
865 (get_gcov_intermediate_filename): Return new extension
866 ".gcov.json.gz".
867 (output_intermediate_file): Implement JSON emission.
868 (output_json_intermediate_file): Implement JSON emission.
869 (generate_results): Use ::get_name for function name.
870 Handle JSON output file.
871 (read_graph_file): Use ::get_name instead of cplus_demangle.
872 (read_count_file): Likewise.
873 (solve_flow_graph): Likewise.
874 (add_line_counts): Likewise.
875 (accumulate_line_counts): Use new flag_json_format.
876 (output_function_details): Use ::get_name instead of cplus_demangle.
877 (output_lines): Likewise.
878 * json.cc (test_writing_literals): Add new tests.
879 * json.h (class literal): Add new boolean constructor.
880
881 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
882
883 PR rtl-optimization/87701
884 PR rtl-optimization/87780
885 * combine.c (make_more_copies): Rewrite.
886
887 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
888
889 * doc/generic.texi (ABSU_EXPR): Document.
890 * match.pd (absu(x)*absu(x) -> x*x): Handle.
891 (absu(absu(X)) -> absu(X)): Likewise.
892 (absu(-X) -> absu(X)): Likewise.
893 (absu(X) where X is nonnegative -> X): Likewise.
894
895 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
896
897 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
898 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
899 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
900 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
901 (s-tm-texi): Also check timestamp on d-target.def.
902 (generated_files): Add TM_D_H and d-target-hooks-def.h.
903 (build/genhooks.o): Also depend on D_TARGET_DEF.
904 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
905 variables.
906 * config/aarch64/aarch64-d.c: New file.
907 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
908 Define.
909 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
910 prototype.
911 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
912 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
913 * config/arm/arm-d.c: New file.
914 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
915 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
916 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
917 * config/arm/t-arm (arm-d.o): New rule.
918 * config/default-d.c: New file.
919 * config/glibc-d.c: New file.
920 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
921 * config/i386/i386-d.c: New file.
922 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
923 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
924 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
925 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
926 * config/i386/t-i386 (i386-d.o): New rule.
927 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
928 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
929 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
930 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
931 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
932 * config/mips/mips-d.c: New file.
933 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
934 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
935 * config/mips/t-mips (mips-d.o): New rule.
936 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
937 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
938 * config/powerpcspe/powerpcspe-d.c: New file.
939 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
940 New prototype.
941 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
942 Support GNU D by using 0 as the language type.
943 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
944 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
945 * config/riscv/riscv-d.c: New file.
946 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
947 prototype.
948 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
949 * config/riscv/t-riscv (riscv-d.o): New rule.
950 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
951 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
952 * config/rs6000/rs6000-d.c: New file.
953 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
954 prototype.
955 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
956 Support GNU D by using 0 as the language type.
957 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
958 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
959 * config/s390/s390-d.c: New file.
960 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
961 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
962 * config/s390/t-s390 (s390-d.o): New rule.
963 * config/sparc/sparc-d.c: New file.
964 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
965 prototype.
966 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
967 * config/sparc/t-sparc (sparc-d.o): New rule.
968 * config/t-glibc (glibc-d.o): New rule.
969 * configure: Regenerated.
970 * configure.ac (tm_d_file): New variable.
971 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
972 * doc/contrib.texi (Contributors): Add self for the D frontend.
973 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
974 * doc/install.texi (Configuration): Mention libphobos as an option for
975 --enable-shared. Mention d as an option for --enable-languages.
976 (Testing): Mention check-d as a target.
977 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
978 name suffixes. Mention d as a -x option.
979 * doc/sourcebuild.texi (Top Level): Mention libphobos.
980 * doc/standards.texi (Standards): Add section on D language.
981 * doc/tm.texi: Regenerated.
982 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
983 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
984 * dwarf2out.c (is_dlang): New function.
985 (gen_compile_unit_die): Use DW_LANG_D for D.
986 (declare_in_namespace): Return module die for D, instead of adding
987 extra declarations into the namespace.
988 (gen_namespace_die): Generate DW_TAG_module for D.
989 (gen_decl_die): Handle CONST_DECLSs for D.
990 (dwarf2out_decl): Likewise.
991 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
992 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
993 kinds of aggregates.
994 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
995 * genhooks.c: Include d/d-target.def.
996
997 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
998
999 PR target/85669
1000 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
1001 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
1002 (STACK_DYNAMIC_OFFSET): Likewise.
1003
1004 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
1005
1006 PR target/80024
1007 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
1008 error message.
1009
1010 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1011
1012 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
1013 return type and other typos.
1014
1015 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1016
1017 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
1018 a shorter sequence with fewer branches.
1019 (emit_final_str_compare_gpr): Ditto.
1020
1021 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1022
1023 * config/rs6000/tmmintrin.h: New file.
1024 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
1025
1026 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1027
1028 * config/rs6000/mmintrin.h: Enable 32bit compilation.
1029 * config/rs6000/xmmintrin.h: Likewise.
1030
1031 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1032
1033 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
1034
1035 2018-10-26 Richard Biener <rguenther@suse.de>
1036
1037 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
1038 and wrapper.
1039 (vect_mark_slp_stmts_relevant): Likewise.
1040 (vect_detect_hybrid_slp_stmts): Likewise.
1041 (vect_bb_slp_scalar_cost): Likewise.
1042 (vect_remove_slp_scalar_calls): Likewise.
1043
1044 2018-10-26 Jan Hubicka <jh@suse.cz>
1045
1046 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
1047 (warn_types_mismatch): Fix walk of DECL_NAME.
1048 (odr_types_equivalent_p): Fix overactive assert.
1049
1050 2018-10-26 Richard Biener <rguenther@suse.de>
1051
1052 PR tree-optimization/87105
1053 * tree-vectorizer.h (_slp_tree::refcnt): New member.
1054 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
1055 refcnt.
1056 (vect_create_new_slp_node): Initialize refcnt to one.
1057 (bst_traits): Move.
1058 (scalar_stmts_set_t, bst_fail): Remove.
1059 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
1060 (vect_build_slp_tree): Add bst_map argument and lookup
1061 already created SLP nodes.
1062 (vect_print_slp_tree): Handle a SLP graph, print SLP node
1063 addresses.
1064 (vect_slp_rearrange_stmts): Handle a SLP graph.
1065 (vect_analyze_slp_instance): Adjust and free SLP nodes from
1066 the CSE map. Fix indenting.
1067 (vect_schedule_slp_instance): Add short-cut.
1068
1069 2018-10-26 Martin Liska <mliska@suse.cz>
1070
1071 PR testsuite/86158
1072 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
1073 addr_expr and not with pointers.
1074
1075 2018-10-26 Jan Hubicka <jh@suse.cz>
1076
1077 * tree.c (free_lang_data_in_type): Only check main variants.
1078 * ipa-devirt.c (warn_odr): Make static.
1079 (types_same_for_odr): Drop strict variant.
1080 (types_odr_comparable): Likewise.
1081 (odr_or_derived_type_p): Look for main variants.
1082 (odr_name_hasher::equal): Cleanup comment.
1083 (odr_subtypes_equivalent): Add warn and warned arguments; check main
1084 variants.
1085 (type_variants_equivalent_p): break out from ...
1086 (odr_types_equivalent): ... here; go for main variants where needed.
1087 (warn_odr): ... here; turn static.
1088 (warn_types_mismatch): Compare mangled names of main variants.
1089 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
1090 (type_with_linkage_p): Sanity check that we look at main variant.
1091 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
1092 * tree.h (types_same_for_odr): Drop strict argument.
1093
1094 2018-10-26 Richard Biener <rguenther@suse.de>
1095
1096 PR tree-optimization/87746
1097 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
1098 Simplify and fix WRT strided store groups with size not
1099 equal to step in element count.
1100 (vect_analyze_group_access_1): Dump the whole group.
1101
1102 2018-10-25 Carl Love <cel@us.ibm.com>
1103
1104 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
1105 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
1106 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
1107 precicion entry for each overloaded builtin.
1108 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
1109 VSCEDPUO): Rename overloaded name.
1110 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
1111 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
1112 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
1113 define_expand for xscmpexqp instruction.
1114 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
1115
1116 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1117 Jinsong Ji <jji@us.ibm.com>
1118
1119 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
1120 function with vec_sl.
1121 (_mm_slli_epi32): Likewise.
1122 (_mm_slli_epi64): Likewise.
1123 (_mm_srai_epi16): Replace deprecated function with vec_sra.
1124 (_mm_srai_epi32): Likewise.
1125 (_mm_srli_epi16): Replace deprecated function with vec_sr.
1126 (_mm_srli_epi32): Likewise.
1127 (_mm_srli_epi64): Likewise.
1128 (_mm_sll_epi16): Replace deprecated function with vec_sl.
1129 (_mm_sll_epi32): Likewise.
1130 (_mm_sll_epi64): Likewise.
1131 (_mm_sra_epi16): Replace deprecated function with vec_sra.
1132 (_mm_sra_epi32): Likewise.
1133 (_mm_srl_epi16): Replace deprecated function with vec_sr.
1134 (_mm_srl_epi32): Likewise.
1135 (_mm_srl_epi64): Likewise.
1136
1137 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1138 Jinsong Ji <jji@us.ibm.com>
1139
1140 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
1141 comparison operators with vec_cmp* for compatibility due to
1142 unfortunate history; clean up formatting and use types more
1143 appropriately.
1144 (_mm_sll_epi32): Likewise.
1145 (_mm_sll_epi64): Likewise.
1146 (_mm_srl_epi16): Likewise.
1147 (_mm_srl_epi32): Likewise.
1148 (_mm_srl_epi64): Likewise.
1149
1150 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1151 Jinsong Ji <jji@us.ibm.com>
1152
1153 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
1154 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
1155 __vector __bool int. Use vec_cmpgt in preference to deprecated
1156 function vec_vcmpgtfp.
1157 (_mm_max_ps): Likewise.
1158
1159 2018-10-25 Jeff Law <law@redhat.com>
1160
1161 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
1162 if returning false.
1163
1164 2018-10-25 Martin Sebor <msebor@redhat.com>
1165
1166 * doc/extend.texi (aligned): Expand attribute description.
1167 (Alignment): Rename section. Discuss function arguments.
1168
1169 2018-10-25 Jan Hubicka <jh@suse.cz>
1170
1171 * ipa-devirt.c (main_odr_variant): Remove.
1172 (hash_odr_name, types_same_for_odr, types_odr_comparable,
1173 odr_name_hasher::equal, odr_subtypes_equivalent_p):
1174 Drop use of main_odr_variant.
1175 (add_type_duplicate): Silence confused warnings on integer types.
1176 (get_odr_type): Always look for main variant.
1177 (register_odr_type): Simplify.
1178
1179 2018-10-25 Richard Biener <rguenther@suse.de>
1180
1181 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
1182 Initialize ng to silence error with release checking bootstrap.
1183
1184 2018-10-25 Richard Biener <rguenther@suse.de>
1185
1186 * tree-if-conv.c: Include tree-ssa-sccvn.h.
1187 (tree_if_conversion): Run CSE on the if-converted loop body.
1188
1189 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1190
1191 * config/s390/constraints.md (ZL): New constraint.
1192 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
1193 operands.
1194 * config/s390/s390.md (movdi_larl): Remove.
1195 (movdi_64): Add the LARL alternative.
1196
1197 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1198
1199 PR bootstrap/87747
1200 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
1201 (RTX_CODE_HWINT_P): New macro.
1202 (rtx_code_size): Use RTX_CODE_HWINT_P ().
1203
1204 2018-10-25 Jan Hubicka <jh@suse.cz>
1205
1206 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
1207 is anonymous.
1208
1209 2018-10-25 Richard Biener <rguenther@suse.de>
1210
1211 PR tree-optimization/87665
1212 PR tree-optimization/87745
1213 * tree-vectorizer.h (get_earlier_stmt): Remove.
1214 (get_later_stmt): Pick up UID from the original non-pattern stmt.
1215
1216 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
1217
1218 * options.texi (Deprecated): Move list to Var section.
1219
1220 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
1221 Jinsong Ji <jji@us.ibm.com>
1222
1223 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
1224 __vector long to __vector long long.
1225 (_mm_cvtpd_ps): Likewise.
1226 (_mm_cvttpd_epi32): Likewise.
1227 (_mm_cvtpi32_pd): Likewise.
1228 (_mm_unpackhi_epi64): Likewise.
1229 (_mm_unpacklo_epi64): Likewise.
1230
1231 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
1232
1233 PR rtl-optimization/87720
1234 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
1235
1236 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
1237
1238 * gimple-ssa-isolate-paths.c
1239 (find_implicit_erroneous_behavior): Do not change code if the
1240 pass is running for warnings only.
1241 (find_explicit_erroneous_behavior): Likewise.
1242
1243 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
1244
1245 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1246 Define as rs6000_mangle_decl_assembler_name.
1247 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1248 long double to IEEE long double, switch the names of the long
1249 double built-in functions to be <func>f128 instead of <func>l.
1250
1251 2018-10-24 Martin Sebor <msebor@redhat.com>
1252
1253 * doc/extend.texi (nonnull): List no-argument form. Reference
1254 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1255
1256 2018-10-24 Richard Biener <rguenther@suse.de>
1257
1258 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1259
1260 2018-10-24 Martin Liska <mliska@suse.cz>
1261
1262 PR tree-optimization/84436
1263 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1264 Remove.
1265 (switch_conversion::contains_linear_function_p): New.
1266 (switch_conversion::build_one_array): Support linear
1267 transformation on input.
1268 * tree-switch-conversion.h (struct switch_conversion): Add
1269 contains_linear_function_p declaration.
1270
1271 2018-10-24 Richard Biener <rguenther@suse.de>
1272
1273 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1274 if its argument is CONSTANT_CLASS_P.
1275
1276 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1277
1278 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1279 it is wrong for forward declarations.
1280
1281 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
1282
1283 * config/s390/s390.c (s390_check_qrst_address): Add the missing
1284 SYMBOL_REF_P () check.
1285
1286 2018-10-24 Richard Biener <rguenther@suse.de>
1287
1288 PR tree-optimization/87105
1289 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1290 dump classification.
1291 (vect_analyze_data_ref_accesses): Handle duplicate loads and
1292 stores by splitting the affected group after the fact.
1293 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1294 fail the SLP build because of size constraints.
1295
1296 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1297
1298 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1299 * configure: Regenerate.
1300 * config.in: Regenerate.
1301 * varasm.c (mergeable_string_section): Use readonly_data_section
1302 if linker doesn't support SHF_MERGE with alignment > 8.
1303 (mergeable_constant_section): Likewise.
1304
1305 2018-10-24 Richard Biener <rguenther@suse.de>
1306
1307 PR tree-optimization/84013
1308 * tree-ssa-structalias.c (struct msdi_data): New struct for
1309 marshalling data to walk_stmt_load_store_ops.
1310 (maybe_set_dependence_info): Refactor as callback for
1311 walk_stmt_load_store_ops.
1312 (compute_dependence_clique): Set restrict info on all stmt kinds.
1313
1314 2018-10-24 Martin Liska <mliska@suse.cz>
1315
1316 * cgraph.c (cgraph_node::dump):
1317 Remove reduntant dumps and make tp_first_run dump more compact.
1318
1319 2018-10-24 Richard Biener <rguenther@suse.de>
1320
1321 PR tree-optimization/87665
1322 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1323 to reflect reality.
1324
1325 2018-10-12 Jeff Law <law@redhat.com>
1326
1327 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1328 for H8/S.
1329
1330 2018-10-23 Richard Biener <rguenther@suse.de>
1331
1332 * tree-vrp.c (add_assert_info): Guard dump_printf with
1333 dump_enabled_p.
1334 * gimple-ssa-evrp-analyze.c
1335 (evrp_range_analyzer::record_ranges_from_incoming_edge):
1336 Use value_range::ignore_equivs_equal_p.
1337
1338 2018-10-23 Richard Biener <rguenther@suse.de>
1339
1340 PR tree-optimization/87105
1341 PR tree-optimization/87608
1342 * passes.def (pass_all_early_optimizations): Add early phi-opt
1343 after dce.
1344 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1345 addition to debug stmts.
1346 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1347 and abs replacement early.
1348 * tree-cfg.c (gimple_empty_block_p): Likewise.
1349
1350 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
1351
1352 PR target/86383
1353 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1354 specified to configure.
1355 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1356
1357 2018-10-23 Richard Biener <rguenther@suse.de>
1358
1359 PR tree-optimization/87700
1360 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1361
1362 2018-10-23 Jakub Jelinek <jakub@redhat.com>
1363
1364 PR target/87674
1365 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1366 second argument from __mmask16 to __mmask8.
1367 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1368 _mm_mask_packs_epi32): Likewise.
1369 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1370 Likewise.
1371 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
1372
1373 2018-10-23 Richard Biener <rguenther@suse.de>
1374
1375 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1376
1377 2018-10-23 Richard Biener <rguenther@suse.de>
1378
1379 PR tree-optimization/86144
1380 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1381 over simd attribute.
1382
1383 2018-10-23 Richard Biener <rguenther@suse.de>
1384
1385 PR tree-optimization/87693
1386 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1387 the case we do not find the taken edge.
1388
1389 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
1390 Jinsong Ji <jji@us.ibm.com>
1391
1392 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1393 (_mm_store_pd): Use unaligned vector type for pointer cast.
1394 (_mm_maskmoveu_si128): Likewise.
1395 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1396 (_mm_store_ps): Use unaligned vector type for pointer cast.
1397
1398 2018-10-22 Paul Koning <ni1d@arrl.net>
1399
1400 * symtab.c (symtab_node::increase_alignment): Correct max
1401 alignment check.
1402
1403 2018-10-22 Yury Gribov <tetra2005@gmail.com>
1404
1405 PR tree-optimization/87633
1406 * match.pd: Do not generate unordered integer comparisons.
1407
1408 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1409
1410 PR rtl-optimization/87600
1411 * combine.c: Add include of expr.h.
1412 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1413 register to a pseudo.
1414 (make_more_copies): New function, add a copy to a new pseudo after
1415 the moves from hard registers into pseudos.
1416 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1417 later. Call make_more_copies.
1418
1419 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
1420
1421 * lra-constraints.c (process_alt_operands): New local array,
1422 matching_early_clobber. Check matching_early_clobber before
1423 decrementing reject, and set matching_early_clobber after.
1424
1425 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1426
1427 PR target/87598
1428 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1429 call output_addr_const and hope for the best.
1430
1431 2018-10-22 Richard Biener <rguenther@suse.de>
1432
1433 * gimple-ssa-evrp-analyze.c
1434 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1435 smarter about what ranges to use.
1436 * tree-vrp.c (add_assert_info): Dump here.
1437 (register_edge_assert_for_2): Instead of here at multiple but
1438 not all places.
1439
1440 * gcc.dg/tree-ssa/evrp12.c: New testcase.
1441 * gcc.dg/predict-6.c: Adjust.
1442 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1443 * gcc.dg/tree-ssa/vrp02.c: Likewise.
1444 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1445
1446 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
1447 Richard Biener <rguenther@suse.de>
1448
1449 * bitmap.h: Update data structure documentation, including a
1450 description of bitmap views as either linked-lists or splay trees.
1451 (struct bitmap_element_def): Update comments for splay tree bitmaps.
1452 (struct bitmap_head_def): Likewise.
1453 (bitmap_list_view, bitmap_tree_view): New prototypes.
1454 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1455 tree_form fields.
1456 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1457 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1458 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1459 released bitmap element here.
1460 (bitmap_element_free): Remove.
1461 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1462 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1463 this function similar ones such that linked-list bitmap implementation
1464 functions are grouped.
1465 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1466 and moved for grouping.
1467 (bitmap_list_insert_element_after): Renamed from
1468 bitmap_elt_insert_after, and moved for grouping.
1469 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1470 (bitmap_tree_link_left, bitmap_tree_link_right,
1471 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1472 bitmap_tree_link_element, bitmap_tree_unlink_element,
1473 bitmap_tree_find_element): New functions for splay-tree bitmap
1474 implementation.
1475 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1476 Renamed and moved, see above entries.
1477 (bitmap_tree_listify_from): New function to convert part of a splay
1478 tree bitmap to a linked-list bitmap.
1479 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1480 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1481 (bitmap_find_bit): Remove.
1482 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1483 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1484 Handle splay tree bitmaps.
1485 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1486 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1487 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1488 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1489 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1490 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1491 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1492 corresponding changes to use linked-list specific bitmap_element
1493 manipulation functions as applicable for efficiency.
1494 (bitmap_tree_to_vec): New function.
1495 (debug_bitmap_elt_file): New function split out from ...
1496 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1497 (bitmap_print): Likewise.
1498
1499 PR tree-optimization/63155
1500 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1501 SSA edge worklists.
1502 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1503 in tree-view.
1504
1505 2018-10-22 Martin Liska <mliska@suse.cz>
1506
1507 PR tree-optimization/87686
1508 Revert
1509 2018-08-29 Martin Liska <mliska@suse.cz>
1510
1511 * tree-switch-conversion.c (switch_conversion::expand):
1512 Strenghten assumption about gswitch statements.
1513
1514 2018-10-22 Martin Liska <mliska@suse.cz>
1515
1516 * ipa-icf.c (sem_item::compare_attributes): Remove.
1517 (sem_item::compare_referenced_symbol_properties): Use
1518 attribute_list_equal instead.
1519 (sem_function::equals_wpa): Likewise.
1520 * ipa-icf.h: Remove compare_attributes.
1521
1522 2018-10-22 Richard Biener <rguenther@suse.de>
1523
1524 PR middle-end/87682
1525 * mem-stats.h (mem_usage::operator==): Fix pasto.
1526
1527 2018-10-22 Richard Biener <rguenther@suse.de>
1528
1529 PR tree-optimization/87640
1530 * tree-vrp.c (set_value_range_with_overflow): Decompose
1531 incomplete result.
1532 (extract_range_from_binary_expr_1): Adjust.
1533
1534 2018-10-22 Martin Jambor <mjambor@suse.cz>
1535
1536 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1537 (stmt_can_throw_external): Likewise.
1538 (stmt_can_throw_internal): Likewise.
1539 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1540 (lower_eh_constructs_2): Likewise.
1541 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1542 (stmt_can_throw_external): Likewise.
1543 (stmt_can_throw_internal): Likewise.
1544 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1545 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1546 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1547 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1548 (pass_lower_eh_dispatch::execute): Pass cfun to
1549 stmt_can_throw_external.
1550 (cleanup_empty_eh): Likewise.
1551 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1552 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1553 stmt_can_throw_external instead of pushing it to cfun.
1554 (symbol_table::create_edge): Likewise.
1555 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1556 stmt_can_throw_internal.
1557 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1558 to stmt_could_throw_p.
1559 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1560 stmt_can_throw_internal.
1561 (pass_store_merging::execute): Likewise.
1562 * gimple-ssa-strength-reduction.c
1563 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1564 stmt_could_throw_p.
1565 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1566 stmt_can_throw_internal.
1567 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1568 to stmt_can_throw_external.
1569 (check_stmt): Pass cfun to stmt_could_throw_p.
1570 (check_stmt): Pass cfun to stmt_can_throw_external.
1571 (pass_nothrow::execute): Likewise.
1572 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1573 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1574 stmt_can_throw_internal.
1575 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1576 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1577 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1578 * tree-complex.c (expand_complex_libcall): Pass cfun to
1579 stmt_could_throw_p and to stmt_can_throw_internal.
1580 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1581 * tree-inline.c (copy_edges_for_bb): Likewise.
1582 (maybe_move_debug_stmts_to_successors): Likewise.
1583 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1584 stmt_could_throw_p.
1585 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1586 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1587 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1588 stmt_can_throw_internal.
1589 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1590 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1591 stmt_could_throw_p.
1592 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1593 stmt_can_throw_internal.
1594 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1595 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1596 stmt_could_throw_p.
1597 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1598 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1599 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1600 (convert_mult_to_fma_1): Likewise.
1601 (convert_to_divmod): Likewise.
1602 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1603 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1604 * tree-ssa-propagate.c
1605 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1606 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1607 (maybe_optimize_range_tests): Likewise.
1608 (linearize_expr_tree): Likewise.
1609 (reassociate_bb): Likewise.
1610 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1611 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1612 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1613 (handle_char_store): Likewise.
1614 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1615 stmt_can_throw_internal.
1616 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1617 stmt_could_throw_p.
1618 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1619 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1620 (vectorizable_simd_clone_call): Likewise.
1621 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1622 (gimple_stringop_fixed_value): Likewise.
1623
1624 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1625
1626 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1627 literal pool references.
1628 (s390_check_qrst_address): Adapt to the new behavior of
1629 s390_loadrelative_operand_p ().
1630
1631 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1632
1633 PR target/72782
1634 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1635
1636 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1637
1638 PR target/72782
1639 * config/i386/sse.md (*<code><mode>3_bcst): New.
1640
1641 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1642
1643 PR target/72782
1644 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1645 V4DI, V16SI and V8DI.
1646 (*sub<mode>3<mask_name>_bcst): New.
1647 (*add<mode>3<mask_name>_bcst): Likewise.
1648
1649 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1650 Jinsong Ji <jji@us.ibm.com>
1651
1652 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1653 __m64 with __vector unsigned long long for compatibility.
1654 (_mm_movemask_epi8): Likewise.
1655 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1656 (_mm_cvttps_pi32): Likewise.
1657 (_mm_cvtpi32_ps): Likewise.
1658 (_mm_cvtps_pi16): Likewise.
1659 (_mm_loadh_pi): Likewise.
1660 (_mm_storeh_pi): Likewise.
1661 (_mm_movehl_ps): Likewise.
1662 (_mm_movelh_ps): Likewise.
1663 (_mm_loadl_pi): Likewise.
1664 (_mm_storel_pi): Likewise.
1665 (_mm_movemask_ps): Likewise.
1666 (_mm_shuffle_pi16): Likewise.
1667
1668 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1669
1670 PR target/72782
1671 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1672 __builtin_ia32_vfnmsubpd512_mask.
1673 (_mm512_mask_fnmsub_round_pd): Likewise.
1674 (_mm512_fnmsub_pd): Likewise.
1675 (_mm512_mask_fnmsub_pd): Likewise.
1676 (_mm512_maskz_fnmsub_round_pd): Use
1677 __builtin_ia32_vfnmsubpd512_maskz.
1678 (_mm512_maskz_fnmsub_pd): Likewise.
1679 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1680 (_mm512_mask_fnmsub_round_ps): Likewise.
1681 (_mm512_fnmsub_ps): Likewise.
1682 (_mm512_mask_fnmsub_ps): Likewise.
1683 (_mm512_maskz_fnmsub_round_ps): Use
1684 __builtin_ia32_vfnmsubps512_maskz.
1685 (_mm512_maskz_fnmsub_ps): Likewise.
1686 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1687 __builtin_ia32_vfnmsubpd256_mask.
1688 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1689 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1690 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1691 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1692 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1693 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1694 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1695 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1696 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1697 __builtin_ia32_vfnmsubpd.
1698 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1699 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1700 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1701 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1702 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1703 * config/i386/i386-builtin.def: Add
1704 __builtin_ia32_vfnmsubpd256_mask,
1705 __builtin_ia32_vfnmsubpd256_maskz,
1706 __builtin_ia32_vfnmsubpd128_mask,
1707 __builtin_ia32_vfnmsubpd128_maskz,
1708 __builtin_ia32_vfnmsubps256_mask,
1709 __builtin_ia32_vfnmsubps256_maskz,
1710 __builtin_ia32_vfnmsubps128_mask,
1711 __builtin_ia32_vfnmsubps128_maskz,
1712 __builtin_ia32_vfnmsubpd512_mask,
1713 __builtin_ia32_vfnmsubpd512_maskz,
1714 __builtin_ia32_vfnmsubps512_mask,
1715 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1716 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1717 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1718 __builtin_ia32_vfnmsubpd256.
1719 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1720 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1721 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1722 Likewise.
1723 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1724 Likewise.
1725 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1726 Likewise.
1727 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1728
1729 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1730
1731 PR target/72782
1732 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1733 __builtin_ia32_vfnmaddpd512_mask.
1734 (_mm512_mask_fnmadd_round_pd): Likewise.
1735 (_mm512_fnmadd_pd): Likewise.
1736 (_mm512_mask_fnmadd_pd): Likewise.
1737 (_mm512_maskz_fnmadd_round_pd): Use
1738 __builtin_ia32_vfnmaddpd512_maskz.
1739 (_mm512_maskz_fnmadd_pd): Likewise.
1740 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1741 (_mm512_mask_fnmadd_round_ps): Likewise.
1742 (_mm512_fnmadd_ps): Likewise.
1743 (_mm512_mask_fnmadd_ps): Likewise.
1744 (_mm512_maskz_fnmadd_round_ps): Use
1745 __builtin_ia32_vfnmaddps512_maskz.
1746 (_mm512_maskz_fnmadd_ps): Likewise.
1747 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1748 __builtin_ia32_vfnmaddpd256_mask.
1749 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1750 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1751 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1752 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1753 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1754 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1755 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1756 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1757 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1758 __builtin_ia32_vfnmaddpd.
1759 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1760 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1761 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1762 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1763 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1764 * config/i386/i386-builtin.def: Add
1765 __builtin_ia32_vfnmaddpd256_mask,
1766 __builtin_ia32_vfnmaddpd256_maskz,
1767 __builtin_ia32_vfnmaddpd128_mask,
1768 __builtin_ia32_vfnmaddpd128_maskz,
1769 __builtin_ia32_vfnmaddps256_mask,
1770 __builtin_ia32_vfnmaddps256_maskz,
1771 __builtin_ia32_vfnmaddps128_mask,
1772 __builtin_ia32_vfnmaddps128_maskz,
1773 __builtin_ia32_vfnmaddpd512_mask,
1774 __builtin_ia32_vfnmaddpd512_maskz,
1775 __builtin_ia32_vfnmaddps512_mask,
1776 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1777 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1778 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1779 __builtin_ia32_vfnmaddpd256.
1780 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1781 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1782 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1783 Likewise.
1784 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1785 Likewise.
1786 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1787 Likewise.
1788 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1789
1790 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1791
1792 PR target/72782
1793 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1794 __builtin_ia32_vfmsubpd512_mask.
1795 (_mm512_mask_fmsub_round_pd): Likewise.
1796 (_mm512_fmsub_pd): Likewise.
1797 (_mm512_mask_fmsub_pd): Likewise.
1798 (_mm512_maskz_fmsub_round_pd): Use
1799 __builtin_ia32_vfmsubpd512_maskz.
1800 (_mm512_maskz_fmsub_pd): Likewise.
1801 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1802 (_mm512_mask_fmsub_round_ps): Likewise.
1803 (_mm512_fmsub_ps): Likewise.
1804 (_mm512_mask_fmsub_ps): Likewise.
1805 (_mm512_maskz_fmsub_round_ps): Use
1806 __builtin_ia32_vfmsubps512_maskz.
1807 (_mm512_maskz_fmsub_ps): Likewise.
1808 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1809 __builtin_ia32_vfmsubpd256_mask.
1810 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1811 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1812 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1813 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1814 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1815 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1816 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1817 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1818 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1819 __builtin_ia32_vfmsubpd.
1820 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1821 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1822 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1823 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1824 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1825 * config/i386/i386-builtin.def: Add
1826 __builtin_ia32_vfmsubpd256_mask,
1827 __builtin_ia32_vfmsubpd256_maskz,
1828 __builtin_ia32_vfmsubpd128_mask,
1829 __builtin_ia32_vfmsubpd128_maskz,
1830 __builtin_ia32_vfmsubps256_mask,
1831 __builtin_ia32_vfmsubps256_maskz,
1832 __builtin_ia32_vfmsubps128_mask,
1833 __builtin_ia32_vfmsubps128_maskz,
1834 __builtin_ia32_vfmsubpd512_mask,
1835 __builtin_ia32_vfmsubpd512_maskz,
1836 __builtin_ia32_vfmsubps512_mask,
1837 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1838 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1839 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1840 __builtin_ia32_vfmsubpd256.
1841 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1842 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1843 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1844 Likewise.
1845 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1846 Likewise.
1847 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1848 Likewise.
1849 (fmai_vmfmsub_<mode><round_name>): Likewise.
1850
1851 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1852
1853 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1854 Remove plus. Renamed to ...
1855 (*sub<mode>3<mask_name>_bcst): This.
1856 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1857 (*add<mode>3<mask_name>_bcst): This.
1858
1859 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1860
1861 PR target/72782
1862 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1863
1864 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1865
1866 PR target/87662
1867 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1868 (_mm_or_epi32): Likewise.
1869 (_mm256_xor_epi32): Likewise.
1870 (_mm_xor_epi32): Likewise.
1871 (_mm256_or_epi64): Likewise.
1872 (_mm_or_epi64): Likewise.
1873 (_mm256_xor_epi64): Likewise.
1874 (_mm_xor_epi64): Likewise.
1875
1876 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1877
1878 PR target/72782
1879 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1880
1881 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1882
1883 PR middle-end/87647
1884 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1885
1886 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1887
1888 * doc/ux.texi: Move @section directly after @node.
1889
1890 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1891
1892 PR middle-end/85488
1893 PR middle-end/87649
1894 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1895 depend closely nested inside of loop with ordered clause with
1896 a parameter.
1897
1898 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1899
1900 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1901 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1902 * doc/ux.texi: New file.
1903
1904 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1905
1906 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1907 be the first CR field allocated.
1908
1909 2018-10-19 Richard Biener <rguenther@suse.de>
1910
1911 PR target/87657
1912 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1913 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1914
1915 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1916
1917 PR target/72782
1918 * config/i386/sse.md
1919 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1920 (*add<mode>3<mask_name>_bcst_2): Likewise.
1921
1922 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1923
1924 * config/i386/sse.md
1925 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1926 Replace nonimmediate_operand with register_operand.
1927 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1928 Likewise.
1929 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1930 Likewise.
1931
1932 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1933
1934 PR rtl-optimization/87596
1935 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1936 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1937 for instructions in FROM..TO range.
1938
1939 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1940
1941 * cfgexpand.c (expand_one_var): Use specific wording in error message
1942 for non-local frame variables.
1943 * stor-layout.c (layout_decl): Do not issue a warning for them.
1944
1945 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1946
1947 * haifa-sched.c (priority): Add force_recompute parameter.
1948 (apply_replacement): Call priority () with force_recompute = true.
1949 (restore_pattern): Likewise.
1950
1951 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1952
1953 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1954 HOST_BITS_PER_WIDE_INT.
1955 (test_vector_ops_duplicate): Likewise.
1956
1957 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1958
1959 PR target/72782
1960 * config/i386/sse.md (VF_AVX512): New.
1961 (avx512bcst): Likewise.
1962 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1963 Likewise.
1964 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1965 Likewise.
1966 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1967 Likewise.
1968
1969 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1970
1971 * doc/invoke.texi (-dumpversion): Improve grammar.
1972 (-dumpfullversion): Make more consistent with -dumpversion.
1973
1974 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1975
1976 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1977 Set JUMP_LABEL to the jump insn.
1978 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1979 Predict emitted jump and add label to jump insn.
1980
1981 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1982
1983 PR tree-optimization/87562
1984 * input.c (get_substring_ranges_for_loc): Use
1985 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1986 getting the linemap for the endpoint. Verify that it's either
1987 in the same linemap as the start point's spelling location, or
1988 at least in the same file.
1989
1990 2018-10-18 Richard Biener <rguenther@suse.de>
1991
1992 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1993 feed width-specific load/store costs through ix86_vec_cost.
1994 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1995 (k8_cost): Likewise.
1996 (bdver_cost): Likewise.
1997 (znver1_cost): Likewise.
1998 (btver1_cost): Likewise.
1999 (btver2_cost): Likewise.
2000
2001 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2002
2003 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
2004 to simplify subreg of vec_merge.
2005
2006 2018-10-18 Richard Biener <rguenther@suse.de>
2007
2008 * config/i386/i386.c: Fix costing of vector FMA.
2009
2010 2018-10-18 Richard Biener <rguenther@suse.de>
2011
2012 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
2013 and argument.
2014 (ix86_builtin_vectorization_cost): For vec_construct properly
2015 cost insertion into SSE regs.
2016 (...): Adjust calls to ix86_vec_cost.
2017
2018 2018-10-18 Richard Biener <rguenther@suse.de>
2019
2020 PR middle-end/87087
2021 Revert
2022 2018-02-07 Richard Biener <rguenther@suse.de>
2023
2024 PR tree-optimization/84204
2025 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2026 this place.
2027
2028 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2029
2030 PR target/87537
2031 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
2032 of vec_duplicate.
2033 (test_vector_ops_duplicate): Add test for a scalar subreg of a
2034 VEC_MERGE of a VEC_DUPLICATE.
2035
2036 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2037
2038 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
2039 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
2040 * doc/standards.texi (C Language): Document C2X.
2041 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
2042 (rl78_option_override): Handle "GNU C2X" language name.
2043
2044 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2045
2046 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
2047 Document C17 as published in 2018.
2048
2049 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2050
2051 PR middle-end/87623
2052 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2053 bail out if both sides do not have the same storage order.
2054
2055 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2056
2057 * bitmap.c (bitmap_head::dump): New.
2058 * bitmap.h (bitmap_head): Add dump().
2059 * gimple-ssa-evrp-analyze.c
2060 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
2061 (evrp_range_analyzer::set_ssa_range_info): Same.
2062 (evrp_range_analyzer::record_ranges_from_phis): Same.
2063 (evrp_range_analyzer::record_ranges_from_stmt): Same.
2064 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
2065 * gimple-ssa-sprintf.c (get_int_range): Same.
2066 (format_integer): Same.
2067 (sprintf_dom_walker::handle_gimple_call): Same.
2068 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
2069 (ipcp_vr_lattice::top_p): Same.
2070 (ipcp_vr_lattice::bottom_p): Same.
2071 (ipcp_vr_lattice::set_to_bottom): Same.
2072 (ipa_vr_operation_and_type_effects): Same.
2073 (propagate_vr_across_jump_function): Same.
2074 (ipcp_store_vr_results): Same.
2075 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
2076 (ipa_print_node_jump_functions_for_edge): Same.
2077 (ipa_get_value_range): Same.
2078 (ipa_compute_jump_functions_for_edge): Same.
2079 (ipa_write_jump_function): Same.
2080 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
2081 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2082 Same.
2083 * vr-values.c (set_value_range_to_nonnegative): Same.
2084 (set_value_range_to_truthvalue): Same.
2085 (vr_values::get_value_range): Same.
2086 (vr_values::set_defs_to_varying): Same.
2087 (vr_values::update_value_range): Same.
2088 (symbolic_range_based_on_p): Same.
2089 (vr_values::op_with_boolean_value_range_p): Same.
2090 (vr_values::extract_range_for_var_from_comparison_expr): Same.
2091 (vr_values::extract_range_from_ssa_name): Same.
2092 (vr_values::extract_range_from_binary_expr): Same.
2093 (vr_values::extract_range_from_unary_expr): Same.
2094 (vr_values::extract_range_from_cond_expr): Same.
2095 (vr_values::extract_range_from_comparison): Same.
2096 (vr_values::check_for_binary_op_overflow): Same.
2097 (vr_values::extract_range_basic): Same.
2098 (vr_values::extract_range_from_assignment): Same.
2099 (compare_ranges): Same.
2100 (compare_range_with_value): Same.
2101 (vr_values::adjust_range_with_scev): Same.
2102 (vrp_valueize): Same.
2103 (vrp_valueize_1): Same.
2104 (vr_values::get_vr_for_comparison): Same.
2105 (vr_values::compare_name_with_value): Same.
2106 (vr_values::compare_names): Same.
2107 (vr_values::vrp_evaluate_conditional): Same.
2108 (find_case_label_ranges): Same.
2109 (vr_values::vrp_visit_switch_stmt): Same.
2110 (vr_values::extract_range_from_phi_node): Same.
2111 (vr_values::simplify_div_or_mod_using_ranges): Same.
2112 (vr_values::simplify_bit_ops_using_ranges): Same.
2113 (test_for_singularity): Same.
2114 (range_fits_type_p): Same.
2115 (vr_values::simplify_cond_using_ranges_1): Same.
2116 (vr_values::simplify_switch_using_ranges): Same.
2117 (vr_values::simplify_float_conversion_using_ranges): Same.
2118 (vr_values::two_valued_val_range_p): Same.
2119 (vr_values::add_equivalence): Move to value_range::equiv_add.
2120 * vr-values.h (vr_values::add_equivalence): Remove.
2121 (VR_INITIALIZER): Remove.
2122 * tree-vrp.c (value_range::set): New.
2123 (value_range::equiv_add): New.
2124 (value_range::value_range): New.
2125 (value_range::deep_copy): New.
2126 (value_range::check): New.
2127 (value_range::equal_p): New.
2128 (value_range::ignore_equivs_equal_p): New.
2129 (value_range::operator==): New.
2130 (value_range::operator!=): New.
2131 (value_range::symbolic_p): New.
2132 (value_range::numeric_p): New.
2133 (value_range::set_undefined): New.
2134 (value_range::set_varying): New.
2135 (value_range::may_contain_p): New.
2136 (value_range::equiv_clear): New.
2137 (value_range::singleton_p): New.
2138 (value_range::intersect): New.
2139 (value_range::dump): New.
2140 (value_range::set_and_canonicalize): New.
2141 (set_value_range): Adjust for value_range API.
2142 (set_value_range_to_undefined): Same.
2143 (set_value_range_to_varying): Same.
2144 (set_and_canonicalize_value_range): Same.
2145 (set_value_range_to_nonnull): Same.
2146 (set_value_range_to_null): Same.
2147 (range_is_null): Same.
2148 (range_is_nonnull): Same.
2149 (range_int_cst_p): Same.
2150 (range_int_cst_singleton_p): Same.
2151 (symbolic_range_p): Same.
2152 (range_includes_zero_p): Same.
2153 (value_range_constant_singleton): Same.
2154 (vrp_set_zero_nonzero_bits): Same.
2155 (ranges_from_anti_range): Same.
2156 (extract_range_into_wide_ints): Same.
2157 (extract_range_from_multiplicative_op): Same.
2158 (set_value_range_with_overflow): Same.
2159 (extract_range_from_binary_expr_1): Same.
2160 (extract_range_from_unary_expr): Same.
2161 (dump_value_range): Same.
2162 (debug_value_range): Same.
2163 (vrp_prop::check_array_ref): Same.
2164 (vrp_prop::check_mem_ref): Same.
2165 (vrp_prop::vrp_initialize): Same.
2166 (vrp_prop::visit_stmt): Same.
2167 (intersect_ranges): Same.
2168 (vrp_prop::visit_phi): Same.
2169 (vrp_prop::vrp_finalize): Same.
2170 (determine_value_range_1): Same.
2171 (determine_value_range): Same.
2172 (vrp_intersect_ranges_1): Rename to...
2173 (vrp_intersect_1): this.
2174 (vrp_intersect_ranges): Rename to...
2175 (value_range::intersect_helper): ...this.
2176 (vrp_meet_1): Rename to...
2177 (value_range::union_helper): ...this.
2178 (vrp_meet): Rename to...
2179 (value_range::union_): ...this.
2180 (copy_value_range): Remove.
2181 * tree-vrp.h (struct value_range): Rewrite into a proper class.
2182 (value_range::vrtype): New.
2183 (value_range::type): New.
2184 (value_range::equiv): New.
2185 (value_range::min): New.
2186 (value_range::max): New.
2187 (value_range::varying_p): New.
2188 (value_range::undefined_p): New.
2189 (value_range::null_p): New.
2190 (value_range::equiv_add): New.
2191 (copy_value_range): Remove.
2192
2193 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2194
2195 * Makefile.in (SELFTEST_TARGETS): New.
2196 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
2197 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2198 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
2199 c/Make-lang.in.
2200 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
2201 (selftest-c++-gdb, selftest-c++-valgrind): Move to
2202 cp/Make-lang.in.
2203 * configure: Regenerate.
2204 * configure.ac (selftest_languages): New.
2205
2206 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2207
2208 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
2209 overflow wraps argument.
2210 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
2211 wide_int_range_multiplicative_op.
2212 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
2213 overflow wraps argument.
2214 (wide_int_range_multiplicative_op): Same.
2215 (wide_int_range_lshift): Same.
2216 (wide_int_range_div): Same.
2217 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
2218 (wide_int_range_lshift): Same.
2219 (wide_int_range_div): Same.
2220
2221 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2222
2223 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
2224 use sign as argument.
2225 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
2226 wide_int_range_shift_undefined_p.
2227
2228 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2229
2230 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
2231 Rename to...
2232 (@despeculate_copy<ALLI_TI:mode>): ... This.
2233 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
2234 switch statement.
2235
2236 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2237
2238 * config.gcc: Obsolete *-*-solaris2.10*.
2239 * doc/install.texi (Specific, *-*-solaris2*): Document it.
2240
2241 2018-10-12 Jeff Law <law@redhat.com>
2242
2243 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2244 reg + sym +- const_int addressing modes.
2245
2246 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2247
2248 * common.opt (fdiagnostics-minimum-margin-width=): New option.
2249 * diagnostic-show-locus.c (layout::layout): Apply the minimum
2250 margin width.
2251 (layout::start_annotation_line): Only print up to 3 of the
2252 margin character, to avoid touching the left-hand side.
2253 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2254 minimum margin width, as set by test_diagnostic_context's ctor.
2255 (selftest::test_fixit_insert_containing_newline): Likewise.
2256 (selftest::test_fixit_insert_containing_newline_2): Likewise.
2257 (selftest::test_line_numbers_multiline_range): Clear
2258 dc.min_margin_width.
2259 * diagnostic.c (diagnostic_initialize): Initialize
2260 min_margin_width.
2261 * diagnostic.h (struct diagnostic_context): Add field
2262 "min_margin_width".
2263 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2264 * opts.c (common_handle_option): Handle
2265 OPT_fdiagnostics_minimum_margin_width_.
2266 * selftest-diagnostic.c
2267 (selftest::test_diagnostic_context::test_diagnostic_context):
2268 Initialize min_margin_width to 6.
2269 * toplev.c (general_init): Initialize global_dc->min_margin_width.
2270
2271 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2272
2273 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2274 Fix usage of "error_at_rich_loc" in the comment.
2275
2276 2018-10-15 Renlin Li <renlin.li@arm.com>
2277
2278 PR target/87563
2279 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2280 if-conversioned loop when it contains ifn with types not
2281 supported by backend.
2282 * internal-fn.c (expand_direct_optab_fn): Add an assert.
2283 (direct_internal_fn_supported_p): New helper function.
2284 * internal-fn.h (direct_internal_fn_supported_p): Declare.
2285
2286 2018-10-15 Jakub Jelinek <jakub@redhat.com>
2287
2288 PR target/87572
2289 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2290 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2291 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2292
2293 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2294
2295 PR tree-optimization/87022
2296 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2297 bits in dist vector rather than the first one.
2298
2299 2018-10-15 Richard Biener <rguenther@suse.de>
2300
2301 PR middle-end/87610
2302 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2303 (visit_loadstore): When a used restrict tag escaped verify that
2304 the points-to solution of "other" pointers do not include
2305 escaped.
2306 (compute_dependence_clique): If a used restrict tag escaped
2307 communicated that down to visit_loadstore.
2308
2309 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2310
2311 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2312 into reg if it isn't a general operand.
2313
2314 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2315
2316 PR target/87599
2317 * config/i386/sse.md (*vec_dupv2di): Add register source to
2318 movddup.
2319
2320 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2321
2322 PR target/87572
2323 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2324 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2325 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2326 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2327
2328 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
2329
2330 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2331 (notice_args_size): Set it in the current trace if no insn that can
2332 throw internally has been seen yet.
2333 (connect_traces): When connecting args_size between traces, allow the
2334 incoming values not to match if there is an insn setting it before the
2335 first insn that can throw internally; in that case, force the creation
2336 of a CFI note on this latter insn.
2337
2338 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
2339
2340 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2341 the base class, because using the injected-class-name was not clearly
2342 specified until DR 176.
2343
2344 2018-10-12 Paul Koning <ni1d@arrl.net>
2345
2346 * config/pdp11/pdp11.md (doloop_end): New expander.
2347 (doloop_end_insn): renamed from "doloop_end".
2348 (addqi3): New pattern.
2349 (subqi3): New pattern.
2350 * config/pdp11/predicates.md (incdec_operand): New predicate.
2351
2352 2018-10-12 Yury Gribov <tetra2005@gmail.com>
2353
2354 PR middle-end/81376
2355 * real.c (format_helper::can_represent_integral_type_p): New function
2356 * real.h (format_helper::can_represent_integral_type_p): Ditto.
2357 * match.pd: New pattern.
2358
2359 2018-10-12 Alexandre Oliva <oliva@adacore.com>
2360
2361 * configure.ac: Introduce --enable-large-address-aware
2362 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2363 * doc/install.texi: Document it.
2364 * configure, config.in: Rebuilt.
2365 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2366 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2367 (LINK_SPEC): Insert it.
2368 * config/i386/mingw-w64.h: Likewise.
2369
2370 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2371
2372 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
2373
2374 PR rtl-optimization/87600
2375 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2376
2377 2018-10-12 Paul Koning <ni1d@arrl.net>
2378
2379 * doc/md.texi (doloop_end): Document that the pattern code may
2380 need to check operand mode.
2381
2382 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
2383
2384 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2385 to zero-extend between int and floating-point registers.
2386 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2387 ldp into floating-point registers. Add type and arch attributes.
2388 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2389 Use f_loads for type attribute.
2390
2391 2018-10-11 Martin Sebor <msebor@redhat.com>
2392
2393 * doc/extend.texi (attribute packed): Correct typos.
2394
2395 2018-10-11 Martin Sebor <msebor@redhat.com>
2396
2397 * doc/extend.texi (attribute flatten): Mention interaction with
2398 noinline.
2399
2400 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2401
2402 PR target/87156
2403 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2404 Set new_decl virtual flag to zero.
2405
2406 2018-10-11 Martin Sebor <msebor@redhat.com>
2407
2408 PR middle-end/87593
2409 * doc/extend.texi (attribute format_arg): Discuss using multiple
2410 attributes on a single function.
2411
2412 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
2413
2414 PR tree-optimization/86829
2415 * match.pd (sin (atan (x))): New simplification rules.
2416 (cos (atan (x))): Likewise.
2417 * real.c (build_sinatan_real): New function.
2418 * real.h (build_sinatan_real): Prototype.
2419
2420 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
2421
2422 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2423 function.
2424 (fold_mergeeo_helper): New helper function.
2425 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2426 intrinsics. Correct some whitespace indentation issues.
2427
2428 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
2429
2430 PR target/87511
2431 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2432 Use HOST_WIDE_INT_1U for shift.
2433
2434 2018-10-11 Doug Rupp <rupp@adacore.com>
2435 Olivier Hainque <hainque@adacore.com>
2436
2437 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2438 Pass --relax to the linker for RTPs.
2439 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2440
2441 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
2442 Jan Hubicka <jh@suse.cz>
2443 Martin Jambor <mjambor@suse.cz>
2444
2445 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2446 the same elements are repeated rather than printing all of them.
2447 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2448 "repeated" elements.
2449 * read-rtl-function.c (test_loading_repeat): New function.
2450 (read_rtl_function_c_tests): Call test_loading_repeat.
2451 * rtl-tests.c (test_dumping_repeat): New function.
2452 (rtl_tests_c_tests): Call test_dumping_repeat.
2453
2454 2018-10-11 Richard Biener <rguenther@suse.de>
2455
2456 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2457 bdver?_cost): Unify to ...
2458 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2459 * config/i386/i386.c (processor_cost_table): Adjust.
2460
2461 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2462
2463 PR middle-end/87574
2464 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2465 the thunk when expanding to GIMPLE.
2466
2467 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2468
2469 * varasm.c (mergeable_string_section): Don't try to move zero-length
2470 strings to the merge section.
2471
2472 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2473
2474 PR target/87573
2475 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2476
2477 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2478
2479 PR target/87550
2480 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2481 to special_args set.
2482
2483 2018-10-10 Richard Biener <rguenther@suse.de>
2484
2485 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2486 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2487 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2488 and recursing and pattern terminating the recursion on SSE
2489 vector width using ix86_expand_reduc.
2490 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2491 width and recursing and SSE2 vector variant doing the final
2492 reduction with ix86_expand_reduc.
2493 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2494 with terminating the recursion at AVX level, splitting that
2495 to SSE there.
2496
2497 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2498
2499 * genmatch.c (error_cb): Rename to...
2500 (diagnostic_cb): ...this, converting int params to enums.
2501 (fatal_at): Update for renaming.
2502 (warning_at): Likewise.
2503 (main): Likewise.
2504 * input.c (selftest::ebcdic_execution_charset::apply):
2505 Update for renaming of...
2506 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2507 to...
2508 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2509 converting level and reason to enums.
2510 (class selftest::lexer_error_sink): Rename to...
2511 (class selftest::lexer_test_options): ...this, renaming field
2512 "m_errors" to "m_diagnostics".
2513 (selftest::lexer_test_options::apply): Update for renaming of...
2514 (selftest::lexer_test_options::on_error): ...this, renaming to...
2515 (selftest::lexer_test_options::on_diagnostic): ...this
2516 converting level and reason to enums.
2517 (selftest::test_lexer_string_locations_raw_string_unterminated):
2518 Update for renamings.
2519 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2520 "reason".
2521
2522 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2523
2524 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2525 * config/rs6000/pmmintrin.h: New file.
2526
2527 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2528
2529 PR tree-optimization/86659
2530 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2531
2532 2018-10-09 Richard Biener <rguenther@suse.de>
2533
2534 PR tree-optimization/63155
2535 * tree-ssa-structalias.c: Include tree-ssa.h.
2536 (get_constraint_for_ssa_var): For undefs return nothing_id.
2537 (find_func_aliases): Cleanup PHI handling.
2538
2539 2018-10-09 Richard Biener <rguenther@suse.de>
2540
2541 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2542 replacements.
2543
2544 2018-10-09 Martin Liska <mliska@suse.cz>
2545
2546 * asan.c (asan_emit_stack_protection): If a stack variable
2547 is located in a same file as current function, then emit
2548 line info into variable definition string.
2549
2550 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2551
2552 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2553 information.
2554
2555 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2556
2557 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2558 on the thunk.
2559
2560 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2561
2562 PR tree-optimization/86659
2563 * gimple-match.h (struct gimple_match_op): Add reverse field.
2564 (gimple_match_op::set_op): New overloaded method.
2565 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2566 the REF_REVERSE_STORAGE_ORDER flag on the value.
2567 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2568 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2569
2570 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2571
2572 PR middle-end/63155
2573 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2574 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2575
2576 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2577
2578 PR target/87517
2579 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2580 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2581
2582 2018-10-08 Richard Biener <rguenther@suse.de>
2583
2584 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2585 cost the same as AVX128 ones.
2586
2587 2018-10-08 Paul Koning <ni1d@arrl.net>
2588
2589 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2590 (expand_block_move): New function.
2591 * config/pdp11/pdp11.c (output_block_move): Remove.
2592 (expand_block_move): New function.
2593 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2594 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2595 (*movmemhi1): Remove.
2596
2597 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2598
2599 * config/s390/2827.md: Increase latencies for some FP instructions.
2600
2601 2018-10-08 Richard Biener <rguenther@suse.de>
2602
2603 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2604 Open a dump scope.
2605 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2606 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2607 (add_stmt_cost): Dump return value of the hook.
2608
2609 2018-10-08 Richard Biener <rguenther@suse.de>
2610
2611 PR tree-optimization/63155
2612 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2613 (ssa_propagation_engine::ssa_propagate): Remove redundant
2614 bitmap bit clearing.
2615
2616 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2617
2618 PR rtl-optimization/86939
2619 PR rtl-optimization/87479
2620 * ira.h (non_conflicting_reg_copy_p): New prototype.
2621 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2622 (make_hard_regno_dead): Don't add conflicts for register
2623 ignore_reg_for_conflicts.
2624 (make_object_dead): Likewise.
2625 (non_conflicting_reg_copy_p): New function.
2626 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2627 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2628 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2629 (make_hard_regno_dead): Don't add conflicts for register
2630 ignore_reg_for_conflicts. Remove special conflict handling of
2631 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2632 check_pic_pseudo_p and update callers.
2633 (mark_pseudo_dead): Don't add conflicts for register
2634 ignore_reg_for_conflicts.
2635 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2636
2637 2018-10-05 Andrew Waterman <andrew@sifive.com>
2638 Jim Wilson <jimw@sifive.com>
2639
2640 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2641 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2642 new pattern using HONOR_SNANS that emits one extra instruction.
2643
2644 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2645
2646 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2647 patterns): Merge SI and DI patterns to a GPR pattern.
2648 (unnamed define_insn and define_split for record form of that): Merge
2649 to a single define_insn_and_split pattern.
2650
2651 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2652
2653 PR c++/56856
2654 * input.c (expand_location_to_spelling_point): Add param "aspect"
2655 and use rather than hardcoding LOCATION_ASPECT_CARET.
2656 (get_substring_ranges_for_loc): Handle the case of a single token
2657 within a macro expansion.
2658 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2659 defaulting to LOCATION_ASPECT_CARET.
2660
2661 2018-10-05 Paul Koning <ni1d@arrl.net>
2662
2663 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2664 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2665 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2666 (pdp11_guard_type): New function.
2667
2668 2018-10-05 Paul Koning <ni1d@arrl.net>
2669
2670 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2671 * config/pdp11/pdp11.opt (mfloat32): Remove.
2672 (mfloat64): Remove.
2673 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2674 (pdp11 -mfloat64): Remove.
2675
2676 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2677
2678 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2679 (*cmp<mode>_cc_i387): Ditto.
2680 (*cmpu<mode>_cc_i387): Ditto.
2681 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2682 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2683 "scratch" argument.
2684 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2685 Emit x86_sahf_1 pattern.
2686 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2687 (ix86_expand_carry_flag_compare): Ditto.
2688
2689 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2690
2691 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2692 to reg_or_0_operand. Add "C" constraint.
2693 (*cmpxf_cc_i387): Ditto.
2694 (*cmp<mode>_i387): Change operand 2 predicate
2695 to nonimm_or_0_operand. Add "C" constraint.
2696 (*cmp<mode>_cc_i387): Ditto.
2697 (*cmp<mode>_0_i387): Remove insn pattern.
2698 (*cmp<mode>_0_cc_i387): Ditto.
2699
2700 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2701
2702 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2703 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2704 from vector_move_operand. Update all uses.
2705
2706 2018-10-05 Martin Sebor <msebor@redhat.com>
2707
2708 PR tree-optimization/87490
2709 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2710 consistently.
2711
2712 2018-10-05 Richard Biener <rguenther@suse.de>
2713
2714 PR tree-optimization/63155
2715 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2716 vertical space in dumpfiles.
2717 * tree-ssa-propagate.h
2718 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2719 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2720 (ssa_edge_worklist_back): Likewise.
2721 (curr_order): Likewise.
2722 (cfg_blocks_get): Remove abstraction.
2723 (cfg_blocks_add): Likewise.
2724 (cfg_blocks_empty_p): Likewise.
2725 (add_ssa_edge): Add to current or next worklist based on
2726 RPO index.
2727 (add_control_edge): Likewise.
2728 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2729 into ...
2730 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2731 iteration from CFG and SSA edge worklist so we process
2732 everything in RPO order, prioritizing forward progress
2733 over iteration.
2734 (ssa_prop_init): Allocate new worklists, do not dump
2735 immediate uses.
2736 (ssa_prop_fini): Free new worklists.
2737
2738 2018-10-05 Richard Biener <rguenther@suse.de>
2739
2740 * tree-core.h (tree_block::abstract_flag): Remove.
2741 (tree_block::block_num): Make full 32bits.
2742 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2743 * tree.h (BLOCK_ABSTRACT): Remove.
2744 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2745 resulting from BLOCK_ABSTRACT being always false.
2746 (gen_inlined_subroutine_die): Likewise.
2747 (gen_block_die): Likewise.
2748 * tree.c (block_ultimate_origin): Likewise.
2749 * tree-pretty-print.c (dump_block_node): Remove code dealing
2750 with BLOCK_ABSTRACT.
2751 * tree-ssa-live.c (dump_scope_block): Likewise.
2752 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2753 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2754
2755 2018-10-05 Richard Biener <rguenther@suse.de>
2756
2757 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2758 is asked for initialize mode to the component mode of the
2759 vector type.
2760
2761 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2762
2763 PR target/87522
2764 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2765 assembler for -mavx.
2766 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2767
2768 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2769
2770 PR target/87509
2771 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2772 RS6000_BTM_DFP.
2773 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2774 to be DImode. When using mffscrn, force the operand to a register.
2775
2776 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2777
2778 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2779 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2780 X87MODEF mode iterator.
2781 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2782 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2783 X87MODEF mode iterator.
2784
2785 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2786
2787 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2788 -Wno-prio-ctor-dtor.
2789
2790 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2791
2792 * Makefile.in (OBJS): Add opt-problem.o.
2793 * dump-context.h: Include "selftest.h.
2794 (selftest::temp_dump_context): New forward decl.
2795 (class dump_context): Make friend of class
2796 selftest::temp_dump_context.
2797 (dump_context::dump_loc_immediate): New decl.
2798 (class dump_pretty_printer): Move here from dumpfile.c.
2799 (class temp_dump_context): Move to namespace selftest.
2800 (temp_dump_context::temp_dump_context): Add param
2801 "forcibly_enable_dumping".
2802 (selftest::verify_dumped_text):
2803 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2804 (selftest::verify_item):
2805 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2806 (ASSERT_IS_TREE): Likewise.
2807 (ASSERT_IS_GIMPLE): Likewise.
2808 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2809 to...
2810 (dump_context::dump_loc_immediate): ...this new function.
2811 (class dump_pretty_printer): Move to dump-context.h.
2812 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2813 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2814 (temp_dump_context::temp_dump_context): Move to "selftest"
2815 namespace. Add param "forcibly_enable_dumping", and use it to
2816 conditionalize the use of m_pp;
2817 (selftest::verify_dumped_text): Make non-static.
2818 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2819 (selftest::verify_item): Make non-static.
2820 (ASSERT_IS_TEXT): Move to dump-context.h.
2821 (ASSERT_IS_TREE): Likewise.
2822 (ASSERT_IS_GIMPLE): Likewise.
2823 (selftest::test_capture_of_dump_calls): Pass "true" for new
2824 param of temp_dump_context.
2825 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2826 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2827 TDF_COMPARE_DEBUG.
2828 * opt-problem.cc: New file.
2829 * opt-problem.h: New file.
2830 * optinfo-emit-json.cc
2831 (selftest::test_building_json_from_dump_calls): Pass "true" for
2832 new param of temp_dump_context.
2833 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2834 (optinfo::emit_for_opt_problem): New function.
2835 (optinfo::emit): Clarity which emit_item is used.
2836 * optinfo.h (optinfo::get_dump_location): New accessor.
2837 (optinfo::emit_for_opt_problem): New decl.
2838 (optinfo::emit): Make const.
2839 * selftest-run-tests.c (selftest::run_tests): Call
2840 selftest::opt_problem_cc_tests.
2841 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2842 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2843 bool to opt_result, converting fprintf messages to
2844 opt_result::failure_at calls. Add "stmt" param for use by the
2845 failure_at calls.
2846 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2847 (runtime_alias_check_p): Convert return type from bool to
2848 opt_result, converting dump_printf calls to
2849 opt_result::failure_at, using the statement DDR_A for their
2850 location.
2851 (find_data_references_in_stmt): Convert return type from bool to
2852 opt_result, converting "return false" to opt_result::failure_at
2853 with a new message.
2854 * tree-data-ref.h: Include "opt-problem.h".
2855 (dr_analyze_innermost): Convert return type from bool to opt_result,
2856 and add a const gimple * param.
2857 (find_data_references_in_stmt): Convert return type from bool to
2858 opt_result.
2859 (runtime_alias_check_p): Likewise.
2860 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2861 dr_analyze_innermost.
2862 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2863 Convert return type from bool to opt_result, adding a message for
2864 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2865 (vect_analyze_data_ref_dependence): Convert return type from bool
2866 to opt_result. Change sense of return type from "false"
2867 effectively meaning "no problems" to "false" meaning a problem,
2868 so that "return false" becomes "return opt_result::success".
2869 Convert "return true" calls to opt_result::failure_at, using
2870 the location of statement A rather than vect_location.
2871 (vect_analyze_data_ref_dependences): Convert return type from bool
2872 to opt_result.
2873 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2874 calls to opt_result::failure_at, using the stmt location rather
2875 than vect_location.
2876 (vect_verify_datarefs_alignment): Convert return type from bool
2877 to opt_result.
2878 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2879 into multiple more-tightly-scoped copies.
2880 (vect_analyze_data_refs_alignment): Convert return type from bool
2881 to opt_result.
2882 (vect_analyze_data_ref_accesses): Likewise, converting a
2883 "return false" to a "return opt_result::failure_at", adding a
2884 new message.
2885 (vect_prune_runtime_alias_test_list): Convert return type from
2886 bool to opt_result, converting dump_printf_loc to
2887 opt_result::failure_at. Add a %G to show the pertinent statement,
2888 and use the stmt's location rather than vect_location.
2889 (vect_find_stmt_data_reference): Convert return type from
2890 bool to opt_result, converting dump_printf_loc to
2891 opt_result::failure_at, using stmt's location.
2892 (vect_analyze_data_refs): Convert return type from bool to
2893 opt_result. Convert "return false" to "return
2894 opt_result::failure_at", adding messages as needed.
2895 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2896 type from bool to opt_result.
2897 (vect_determine_vf_for_stmt): Likewise.
2898 (vect_determine_vectorization_factor): Likewise, converting
2899 dump_printf_loc to opt_result::failure_at, using location of phi
2900 rather than vect_location.
2901 (vect_analyze_loop_form_1): Convert return type from bool to
2902 opt_result, converting dump_printf_loc calls, retaining the use of
2903 vect_location.
2904 (vect_analyze_loop_form): Convert return type from loop_vec_info
2905 to opt_loop_vec_info.
2906 (vect_analyze_loop_operations): Convert return type from bool to
2907 opt_result, converting dump_printf_loc calls, using the location
2908 of phi/stmt rather than vect_location where available. Convert
2909 various "return false" to "return opt_result::failure_at" with
2910 "unsupported phi" messages.
2911 (vect_get_datarefs_in_loop): Convert return type from bool to
2912 opt_result. Add a message for the
2913 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2914 (vect_analyze_loop_2): Convert return type from bool to
2915 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2916 each "goto again;", adding new messages where needed.
2917 Add "unsupported grouped {store|load}" messages.
2918 (vect_analyze_loop): Convert return type from loop_vec_info to
2919 opt_loop_vec_info.
2920 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2921 bool to opt_result.
2922 * tree-vect-stmts.c (process_use): Likewise, converting
2923 dump_printf_loc call and using stmt location, rather than
2924 vect_location.
2925 (vect_mark_stmts_to_be_vectorized): Likeise.
2926 (vect_analyze_stmt): Likewise, adding a %G.
2927 (vect_get_vector_types_for_stmt): Convert return type from bool to
2928 opt_result, converting dump_printf_loc calls and using stmt
2929 location, rather than vect_location.
2930 (vect_get_mask_type_for_stmt): Convert return type from tree to
2931 opt_tree, converting dump_printf_loc calls and using stmt location.
2932 * tree-vectorizer.c: Include "opt-problem.h.
2933 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2934 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2935 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2936 enabled, use it to report at the top level "couldn't vectorize
2937 loop" followed by the problem.
2938 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2939 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2940 to opt_result.
2941 (vect_analyze_stmt): Likewise.
2942 (vect_get_vector_types_for_stmt): Likewise.
2943 (tree vect_get_mask_type_for_stmt): Likewise.
2944 (vect_analyze_data_ref_dependences): Likewise.
2945 (vect_enhance_data_refs_alignment): Likewise.
2946 (vect_analyze_data_refs_alignment): Likewise.
2947 (vect_verify_datarefs_alignment): Likewise.
2948 (vect_analyze_data_ref_accesses): Likewise.
2949 (vect_prune_runtime_alias_test_list): Likewise.
2950 (vect_find_stmt_data_reference): Likewise.
2951 (vect_analyze_data_refs): Likewise.
2952 (vect_analyze_loop): Convert return type from loop_vec_info to
2953 opt_loop_vec_info.
2954 (vect_analyze_loop_form): Likewise.
2955 (vect_analyze_slp): Convert return type from bool to opt_result.
2956
2957 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2958
2959 * doc/invoke.texi (-fopt-info): Document new "internals"
2960 sub-option.
2961 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2962 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2963 MSG_ALL_KINDS.
2964 (optinfo_verbosity_options): Add "internals".
2965 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2966 (dump_context::apply_dump_filter_p): New member function.
2967 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2968 explicitly masking the dump_kind.
2969 (dump_context::begin_scope): Increment the scope depth first. Use
2970 apply_dump_filter_p rather than explicitly masking the dump_kind.
2971 (dump_context::emit_item): Use apply_dump_filter_p rather than
2972 explicitly masking the dump_kind.
2973 (dump_dec): Likewise.
2974 (dump_hex): Likewise.
2975 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2976 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2977 (opt_info_switch_p): Update handling of default
2978 MSG_OPTIMIZED_LOCATIONS to cope with default of
2979 MSG_PRIORITY_USER_FACING.
2980 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2981 masking the dump_kind.
2982 (selftest::test_capture_of_dump_calls): Update test_dump_context
2983 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2984 than MSG_ALL. Generalize scope test to be run at all four
2985 combinations of with/without MSG_PRIORITY_USER_FACING and
2986 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2987 for each of the two values.
2988 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2989 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2990 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2991 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2992 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2993 with MSG_PRIORITY_*.
2994 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2995 dump messages as MSG_PRIORITY_USER_FACING.
2996 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2997 about the interaction with MSG_PRIORITY_*.
2998
2999 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3000
3001 * varasm.c (output_constant): Add new parameter merge_strings.
3002 Make strings properly zero terminated in merge string sections.
3003 (mergeable_string_section): Don't fail if the last char is non-zero.
3004 (assemble_variable_contents): Handle merge string sections.
3005 (assemble_variable): Likewise.
3006 (assemble_constant_contents): Likewise.
3007 (output_constant_def_contents): Likewise.
3008 (output_constructor_array_range,
3009 output_constructor_regular_field): Adjust call to output_constant.
3010 (output_object_block): Adjust call to assemble_constant_contents
3011 and assemble_variable_contents.
3012
3013 2018-10-04 Martin Liska <mliska@suse.cz>
3014
3015 PR c/87483
3016 * cgraphunit.c (process_function_and_variable_attributes):
3017 Warn about a function with alias attribute and a body.
3018
3019 2018-10-04 Martin Liska <mliska@suse.cz>
3020
3021 PR ipa/82625
3022 * multiple_target.c (redirect_to_specific_clone): New function.
3023 (ipa_target_clone): Use it.
3024 * tree-inline.c: Fix comment.
3025
3026 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3027
3028 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
3029 fields.
3030 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
3031 (gcc::dump_manager::register_pass): New member function, adapted
3032 from loop body in gcc::pass_manager::register_pass, adding a
3033 call to update_dfi_for_opt_info.
3034 (gcc::dump_manager::opt_info_enable_passes): Store the
3035 -fopt-info options into the new fields. Move the loop
3036 bodies into...
3037 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
3038 function.
3039 * dumpfile.h (struct opt_pass): New forward decl.
3040 (gcc::dump_manager::register_pass): New decl.
3041 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
3042 (class gcc::dump_manager): Add fields "m_optgroup_flags",
3043 "m_optinfo_flags", and "m_optinfo_filename".
3044 * passes.c (gcc::pass_manager::register_pass): Move all of the
3045 dump-handling code to gcc::dump_manager::register_pass.
3046
3047 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
3048
3049 PR rtl-optimization/87466
3050 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
3051 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
3052 * doc/tm.texi: Regenerate.
3053 * ira-lives.c (process_bb_node_lives): Use the new target hook.
3054 * lra-lives.c (process_bb_lives): Likewise.
3055 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
3056 Define.
3057
3058 2018-10-04 Tamar Christina <tamar.christina@arm.com>
3059
3060 * params.c (add_params): Fix initialization.
3061
3062 2018-10-04 Martin Liska <mliska@suse.cz>
3063
3064 PR gcov-profile/84107
3065 * tree-profile.c (init_ic_make_global_vars):
3066 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
3067 Come up with new ic_tuple* variables. Emit
3068 __gcov_indirect_call{,_topn} variables.
3069 (gimple_gen_ic_profiler): Access the variable
3070 and emit gimple.
3071 (gimple_gen_ic_func_profiler): Access
3072 __gcov_indirect_call.callee field.
3073 (gimple_init_gcov_profiler): Use ptr_type_node.
3074 * value-prof.c (gimple_ic): Use ptr_type_node.
3075
3076 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3077
3078 PR tree-optimization/85787
3079 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
3080 into this function and add support for detecting multiple phis.
3081 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
3082
3083 2018-10-04 Martin Liska <mliska@suse.cz>
3084
3085 PR ipa/87491
3086 * ipa-inline.c (inline_to_all_callers_1):
3087 Call ultimate_alias_target for node being inlined.
3088
3089 2018-10-03 Jeff Law <law@redhat.com>
3090
3091 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
3092 target's wchar_t.
3093 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
3094 * tree.h (get_typenode_from_name): Prototype.
3095
3096 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3097
3098 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
3099 Change operand 2 predicate to nonimmediate_operand.
3100 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3101
3102 2018-10-03 Martin Sebor <msebor@redhat.com>
3103 Jeff Law <law@redhat.com>
3104
3105 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
3106 initialize it.
3107 (get_string_length): Detect unterminated arrays.
3108 (format_string): Same.
3109 (format_directive): Warn about unterminated arrays.
3110 (handle_gimple_call): Mark statements with no_warning as needed.
3111
3112 2018-10-03 Jim Wilson <jimw@sifive.com>
3113
3114 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
3115 also define __riscv_abi_rve. Delete trailing white space.
3116
3117 2018-10-03 Paul Koning <ni1d@arrl.net>
3118
3119 Enable LRA register allocator for PDP11.
3120 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
3121 (R): Likewise.
3122 (D): Likewise.
3123 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
3124 * config/pdp11/pdp11.opt (-mlra): New option.
3125 * doc/invoke.texi (PDP-11 Options): Document -mlra.
3126
3127 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3128
3129 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
3130 (*<absneg:code>extend<mode>xf2): Ditto.
3131
3132 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3133
3134 PR tree-optimization/87415
3135 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
3136 precision fields.
3137
3138 2018-10-02 Jeff Law <law@redhat.com>
3139
3140 * gimple-fold.c (get_range_strlen): Only set *nonstr when
3141 an unterminated string is discovered. Bubble up range
3142 even for unterminated strings.
3143 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
3144 indicates the string was not terminated via NONSTR.
3145
3146 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3147
3148 * tree-vrp.c (extract_range_from_unary_expr): Special case all
3149 pointer conversions.
3150 Do not do anything special for anti-ranges.
3151
3152 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
3153
3154 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
3155 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
3156
3157 2018-10-03 Martin Liska <mliska@suse.cz>
3158
3159 PR gcov-profile/86109
3160 * coverage.c (coverage_begin_function): Do not
3161 mark lambdas as artificial.
3162 * tree-core.h (struct GTY): Remove tm_clone_flag
3163 and introduce new lambda_function.
3164 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
3165
3166 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3167
3168 PR target/87474
3169 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
3170 P8_VECTOR and VSX are enabled.
3171
3172 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3173
3174 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
3175 0x3907 as CPU model number.
3176
3177 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3178
3179 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
3180 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
3181 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
3182 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
3183 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
3184 * config/s390/s390.md: Likewise. Rename also the cpu attribute
3185 value from arch12 to z14.
3186
3187 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3188
3189 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
3190 (isinfxf2): Ditto.
3191 (isinf<mode>2): Ditto.
3192
3193 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3194
3195 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
3196 before emitting fxam. Perform calculations in XFmode.
3197
3198 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3199
3200 * match.pd (((X /[ex] A) +- B) * A): New transformation.
3201
3202 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3203
3204 PR middle-end/87319
3205 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
3206 * tree.c (signed_or_unsigned_type_for): Handle complex.
3207
3208 2018-10-02 Jeff Law <law@redhat.com>
3209
3210 * gimple-fold.c (get_range_strlen): Remove dead code.
3211
3212 2018-10-02 Martin Sebor <msebor@redhat.com>
3213 Jeff Law <law@redhat.com>
3214
3215 * builtins.c (unterminated_array): Add new arguments.
3216 If argument is not terminated, bubble up size and exact
3217 state to callers.
3218 (expand_builtin_strnlen): Detect, avoid expanding
3219 and diagnose unterminated arrays.
3220 (c_strlen): Fill in offset of start of unterminated strings.
3221 * builtins.h (unterminated_array): Update prototype.
3222
3223 2018-10-02 Richard Biener <rguenther@suse.de>
3224
3225 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
3226 of haddv4df, first reduce to SSE width and exploit the fact
3227 that we only need element zero with the reduction result.
3228 (reduc_plus_scal_v2df): Likewise.
3229
3230 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3231
3232 * dojump.h (do_jump): Delete.
3233 (do_jump_1): Likewise.
3234 (split_comparison): Move around.
3235 * dojump.c (do_jump): Make static.
3236 (do_jump_1): Likewise.
3237 (jumpifnot): Move around.
3238 (jumpifnot_1): Likewise.
3239 (jumpif): Likewise.
3240 (jumpif_1): Likewise.
3241 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3242
3243 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3244
3245 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3246 insns in the delay slot and add_insn_after for the jump insn.
3247
3248 2018-10-02 Richard Biener <rguenther@suse.de>
3249
3250 * tree-inline.c (expand_call_inline): Use the location of
3251 the callee declaration for the inline-entry marker.
3252 * final.c (notice_source_line): Remove special-casing of
3253 NOTE_INSN_INLINE_ENTRY.
3254
3255 2018-10-01 Carl Love <cel@us.ibm.com>
3256
3257 PR 69431
3258 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3259 (__builtin_mtfsb0): New.
3260 (__builtin_mtfsb1): New.
3261 ( __builtin_set_fpscr_rn): New.
3262 (__builtin_set_fpscr_drn): New.
3263 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3264 (rs6000_expand_set_fpscr_rn_builtin): Add.
3265 (rs6000_expand_set_fpscr_drn_builtin): Add.
3266 (rs6000_expand_builtin): Add case statement entries for
3267 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3268 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3269 RS6000_BUILTIN_MFFSL.
3270 (rs6000_init_builtins): Add ftype initialization and def_builtin
3271 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3272 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3273 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3274 rs6000_mffscdrn): Add define_insn.
3275 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3276 * doc/extend.texi: Add documentation for the builtins.
3277
3278 2018-10-01 Richard Biener <rguenther@suse.de>
3279
3280 PR tree-optimization/87465
3281 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3282 causing branch miscounts.
3283
3284 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3285
3286 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3287 aarch64_option_default_param): New.
3288 (params.h): Include.
3289 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3290 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3291 stack-clash protection validation code.
3292
3293 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3294
3295 * params.c (validate_param): New.
3296 (add_params): Use it.
3297 (set_param_value): Refactor param validation into validate_param.
3298 (diagnostic.h): Include.
3299 * diagnostic.h (diagnostic_ready_p): New.
3300
3301 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3302
3303 * params.c (set_param_value):
3304 Add index of parameter being validated.
3305 * common/common-target.def (option_validate_param): New.
3306 * common/common-targhooks.h (default_option_validate_param): New.
3307 * common/common-targhooks.c (default_option_validate_param): New.
3308 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3309 * doc/tm.texi: Regenerate.
3310
3311 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3312
3313 PR target/86486
3314 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3315 Add validation for stack-clash parameters and set defaults.
3316
3317 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3318
3319 PR target/86486
3320 * configure.ac: Add stack-clash-protection-guard-size.
3321 * doc/install.texi: Document it.
3322 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3323 * params.def: Update comment for guard-size.
3324 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3325 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3326 * configure: Regenerate.
3327
3328 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3329
3330 PR target/86486
3331 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3332 STACK_DYNAMIC_OFFSET): New.
3333 * config/aarch64/aarch64.c (aarch64_layout_frame):
3334 Update outgoing args size.
3335 (aarch64_stack_clash_protection_alloca_probe_range,
3336 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3337
3338 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3339
3340 PR target/86486
3341 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3342 probe ranges.
3343 * target.def (stack_clash_protection_alloca_probe_range): New.
3344 (stack_clash_protection_final_dynamic_probe): Remove.
3345 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3346 (default_stack_clash_protection_final_dynamic_probe): Remove.
3347 * targhooks.c: Likewise.
3348 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3349 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3350 * doc/tm.texi: Regenerate.
3351
3352 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3353
3354 PR target/86486
3355 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3356 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3357 aarch64_clamp_to_uimm12_shift): New.
3358 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3359 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3360
3361 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3362
3363 PR target/86486
3364 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3365
3366 2018-10-01 Jeff Law <law@redhat.com>
3367 Richard Sandiford <richard.sandiford@linaro.org>
3368 Tamar Christina <tamar.christina@arm.com>
3369
3370 PR target/86486
3371 * config/aarch64/aarch64.md
3372 (probe_stack_range): Add k (SP) constraint.
3373 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3374 STACK_CLASH_MAX_UNROLL_PAGES): New.
3375 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3376 stack probes for stack clash.
3377 (aarch64_allocate_and_probe_stack_space): New.
3378 (aarch64_expand_prologue): Use it.
3379 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3380 (aarch64_sub_sp): Add emit_move_imm optional param.
3381
3382 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
3383
3384 PR tree-optimization/87261
3385 * match.pd: Remove trailing whitespace.
3386 Add (x & y) | ~(x | y) -> ~(x ^ y),
3387 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3388
3389 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3390
3391 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3392 constraints.
3393 (ashlsi3_insn): Update instruction constraints.
3394 (ashrsi3_insn): Likewise.
3395 (rotrsi3): Likewise.
3396 (add_shift): Likewise.
3397 * config/arc/constraints.md (Csz): New 32 bit constraint. It
3398 avoids placing in the limm field small constants which, otherwise,
3399 could end into a small instruction.
3400
3401 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3402
3403 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3404 destination register is not odd-even.
3405 (umaddsidi4_split): Likewise.
3406
3407 2018-10-01 Richard Biener <rguenther@suse.de>
3408
3409 * tree-inline.c (expand_call_inline): Store origin of fn
3410 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3411 * tree.c (block_ultimate_origin): Simplify and do some
3412 checking.
3413
3414 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
3415
3416 * config/i386/mmx.md (EMMS): New int iterator.
3417 (emms): New int attribute.
3418 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3419 EMMS int iterator. Explicitly declare clobbers.
3420 (mmx_emms): Remove expander.
3421 (mmx_femms): Ditto.
3422 * config/i386/predicates.md (emms_operation): Remove predicate.
3423 (vzeroall_pattern): New predicate.
3424 (vzeroupper_pattern): Rename from vzeroupper_operation.
3425 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3426 vzeroupper_pattern and vzeroall_pattern predicates.
3427
3428 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
3429
3430 PR rtl-optimization/86939
3431 * ira-lives.c (make_hard_regno_born): Rename from this...
3432 (make_hard_regno_live): ... to this. Remove update to conflict
3433 information. Update function comment.
3434 (make_hard_regno_dead): Add conflict information update. Update
3435 function comment.
3436 (make_object_born): Rename from this...
3437 (make_object_live): ... to this. Remove update to conflict information.
3438 Update function comment.
3439 (make_object_dead): Add conflict information update. Update function
3440 comment.
3441 (mark_pseudo_regno_live): Call make_object_live.
3442 (mark_pseudo_regno_subword_live): Likewise.
3443 (mark_hard_reg_dead): Update function comment.
3444 (mark_hard_reg_live): Call make_hard_regno_live.
3445 (process_bb_node_lives): Likewise.
3446 * lra-lives.c (make_hard_regno_born): Rename from this...
3447 (make_hard_regno_live): ... to this. Remove update to conflict
3448 information. Remove now uneeded check_pic_pseudo_p argument.
3449 Update function comment.
3450 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3451 to conflict information. Update function comment.
3452 (mark_pseudo_live): Remove update to conflict information. Update
3453 function comment.
3454 (mark_pseudo_dead): Add conflict information update.
3455 (mark_regno_live): Call make_hard_regno_live.
3456 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3457 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3458
3459 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3460
3461 PR target/87370
3462 * config/i386/i386.c (construct_container): Use TImode for
3463 BLKmode values in 2 integer registers.
3464
3465 2018-09-29 Jeff Law <law@redhat.com>
3466
3467 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3468 c_strlen rather than just a tree *.
3469 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3470 Update recursive calls appropriately. If caller did not provide a
3471 suitable data pointer, create a local one. When a non-terminated
3472 string is discovered, bubble up information about the string via the
3473 c_strlen_data object.
3474 * builtins.h (c_strlen): Update prototype.
3475 (c_strlen_data): New structure.
3476 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3477 For a type 2 call, if c_strlen indicates a non-terminated string
3478 use the length of the non-terminated string.
3479 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3480
3481 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR target/87467
3484 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3485 __m512d type for __A argument rather than __m512.
3486
3487 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3488
3489 * match.pd (simple_comparison): Don't optimize if either operand is
3490 a function pointer when target needs function pointer canonicalization.
3491
3492 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3493
3494 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3495 power5 .. power9 to remove indirection.
3496 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3497 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3498 ASM_CPU_476_SPEC): Delete.
3499 (ASM_CPU_SPEC): Adjust.
3500 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3501 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3502
3503 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3504
3505 * config.in: Delete HAVE_AS_DCI.
3506 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3507 * config/rs6000/rs6000.h: Ditto.
3508 * configure.ac: Delete HAVE_AS_DCI.
3509 * configure: Regenerate.
3510
3511 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3512
3513 * config.in (HAVE_AS_LWSYNC): Delete.
3514 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3515 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3516 do it as a .long .
3517 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3518 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3519 as a .long .
3520 * configure.ac: Delete HAVE_AS_LWSYNC.
3521 * configure: Regenerate.
3522
3523 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3524 Pierre-Marie de Rodat <derodat@adacore.com>
3525
3526 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3527 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3528 (cgraph_node::create_thunk): Add indirect_offset parameter.
3529 (thunk_adjust): Likewise.
3530 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3531 and initialize the corresponding field with it.
3532 (cgraph_node::dump): Dump indirect_offset field.
3533 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3534 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3535 (thunk_adjust): Add indirect_offset parameter and deal with it.
3536 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3537 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3538 or if the thunk is external or local. Fix formatting. Do not chain
3539 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3540 if any, in the GIMPLE representation.
3541 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3542 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3543 (input_node): Read indirect_offset field.
3544 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3545 call to thunk_adjust.
3546 * tree-nested.c (struct nesting_info): Add thunk_p field.
3547 (create_nesting_tree): Set it.
3548 (convert_all_function_calls): Copy static chain from targets to thunks.
3549 (finalize_nesting_tree_1): Return early for thunks.
3550 (unnest_nesting_tree_1): Do not finalize thunks.
3551 (gimplify_all_functions): Do not gimplify thunks.
3552
3553 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3554
3555 * opt-suggestions.c (option_proposer::build_option_suggestions):
3556 Release "option_values".
3557
3558 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3559
3560 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3561 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3562 * dumpfile.c (kind_as_string): New function.
3563 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3564 kind_as_string to vary the prefix based on dump_kind.
3565 (selftest::test_capture_of_dump_calls): Update for above.
3566
3567 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3568
3569 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3570 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3571
3572 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3573
3574 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3575 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3576 INVALID_REGNUM instead of FPSR_REG.
3577 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3578 * config/i386/i386.md: Update comment of FP compares.
3579 (fldenv): Do not clobber FPSR_REG.
3580
3581 2018-09-28 Richard Biener <rguenther@suse.de>
3582
3583 * tree.h (BLOCK_ORIGIN): New.
3584 * omp-expand.c (grid_expand_target_grid_body): Assign
3585 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3586 * tree-inline.c (remap_block): Likewise.
3587 * auto-profile.c (get_function_decl_from_block): Simplify
3588 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3589 * langhooks.c (lhd_print_error_function): Likewise.
3590 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3591 Likewise.
3592 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3593 * tree.c (block_nonartificial_location): Likewise.
3594 (block_ultimate_origin): Likewise.
3595 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3596 no longer needed LTO case.
3597
3598 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3599 Jan Hubicka <jh@suse.cz>
3600 Martin Jambor <mjambor@suse.cz>
3601
3602 * simplify-rtx.c (simplify_merge_mask): New function.
3603 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3604 same masks are used in op1 or op2.
3605 (test_vec_merge): New function.
3606 (test_vector_ops): Call test_vec_merge.
3607
3608 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3609
3610 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3611 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3612 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3613 (cypress_costs): Set it.
3614 (supersparc_costs): Likewise.
3615 (hypersparc_costs): Likewise.
3616 (leon_cost): Likewise.
3617 (leon3_costs): Likewise.
3618 (sparclet_costs): Likewise.
3619 (ultrasparc_costs): Likewise.
3620 (ultrasparc_costs): Likewise.
3621 (niagara_costs): Likewise.
3622 (niagara2_costs): Likewise.
3623 (niagara3_costs): Likewise.
3624 (niagara4_costs): Likewise.
3625 (niagara7_costs): Likewise.
3626 (m8_costs): Likewise.
3627 (TARGET_CAN_FOLLOW_JUMP): Define.
3628 (pass_work_around_errata::gate): Minor tweak.
3629 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3630 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3631 Automaitcally clear MASK_FSMULD mask for V7 processors.
3632 (sparc_can_follow_jump): New static function.
3633 (output_ubranch): Deal with CROSSING_JUMP_P.
3634 (sparc_use_sched_lookahead): Rewrite using switch statement.
3635 (sparc_issue_rate): Reorder.
3636 (sparc_branch_cost): New function.
3637
3638 2018-09-27 Martin Sebor <msebor@redhat.com>
3639
3640 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3641 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3642 (int_fits_type_p): Same.
3643
3644 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3645
3646 * config/i386/i386.md (FPCR_REG): Remove.
3647 (UNSPEC_FLDCW): Remove.
3648 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3649 (x86_fldcw_1): Remove insn pattern.
3650 (fnstenv): Do not clobber FPCR_REG.
3651 (fldenv): Ditto.
3652 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3653 (CALL_USED_REGISTERS): Ditto.
3654 (REG_ALLOC_ORDER): Ditto.
3655 (REG_CLASS_CONTENTS): Ditto.
3656 (HI_REGISTER_NAMES): Ditto.
3657 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3658 of numerical constants.
3659 * config/i386/i386.c (regclass_map): Remove fpsr register.
3660 (dbx_register_map): Ditto.
3661 (dbx64_register_map): Ditto.
3662 (svr4_dbx_register_map): Ditto.
3663 (print_reg): Do not handle FPCR_REG.
3664
3665 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3666
3667 PR target/87149
3668 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3669 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3670 Delete, always treat as true.
3671 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3672 Ditto. Simplify remaining code.
3673 * config/powerpcspe/powerpcspe.h: Ditto.
3674 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3675 Simplify remaining code.
3676 (rs6000_expand_builtin): Ditto.
3677 * config/rs6000/rs6000.h: Ditto.
3678 * configure.ac: Ditto.
3679 * configure: Regenerate.
3680
3681 2018-09-27 Martin Liska <mliska@suse.cz>
3682
3683 * coverage.c (get_coverage_counts): Revert the formatting
3684 of missing profile opt info.
3685
3686 2018-09-27 Richard Biener <rguenther@suse.de>
3687
3688 PR debug/37801
3689 PR debug/87440
3690 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3691 block as we do not output that.
3692 (gen_inlined_subroutine_die): Elide the originally outermost
3693 block, matching what we do for concrete instances.
3694 (decls_for_scope): Add parameter specifying whether to recurse
3695 to subblocks.
3696
3697 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3698 Tom de Vries <tom@codesourcery.com>
3699
3700 PR 82089
3701
3702 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3703 STORE_FLAG_VALUE == 1.
3704
3705 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3706
3707 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3708 constant definitions.
3709 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3710 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3711 ("speculation_barrier"): New expander definition.
3712
3713 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3714
3715 PR gcov-profile/86957
3716 * common.opt: New warning option -Wmissing-profile.
3717 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3718 * doc/invoke.texi: Document -Wmissing-profile.
3719
3720 2018-09-26 Jim Wilson <jimw@sifive.com>
3721
3722 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3723 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3724
3725 2018-09-26 Martin Sebor <msebor@redhat.com>
3726
3727 * tree.c (zerop): Change return type to bool.
3728 (integer_zerop, integer_onep, integer_each_onep): Same.
3729 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3730 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3731 (real_onep, real_minus_onep, chain_index): Same.
3732 (print_type_hash_statistics, type_list_equal): Same.
3733 * tree.h (zerop): Same.
3734 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3735 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3736 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3737 (real_onep, real_minus_onep, chain_index): Same.
3738 (print_type_hash_statistics, type_list_equal): Same.
3739
3740 2018-09-26 Jim Wilson <jimw@sifive.com>
3741
3742 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3743
3744 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3745
3746 PR target/87414
3747 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3748 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3749 call.
3750
3751 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3752
3753 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3754
3755 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3756
3757 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3758 and FP_SECOND_SSE_REGS.
3759 (REG_CLASS_NAMES): Ditto.
3760 (REG_CLASS_CONTENTS): Ditto.
3761 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3762 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3763 (ix86_preferred_output_reload_class): Ditto.
3764 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3765 clobber constraint to "=&f".
3766 (fix_truncdi_i387): Ditto.
3767 (lrintxfdi2): Ditto.
3768 (fistdi2_<rounding>): Ditto.
3769 (fpremxf4_i387): Change "=u" constraint to "=f".
3770 (fprem1xf4_i387): Ditto.
3771 (sincosxf3): Ditto.
3772 (fptanxf4_i387): Ditto.
3773 (fxtractxf3_i387): Ditto.
3774 (fscalexf4_i387): Ditto.
3775 (atan2xf3): Change "u" constraint to "f".
3776 (fyl2xxf3_i387): Ditto.
3777 (fyl2xp1xf3_i387): Ditto.
3778
3779 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3780
3781 PR target/87439
3782 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3783 for removed I387_MASK_PM entity.
3784
3785
3786 2018-09-26 Jeff Law <law@redhat.com>
3787 Revert
3788 2018-09-26 Alexey Neyman <stilor@att.net>
3789
3790 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3791 headers are no longer pulled in by <isl/val.h>.
3792
3793 2018-09-26 Richard Biener <rguenther@suse.de>
3794
3795 PR debug/87443
3796 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3797 or concrete instance DIE to the tree. Create abstract origin
3798 attributes also for concrete instances.
3799
3800 2018-09-26 Alexey Neyman <stilor@att.net>
3801
3802 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3803 headers are no longer pulled in by <isl/val.h>.
3804
3805 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3806
3807 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3808 Use new helper functions.
3809 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3810 Use new helper functions.
3811 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3812 aarch_mm_needs_release): New declarations.
3813 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3814 aarch_mm_needs_release): New.
3815
3816 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3817
3818 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3819 (arm32_output_mi_thunk): Deal with long calls.
3820
3821 2018-09-26 Richard Biener <rguenther@suse.de>
3822
3823 PR debug/87428
3824 PR debug/87362
3825 * tree-inline.c (expand_call_inline): When the location
3826 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3827 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3828 the inserted BLOCK to make inlined_function_outer_scope_p
3829 recognize it.
3830 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3831 coords for reserved locations.
3832
3833 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3834
3835 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3836 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3837 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3838 (*sibcall_nonlocal_sysv<mode>): Ditto.
3839 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3840 (<bd>_<mode>): Ditto.
3841 (<bd>tf_<mode>): Ditto.
3842
3843 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3844
3845 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3846 control string as a list of templates instead of as C code.
3847 (*altivec_movti): Ditto.
3848 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3849
3850 2018-09-25 Jim Wilson <jimw@sifive.com>
3851
3852 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3853 when target symbol is weak.
3854
3855 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3856
3857 PR c/87387
3858 * builtins.c (unterminated_array): Simplify.
3859 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3860 where pointer arithmetic is safe.
3861
3862 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3863
3864 PR target/86987
3865 * config/rs6000/altivec.md (altivec_vspltb): Use
3866 const_0_to_15_operand instead of u5bit_cint_operand.
3867 (*altivec_vspltb_internal): Ditto.
3868 (altivec_vspltb_direct): Ditto.
3869 (altivec_vsplth): Use const_0_to_7_operand instead of
3870 u5bit_cint_operand.
3871 (*altivec_vsplth_internal): Ditto.
3872 (altivec_vsplth_direct): Ditto.
3873 (altivec_vspltw): Use const_0_to_3_operand instead of
3874 u5bit_cint_operand.
3875 (*altivec_vspltw_internal): Ditto.
3876 (altivec_vspltw_direct): Ditto.
3877 (altivec_vspltsf): Ditto.
3878 (*altivec_vspltsf_internal): Ditto.
3879 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3880 various splats with the proper size immediate. Reorder the various
3881 cases by ascending size of immediate, and put all such together.
3882
3883 2018-09-25 Richard Biener <rguenther@suse.de>
3884
3885 PR debug/83941
3886 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3887 GC-ification.
3888 (maybe_create_die_with_external_ref): Do not create
3889 DW_TAG_imported_unit here.
3890 (add_abstract_origin_attribute): Handle external BLOCK refs.
3891 (dwarf2out_abstract_function): Simplify LTO case.
3892 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3893 rather than using maybe_create_die_with_external_ref.
3894
3895 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3896
3897 PR target/71278
3898 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3899 (frndintxf2_mask_pm_i387): Ditto.
3900 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3901 Enable for !flag_trapping_math.
3902 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3903 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3904 Change operand 1 predicate to nonimmediate_operand.
3905 (attr "i387_cw"): Remove mask_pm.
3906 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3907 (enum ix86_entity): Remove I387_MASK_PM.
3908 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3909 handle I387_MASK_PM.
3910 (ix86_mode_needed): Ditto.
3911 (ix86_mode_after): Ditto.
3912 (ix86_mode_entry): Ditto.
3913 (ix86_mode_exit): Ditto.
3914 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3915
3916 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3917
3918 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3919 to_update_switch_stmts to vNULL instead of calling create on them
3920 immediately.
3921
3922 2018-09-25 Richard Biener <rguenther@suse.de>
3923
3924 PR tree-optimization/87402
3925 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3926 (visit_phi): Re-instantiate handling of supposed to be VARYING
3927 but non-VARYING backedge value.
3928
3929 2018-09-25 Richard Biener <rguenther@suse.de>
3930
3931 PR debug/83941
3932 * dwarf2out.c (struct sym_off_pair): New.
3933 (external_die_map): New global.
3934 (lookup_decl_die): When in LTO create DIEs lazily from the
3935 external_die_map.
3936 (lookup_block_die): New function, create DIEs lazily in LTO.
3937 (equate_block_to_die): New function.
3938 (dwarf2out_die_ref_for_decl): During WPA get the association
3939 from the external DIE map.
3940 (dwarf2out_register_external_die): Record mapping into the
3941 external DIE map.
3942 (maybe_create_die_with_external_ref): New function split out from
3943 DIE generation part of old dwarf2out_register_external_die.
3944 (add_abstract_origin_attribute): Do not return the DIE. When
3945 in LTO reference externals directly.
3946 (dwarf2out_abstract_function): When in LTO ignore calls for
3947 decls with external DIEs (already present abstract instances).
3948 (gen_call_site_die): Adjust.
3949 (add_high_low_attributes): Likewise.
3950 (gen_lexical_block_die): Likewise.
3951 (gen_inlined_subroutine_die): Likewie.
3952 (gen_block_die): Likewise.
3953 (dwarf2out_inline_entry): Likewise.
3954 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3955 DIEs.
3956
3957 2018-09-25 Martin Liska <mliska@suse.cz>
3958
3959 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3960 integers and not by a float value.
3961
3962 2018-09-25 Martin Liska <mliska@suse.cz>
3963
3964 PR fortran/87394
3965 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3966 instead of NULL.
3967 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3968 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3969 * godump.c (go_format_type): Remove extra parenthesis.
3970
3971 2018-09-25 Martin Liska <mliska@suse.cz>
3972
3973 * alias.c (set_dest_equal_p): Remove unused function.
3974 * config/i386/i386.c (def_builtin_pure2): Likewise.
3975 * diagnostic-show-locus.c (class layout): Remove
3976 unused field.
3977 (layout::layout): Likewise here.
3978 * dump-context.h (class temp_dump_context): Likewise.
3979 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3980 (add_AT_loclistsptr): Likewise.
3981 (add_AT_offset): Likewise.
3982 (get_AT_hi_pc): Likewise.
3983 (is_comdat_die): Likewise.
3984 (type_is_enum): Likewise.
3985 (ceiling): Likewise.
3986 (add_AT_vms_delta): Likewise.
3987 (is_class_die): Likewise.
3988 * edit-context.c (class line_event): Remove unused field.
3989 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3990 unused function.
3991 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3992 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3993 (ok_for_base_p_nonstrict): Likewise.
3994 * tree-chrec.c (is_not_constant_evolution): Likewise.
3995 (chrec_fold_poly_cst): Likewise.
3996 * tree-if-conv.c (has_pred_critical_p): Likewise.
3997 * tree-ssa-coalesce.c (print_exprs): Likewise.
3998 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3999 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
4000 * tree-vrp.c (value_ranges_intersect_p): Likewise.
4001 (value_range_nonnegative_p): Likewise.
4002
4003 2018-09-25 Martin Liska <mliska@suse.cz>
4004
4005 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4006 Do not handle "GNU Pascal".
4007 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4008 Likewise.
4009 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
4010 from documentation. Likewise.
4011 * dbxout.c (dbxout_range_type): Likewise.
4012 * doc/cpp.texi: Likewise.
4013 * doc/extend.texi: Likewise.
4014 * doc/frontends.texi: Likewise.
4015 * doc/invoke.texi: Remove Pascal entry.
4016 * tree.def (CLEANUP_POINT_EXPR): Likewise.
4017 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
4018
4019 2018-09-25 Martin Liska <mliska@suse.cz>
4020
4021 PR middle-end/86078
4022 * doc/invoke.texi: Document all parameters and remove default
4023 of the parameters.
4024
4025 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
4026
4027 PR bootstrap/87417
4028 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
4029 contains HOST_WIDE_INTs when computing its size.
4030
4031 2018-09-24 Jim Wilson <jimw@sifive.com>
4032
4033 PR target/87391
4034 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
4035 not TARGET_RVE.
4036 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
4037
4038 2018-09-24 Andrew Pinski <apinski@marvell.com>
4039
4040 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
4041 access prev before checking it for NULLness in the
4042 AARCH64_FUSE_CMP_BRANCH case.
4043
4044 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
4045
4046 PR target/82699
4047 * config/i386/i386.c (rest_of_insert_endbranch): Set
4048 endbr_queued_at_entrance to true and don't insert ENDBR if
4049 x86_function_profiler will be called.
4050 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
4051 is true.
4052 * config/i386/i386.h (machine_function): Add
4053 endbr_queued_at_entrance.
4054
4055 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4056
4057 * genattrtab.c (mk_attr_alt): Use alternative_mask.
4058 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
4059 types.
4060 (check_attr_test): Use alternative_mask.
4061 (get_attr_value): Likewise.
4062 (compute_alternative_mask): Use alternative_mask and XWINT.
4063 (make_alternative_compare): Use alternative_mask.
4064 (attr_alt_subset_p): Use XWINT.
4065 (attr_alt_subset_of_compl_p): Likewise.
4066 (attr_alt_intersection): Use alternative_mask and XWINT.
4067 (attr_alt_union): Likewise.
4068 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
4069 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
4070 (simplify_test_exp): Use alternative_mask and XWINT.
4071 (write_test_expr): Use alternative_mask and XWINT, adjust bit
4072 number calculation to support 64 bits. Generate code that
4073 checks 64-bit masks.
4074 (main): Use alternative_mask.
4075 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
4076
4077 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4078
4079 PR target/80080
4080 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
4081 RETURN+USE when returning via %r14.
4082
4083 2018-09-24 Martin Liska <mliska@suse.cz>
4084
4085 * gcov.c (output_lines): Print colorization legend
4086 for both flag_use_colors and flag_use_hotness_colors.
4087 Reword the help.
4088
4089 2018-09-24 Martin Liska <mliska@suse.cz>
4090
4091 * coverage.c (get_coverage_counts): Use warning_at
4092 with current_function_decl location. Use %qD in warning
4093 message.
4094
4095 2018-09-24 Martin Liska <mliska@suse.cz>
4096
4097 * memory-block.h (memory_block_pool::release): Annotate with
4098 valgrind that the memory is not accessible.
4099
4100 2018-09-24 Martin Liska <mliska@suse.cz>
4101
4102 PR sanitizer/85774
4103 * asan.c: Make asan_handled_variables extern.
4104 * asan.h: Likewise.
4105 * cfgexpand.c (expand_stack_vars): Make sure
4106 a representative is unpoison if another
4107 variable in the partition is handled by
4108 use-after-scope sanitization.
4109
4110 2018-09-24 Richard Biener <rguenther@suse.de>
4111
4112 PR tree-optimization/63155
4113 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
4114 the worklist when the edge of the respective argument isn't
4115 executable.
4116
4117 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4118
4119 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
4120 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
4121 (MASK_CLASS_P): Update for rename.
4122 (MAYBE_MASK_CLASS_P): Ditto.
4123 (REG_CLASS_NAMES): Update.
4124 (REG_CLASS_CONTENT): Update.
4125 * config/i386/i386.c (regclass_map): Update for MASK_REG
4126 and ALL_MASK_REGS rename.
4127 * config/i386/constraints.md (Yk): Update for rename.
4128 (k): Ditto.
4129
4130 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4131
4132 * config/i386/i386.h (enum reg_class): Remove
4133 EVEX_SSE_REGS and MOD4_SSE_REGS.
4134 (REG_CLASS_NAMES): Update.
4135 (REG_CLASS_CONTENT): Update.
4136 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
4137 registers as ALL_SSE_REGS.
4138 (ix86_additional_allocno_class_p): Remove.
4139 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
4140 (ix86_register_priority): Lower priority of EVEX SSE registers.
4141 Use IN_RANGE macro where appropriate.
4142 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
4143 AVX-5124VNNIW checks.
4144 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
4145 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
4146 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
4147 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
4148 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
4149 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
4150 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
4151 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
4152 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
4153 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
4154 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
4155 * config/i386/constraints.md (Yh): Remove.
4156
4157 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4158
4159 * config/i386/i386.c (regclass_map): Declare integer REX registers
4160 as GENERAL_REGS.
4161
4162 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
4163
4164 * doc/service.texi (Service): Switch the fsf.org link to https.
4165
4166 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
4167
4168 PR target/86798
4169 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4170 Define to speculation_safe_value_not_needed.
4171
4172 2018-09-21 Florian Weimer <fweimer@redhat.com>
4173
4174 PR middle-end/81035
4175 * doc/extend.texi (Common Function Attributes): Mention that
4176 noreturn suppresses tail call optimization.
4177
4178 2018-09-21 Jeff Law <law@redhat.com>
4179
4180 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
4181 vr_values::cleanup_edges_and_switches.
4182 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
4183 vr_values class.
4184 (identify_jump_threads): Remove EDGE_IGNORE handling.
4185 (execute_vrp): Move handling of to_remove_edges and
4186 to_update_switch_stmts into vr_values class member functions.
4187 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
4188 (to_update_switch_stmts): Likewise.
4189 * vr-values.c: Include cfghooks.h.
4190 (vr_values::vr_values): Initialize to_remove_edges and
4191 to_update_switch_stmts.
4192 (vr_values::~vr_values): Verify to_remove_edges and
4193 to_update_switch_stmts are empty.
4194 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
4195 (vr_values::cleanup_edges_and_switches): New member function.
4196 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
4197 function. Add new data members.
4198
4199 2018-09-21 David Malcolm <dmalcolm@redhat.com>
4200
4201 PR tree-optimization/87309
4202 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
4203 calls with pflags and alt_flags.
4204 (selftest::test_capture_of_dump_calls): Add test of interaction of
4205 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
4206
4207 2018-09-21 Olivier Hainque <hainque@adacore.com>
4208
4209 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
4210
4211 2018-09-21 Olivier Hainque <hainque@adacore.com>
4212
4213 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
4214
4215 2018-09-21 Olivier Hainque <hainque@adacore.com>
4216
4217 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
4218 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
4219 (VXWORKS_LIBS_RTP): Minor reordering.
4220
4221 2018-09-21 Olivier Hainque <hainque@adacore.com>
4222
4223 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
4224 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
4225
4226 2018-09-21 Olivier Hainque <hainque@adacore.com>
4227
4228 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
4229 (PTRDIFF_TYPE): Likewise.
4230
4231 2018-09-21 Olivier Hainque <hainque@adacore.com>
4232
4233 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
4234 triplet, similar to support for VxWorks7.
4235 * config/vxworks-dummy.h: Provide a default definition
4236 of TARGET_VXWORKS64 to 0.
4237
4238 2018-09-21 Olivier Hainque <hainque@adacore.com>
4239
4240 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
4241 * config/vxworks-dummy.h: here.
4242
4243 2018-09-21 Olivier Hainque <hainque@adacore.com>
4244
4245 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4246
4247 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
4248 Bo Zhou <zbo.zhou@hisilicon.com>
4249
4250 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4251 * config/aarch64/aarch64-tune.md: Regenerated.
4252 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4253 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4254 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4255
4256 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
4257 Julian Brown <julian@codesourcery.com>
4258
4259 * builtins.c (get_builtin_sync_mem): Handle address spaces.
4260
4261 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4262
4263 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4264 if the call takes a static chain.
4265
4266 2018-09-21 Martin Liska <mliska@suse.cz>
4267
4268 * auto-profile.c (autofdo_source_profile::read): Do not
4269 set sum_all.
4270 (read_profile): Do not add working sets.
4271 (read_autofdo_file): Remove sum_all.
4272 (afdo_callsite_hot_enough_for_early_inline): Remove const
4273 qualifier.
4274 * coverage.c (struct counts_entry): Remove gcov_summary.
4275 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4276 do not support GCOV_TAG_PROGRAM_SUMMARY.
4277 (get_coverage_counts): Remove summary and expected
4278 arguments.
4279 * coverage.h (get_coverage_counts): Likewise.
4280 * doc/gcov-dump.texi: Remove -w option.
4281 * gcov-dump.c (dump_working_sets): Remove.
4282 (main): Do not support '-w' option.
4283 (print_usage): Likewise.
4284 (tag_summary): Likewise.
4285 * gcov-io.c (gcov_write_summary): Do not dump
4286 histogram.
4287 (gcov_read_summary): Likewise.
4288 (gcov_histo_index): Remove.
4289 (gcov_histogram_merge): Likewise.
4290 (compute_working_sets): Likewise.
4291 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4292 it not obsolete.
4293 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4294 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4295 (GCOV_HISTOGRAM_SIZE): Remove.
4296 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4297 (struct gcov_summary): Simplify rapidly just
4298 to runs and sum_max fields.
4299 (gcov_histo_index): Remove.
4300 (NUM_GCOV_WORKING_SETS): Likewise.
4301 (compute_working_sets): Likewise.
4302 * gcov-tool.c (print_overlap_usage_message): Remove
4303 trailing empty line.
4304 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4305 (output_lines): Remove program related line.
4306 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4307 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4308 histogram.
4309 (input_profile_summary): Do not read it.
4310 (merge_profile_summaries): And do not merge it.
4311 (input_symtab): Do not call removed function.
4312 * modulo-sched.c (sms_schedule): Do not print sum_max.
4313 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4314 removed when histogram method was invented.
4315 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4316 mode.
4317 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4318 GCOV coding style.
4319 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4320 and dump selected value.
4321 * profile.c (add_working_set): Remove.
4322 (get_working_sets): Likewise.
4323 (find_working_set): Likewise.
4324 (get_exec_counts): Do not work with working sets.
4325 (read_profile_edge_counts): Do not inform as sum_max is removed.
4326 (compute_branch_probabilities): Likewise.
4327 (compute_value_histograms): Remove argument for call of
4328 get_coverage_counts.
4329 * profile.h: Do not make gcov_summary const.
4330
4331 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
4332
4333 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4334
4335 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4336
4337 PR tree-optimization/86990
4338 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4339 Check that the entire merged store group is made of constants only for
4340 overlapping stores.
4341
4342 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
4343
4344 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4345 (VTABLE_VERIFICATION_SPEC): Likewise.
4346 (SANITIZER_EARLY_SPEC): Likewise.
4347 (SANITIZER_SPEC): Likewise.
4348 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4349 * doc/invoke.texi (Link Options): Document -r.
4350
4351 2018-09-20 Richard Biener <rguenther@suse.de>
4352
4353 PR middle-end/87054
4354 * gimplify.c (gimplify_expr): Retain alignment of
4355 addressable lvalue in dereference.
4356
4357 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
4358
4359 PR bootstrap/87013
4360 * configure.ac: Check for .loc is_stmt support.
4361 * configure, config.in: Rebuilt.
4362 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4363 if not supported.
4364
4365 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4366
4367 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4368 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4369 -misel=no.
4370
4371 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4372
4373 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4374 VECTOR_OTHER.
4375 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4376 case VECTOR_OTHER.
4377
4378 2018-09-20 Marek Polacek <polacek@redhat.com>
4379
4380 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4381
4382 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4383
4384 PR tree-optimization/87288
4385 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4386 into account when determining PEELING_FOR_NITERS.
4387
4388 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4389
4390 PR tree-optimization/86877
4391 * tree-vect-loop.c (vect_analyze_loop_2): Call
4392 vect_verify_datarefs_alignment.
4393
4394 2018-09-19 Marek Polacek <polacek@redhat.com>
4395
4396 * doc/invoke.texi: Document -Wclass-conversion.
4397
4398 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
4399
4400 * config/pa/pa.c (pa_adjust_priority): Delete.
4401 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4402
4403 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4404 (atomic_storehi): Likewise.
4405 (atomic_storesi): Likewise.
4406 (atomic_loaddi): Restore compare and swap exchange loop code.
4407
4408 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
4409
4410 PR rtl-optimization/86902
4411 * combine.c (try_combine): When changing the CC mode used, don't change
4412 an unrelated mode in other_insn to that new CC mode.
4413
4414 2018-09-19 David Malcolm <dmalcolm@redhat.com>
4415
4416 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4417 with %T in place of calls to dump_generic_expr.
4418 (prune_runtime_alias_test_list): Likewise.
4419 (create_runtime_alias_checks): Likewise.
4420 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4421 (vect_analyze_data_ref_dependence): Likewise.
4422 (vect_slp_analyze_data_ref_dependence): Likewise.
4423 (vect_record_base_alignment): Likewise. Use %G in place of call
4424 to dump_gimple_stmt.
4425 (vect_compute_data_ref_alignment): Likewise.
4426 (verify_data_ref_alignment): Likewise.
4427 (vect_find_same_alignment_drs): Likewise.
4428 (vect_analyze_group_access_1): Likewise.
4429 (vect_analyze_data_ref_accesses): Likewise.
4430 (dependence_distance_ge_vf): Likewise.
4431 (dump_lower_bound): Likewise.
4432 (vect_prune_runtime_alias_test_list): Likewise.
4433 (vect_find_stmt_data_reference): Likewise.
4434 (vect_analyze_data_refs): Likewise.
4435 (vect_create_addr_base_for_vector_ref): Likewise.
4436 (vect_create_data_ref_ptr): Likewise.
4437 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4438 (vect_can_advance_ivs_p): Likewise.
4439 (vect_update_ivs_after_vectorizer): Likewise.
4440 (vect_gen_prolog_loop_niters): Likewise.
4441 (vect_prepare_for_masked_peels): Likewise.
4442 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4443 (vect_determine_vectorization_factor): Likewise.
4444 (vect_is_simple_iv_evolution): Likewise.
4445 (vect_analyze_scalar_cycles_1): Likewise.
4446 (vect_analyze_loop_operations): Likewise.
4447 (report_vect_op): Likewise.
4448 (vect_is_slp_reduction): Likewise.
4449 (check_reduction_path): Likewise.
4450 (vect_is_simple_reduction): Likewise.
4451 (vect_create_epilog_for_reduction): Likewise.
4452 (vect_finalize_reduction:): Likewise.
4453 (vectorizable_induction): Likewise.
4454 (vect_transform_loop_stmt): Likewise.
4455 (vect_transform_loop): Likewise.
4456 (optimize_mask_stores): Likewise.
4457 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4458 (vect_split_statement): Likewise.
4459 (vect_recog_over_widening_pattern): Likewise.
4460 (vect_recog_average_pattern): Likewise.
4461 (vect_determine_min_output_precision_1): Likewise.
4462 (vect_determine_precisions_from_range): Likewise.
4463 (vect_determine_precisions_from_users): Likewise.
4464 (vect_mark_pattern_stmts): Likewise.
4465 (vect_pattern_recog_1): Likewise.
4466 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4467 (vect_record_max_nunits): Likewise.
4468 (vect_build_slp_tree_1): Likewise.
4469 (vect_build_slp_tree_2): Likewise.
4470 (vect_print_slp_tree): Likewise.
4471 (vect_analyze_slp_instance): Likewise.
4472 (vect_detect_hybrid_slp_stmts): Likewise.
4473 (vect_detect_hybrid_slp_1): Likewise.
4474 (vect_slp_analyze_operations): Likewise.
4475 (vect_slp_analyze_bb_1): Likewise.
4476 (vect_transform_slp_perm_load): Likewise.
4477 (vect_schedule_slp_instance): Likewise.
4478 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4479 (vect_mark_stmts_to_be_vectorized): Likewise.
4480 (vect_init_vector_1): Likewise.
4481 (vect_get_vec_def_for_operand): Likewise.
4482 (vect_finish_stmt_generation_1): Likewise.
4483 (vect_check_load_store_mask): Likewise.
4484 (vectorizable_call): Likewise.
4485 (vectorizable_conversion): Likewise.
4486 (vectorizable_operation): Likewise.
4487 (vectorizable_load): Likewise.
4488 (vect_analyze_stmt): Likewise.
4489 (vect_is_simple_use): Likewise.
4490 (vect_get_vector_types_for_stmt): Likewise.
4491 (vect_get_mask_type_for_stmt): Likewise.
4492 * tree-vectorizer.c (increase_alignment): Likewise.
4493
4494 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4495
4496 * doc/rtl.texi: Adjust vec_select description.
4497 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4498 non-constant selectors.
4499
4500 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4501
4502 * config/aarch64/aarch64-protos.h
4503 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4504 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4505 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4506 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4507 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4508 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4509 (AARCH64_ISA_RCPC8_4): New flag.
4510 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4511 to aarch64_offset_9bit_signed_unscaled_p.
4512 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4513 and use stlur.
4514 * config/aarch64/constraints.md (Ust): New constraint.
4515 * config/aarch64/predicates.md.
4516 (aarch64_9bit_offset_memory_operand): New predicate.
4517 (aarch64_rcpc_memory_operand): New predicate.
4518
4519 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4520
4521 PR rtl-optimization/87361
4522 * rtlanal.c (nonzero_bits1): Revert accidental change.
4523
4524 2018-09-19 Richard Biener <rguenther@suse.de>
4525
4526 PR tree-optimization/87349
4527 PR tree-optimization/87342
4528 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4529
4530 2018-09-18 Marek Polacek <polacek@redhat.com>
4531
4532 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4533 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4534
4535 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4536
4537 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4538
4539 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4540
4541 PR rtl-optimization/86882
4542 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4543
4544 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4545
4546 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4547 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4548
4549 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4550
4551 PR other/87353
4552 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4553
4554 2018-09-18 Richard Biener <rguenther@suse.de>
4555
4556 PR middle-end/63155
4557 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4558 (compute_samebase_partition_bases): Likewise.
4559 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4560 (gimple_can_coalesce_p): Simplify.
4561
4562 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4563
4564 Handle a library implementation of ffs calling __builtin_ffs.
4565 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4566 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4567 to __ffsdi2.
4568
4569 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4570
4571 * diagnostic-show-locus.c (class layout_range): Add field
4572 "m_original_idx".
4573 (layout_range::layout_range): Add "original_idx" param and use it
4574 to initialize new field.
4575 (make_range): Use 0 for original_idx.
4576 (layout::layout): Pass in index to calls to
4577 maybe_add_location_range.
4578 (layout::maybe_add_location_range): Add param "original_idx" and
4579 pass it on to layout_range.
4580 (layout::print_any_labels): Pass on range->m_original_idx to
4581 get_text call.
4582 (gcc_rich_location::add_location_if_nearby): Use 0 for
4583 original_idx.
4584 * gcc-rich-location.h (text_range_label::get_text): Update for new
4585 param.
4586 (range_label_for_type_mismatch::get_text): Likewise.
4587
4588 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4589
4590 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4591
4592 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4593
4594 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4595 format_string_diagnostic_t.
4596 (fmtwarn_n): Likewise.
4597 * substring-locations.c
4598 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4599 (format_warning_n_va): Convert to...
4600 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4601 (format_warning_va): Convert to...
4602 (format_string_diagnostic_t::emit_warning_va): ...this.
4603 (format_warning_at_substring): Convert to...
4604 (format_string_diagnostic_t::emit_warning): ...this.
4605 (format_warning_at_substring_n): Convert to...
4606 (format_string_diagnostic_t::emit_warning_n): ...this.
4607 * substring-locations.h (class format_string_diagnostic_t): New
4608 class.
4609 (format_warning_va): Convert to
4610 format_string_diagnostic_t::emit_warning_va.
4611 (format_warning_n_va): Convert to
4612 format_string_diagnostic_t::emit_warning_n_va.
4613 (format_warning_at_substring): Convert to
4614 format_string_diagnostic_t::emit_warning.
4615 (format_warning_at_substring_n): Convert to
4616 format_string_diagnostic_t::emit_warning_n.
4617
4618 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4619 Bernd Schmidt <bernds_cb1@t-online.de>
4620
4621 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4622 SImode args.
4623
4624 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4625
4626 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4627 operand 0 predicate to nonimmediate operand.
4628 (rint<mode>2_frndint): Remove insn pattern.
4629 (rint<mode>2): Change operand 1 predicate to general_operand.
4630 Extend operand 1 to XFmode and generate rintxf2 insn.
4631 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4632 Do not use X87MODEF mode macro.
4633 (frndintxf2_<rounding>_i387): Rename from
4634 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4635 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4636 to XFmode and generate significandxf3 insn.
4637
4638 2018-09-17 Richard Biener <rguenther@suse.de>
4639
4640 PR tree-optimization/87328
4641 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4642 visiting unexecutable backedges when not iterating.
4643 (do_rpo_vn): Mark all edges not executable even when not
4644 iterating.
4645
4646 2018-09-17 Martin Jambor <mjambor@suse.cz>
4647
4648 PR c/63886
4649 * doc/invoke.texi (Warning Options): Likewise.
4650
4651 2018-09-17 Richard Biener <rguenther@suse.de>
4652
4653 PR tree-optimization/87301
4654 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4655 clean EH info from leftover copy assignments.
4656
4657 2018-09-17 Martin Liska <mliska@suse.cz>
4658
4659 PR gcov-profile/85871
4660 * gcov.c (output_intermediate_file): Fix out of bounds
4661 access.
4662
4663 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4664
4665 * config/arc/arc.c: Object attributes for core4 not reflected
4666 correctly.
4667 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4668 core3).
4669
4670 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4671
4672 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4673
4674 2018-09-17 Martin Liska <mliska@suse.cz>
4675
4676 * doc/gcov.texi: Document new option --use-hotness-colors.
4677 * gcov.c (struct source_info): Declare new field.
4678 (source_info::source_info): Set default for maximum_count.
4679 (print_usage): Add new -q option.
4680 (process_args): Process it.
4681 (accumulate_line_info): Save src->maximum_count.
4682 (output_line_beginning): Make color line number if
4683 flag_use_hotness_colors is set.
4684 (output_line_details): Pass default argument value.
4685 (output_lines): Pass src->maximum_count.
4686
4687 2018-09-17 Martin Liska <mliska@suse.cz>
4688
4689 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4690 Use processor_names table.
4691 * config/i386/i386.c (ix86_default_align): Use
4692 processor_cost_table for alignment values.
4693 (ix86_option_override_internal): Use processor_names.
4694 (ix86_function_specific_print): Likewise.
4695 * config/i386/i386.h (struct processor_costs):
4696 Add alignment values.
4697 (struct ptt): Remove and replace with const char *.
4698 * config/i386/x86-tune-costs.h (struct processor_costs):
4699 Declare default alignments for all costs.
4700
4701 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4702
4703 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4704 symbolics or VR_VARYING ranges for ABS_EXPR.
4705 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4706 when range will wrap.
4707
4708 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4709
4710 PR middle-end/86864
4711 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4712 before and after a JUMP_TABLE_DATA.
4713
4714 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4715
4716 PR middle-end/87188
4717 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4718 when one operand is a function pointer. Use POINTER_TYPE_P and
4719 FUNC_OR_METHOD_TYPE_P.
4720 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4721 * fold-const.c (build_range_check): Likewise.
4722 * match.pd (simple_comparison): Likewise.
4723
4724 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4725
4726 PR c/82967
4727 * spellcheck.c (get_edit_distance_cutoff): New function.
4728 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4729 (selftest::test_get_edit_distance_one_way): ...this.
4730 (selftest::test_get_edit_distance_unit): Rename to...
4731 (selftest::test_get_edit_distance_both_ways): ...this.
4732 (selftest::test_edit_distances): Move tests to this new function,
4733 and test some more pairs of strings. Update for above renaming.
4734 (selftest::get_old_cutoff): New function.
4735 (selftest::test_get_edit_distance_cutoff): New function.
4736 (selftest::assert_suggested_for): New function.
4737 (ASSERT_SUGGESTED_FOR): New macro.
4738 (selftest::assert_not_suggested_for): New function.
4739 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4740 (selftest::test_suggestions): New function.
4741 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4742 tests to selftest::test_edit_distances and call it. Add calls to
4743 selftest::test_get_edit_distance_cutoff and
4744 selftest::test_suggestions.
4745 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4746 (best_match::consider): Replace hard-coded cutoff calculation with
4747 a call to...
4748 (best_match::get_cutoff): New declaration.
4749 (best_match::get_best_meaningful_candidate): Likewise.
4750
4751 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4752
4753 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4754
4755 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4756
4757 revert:
4758 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4759
4760 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4761 terminated string literal.
4762
4763 2018-09-14 Martin Sebor <msebor@redhat.com>
4764
4765 * builtins.c (unterminated_array): Handle ARRAY_REF.
4766 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4767 * builtins.h (unterminated_array): Declare extern.
4768 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4769 arrays.
4770 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4771 calls.
4772
4773 2018-09-14 Martin Sebor <msebor@redhat.com>
4774 Jeff Law <law@redhat.com>
4775
4776 * builtins.c (unterminated_array): New.
4777 (expand_builtin_strcpy): Adjust.
4778 (expand_builtin_strcpy_args): Detect unterminated arrays.
4779 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4780 unterminated arrays.
4781 * gimple-fold.h (get_maxval_strlen): Add argument.
4782 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4783
4784 * gimple-fold.c (get_range_strlen): Add argument.
4785 (get_maxval_strlen): Adjust.
4786 * gimple-fold.h (get_range_strlen): Add argument.
4787
4788 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4789
4790 * config/i386/movdirintrin.h: Fix copyright year.
4791
4792 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4793
4794 * reg-stack.c: Include regs.h.
4795 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4796 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4797 FIRST_STACK_REG, not DFmode.
4798 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4799 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4800 (change stack): Default register mode to the reg_raw_mode of
4801 FIRST_STACK_REG, not DFmode.
4802 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4803 (*swapxf): Rename from swapxf.
4804
4805 2018-09-14 Carl Love <cel@us.ibm.com>
4806
4807 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4808 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4809
4810 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4811
4812 PR target/87224
4813 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4814 alternatives.
4815
4816 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4817
4818 PR target/85628
4819 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4820
4821 2018-09-14 Jason Merrill <jason@redhat.com>
4822
4823 Fix --enable-gather-detailed-mem-stats.
4824 * hash-table.c (hash_table_usage): Change from variable to function.
4825 * hash-table.h: Adjust.
4826 * Makefile.in: Add missing dependencies on hash-table.h.
4827
4828 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4829
4830 PR tree-optimization/87259
4831 PR lto/87283
4832 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4833 execute_cse_reciprocals_1 has tried transforming.
4834
4835 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4836
4837 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4838 VR_VARYING for PLUS/MINUS_EXPR.
4839
4840 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4841
4842 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4843 formatting.
4844
4845 2018-09-14 Richard Biener <rguenther@suse.de>
4846
4847 PR middle-end/63155
4848 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4849 bits for the merged partition.
4850
4851 2018-09-13 Martin Sebor <msebor@redhat.com>
4852 Bernd Edlinger <bernd.edlinger@hotmail.de>
4853
4854 * builtins.h (c_srlen): Add argument.
4855 * builtins.c (warn_string_no_nul): New function.
4856 (c_strlen): Add argument and use it. Update recursive calls.
4857 Pass DECL argument to string_constant to get info on non
4858 terminated strings. Update *NONSTR as needed.
4859 (fold_builtin_strlen): Add argument to calls to c_strlen.
4860 Warn for unterminated arrays.
4861 (warn_string_no_null): Add prototype.
4862 * expr.c (string_constant): Update arguments. Update recursive
4863 calls appropriately. Detect missing NUL terminator and outermost
4864 declaration its missing in.
4865 Improve checks for arrays with nonzero lower bound or elements
4866 that are not a single byte. Simplify offset computation.
4867 Simplify checks for non-NUL terminated strings.
4868 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4869 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4870
4871 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4872
4873 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4874 correctly.
4875 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4876 argument. Fix range checks.
4877 * fold-const.h (c_getstr): Adjust protoype.
4878 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4879 string is constant but contains no NUL byte.
4880
4881 * expr.c (string_constant): Adjust function comment.
4882 Remove bogus check for zero termination.
4883
4884 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4885
4886 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4887 (get_constant_size): Don't make STRING_CSTs larger than they are.
4888 (check_string_literal): New check function for STRING_CSTs.
4889 (output_constant): Use it.
4890
4891 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4892
4893 PR target/86812
4894 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4895
4896 2018-09-13 Richard Biener <rguenther@suse.de>
4897
4898 PR tree-optimization/87263
4899 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4900 (struct unwind_state): Add max_rpo field.
4901 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4902 Compute max_rpo, the max RPO number a block can be backwards reached
4903 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4904 separating it from the iterating mode.
4905
4906 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4907
4908 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4909 (rfs_decision): New scheduling decision.
4910
4911 2018-09-13 Richard Biener <rguenther@suse.de>
4912
4913 PR bootstrap/87134
4914 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4915 (vn_nary_op_insert_pieces_predicated): Do not write useless
4916 valid_dominated_by_p entry outside of the allocated storage.
4917
4918 2018-09-13 Omar Sandoval <osandov@osandov.com>
4919 Tom de Vries <tdevries@suse.de>
4920
4921 PR debug/86985
4922 * dwarf2out.c (is_c): New function.
4923 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4924
4925 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4926
4927 PR target/85628
4928 * config/aarch64/aarch64.md (*aarch64_bfxil):
4929 Define.
4930 * config/aarch64/constraints.md (Ulc): Define.
4931 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4932 Define.
4933 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4934 New function.
4935
4936 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4937
4938 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4939 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4940 aarch64_layout_frame call.
4941 (aarch64_expand_epilogue): Likewise.
4942 (aarch64_initial_elimination_offset): Likewise.
4943 (aarch64_get_separate_components): Likewise.
4944 (aarch64_use_return_insn_p): Likewise.
4945 (aarch64_layout_frame): Remove unneeded check.
4946
4947 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4948
4949 * configure.ac: Only append
4950 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4951 gcc_config_arguments if it was never reconfigured or last reconfigure
4952 was with different arguments.
4953 * configure: Regenerated.
4954
4955 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4956 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4957
4958 PR middle-end/87290
4959 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4960 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4961
4962 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4963
4964 PR tree-optimization/87287
4965 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4966 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4967 * match.pd (X % C == 0): ... here. New optimization.
4968
4969 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4970
4971 PR middle-end/82853
4972 * expr.h (maybe_optimize_mod_cmp): Declare.
4973 * expr.c (mod_inv): New function.
4974 (maybe_optimize_mod_cmp): New function.
4975 (do_store_flag): Use it.
4976 * cfgexpand.c (expand_gimple_cond): Likewise.
4977
4978 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4979 Julian Brown <julian@codesourcery.com>
4980
4981 PR middle-end/86336
4982 * gimplify.c (gimplify_scan_omp_clauses): Set
4983 target_firstprivatize_array_bases in OpenACC parallel and kernels
4984 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4985 OpenACC data regions.
4986
4987 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4988
4989 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4990 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4991
4992 2018-09-12 Richard Biener <rguenther@suse.de>
4993
4994 PR tree-optimization/87280
4995 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4996 edge but unreachable target.
4997 (do_rpo_vn): For conservatively handling a PHI only mark
4998 the backedge executable but not the block reachable.
4999
5000 2018-09-12 Richard Biener <rguenther@suse.de>
5001
5002 PR tree-optimization/87266
5003 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
5004 visited blocks.
5005
5006 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
5007
5008 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
5009 constants.
5010 ("trunc<BFP:mode><DFP_ALL:mode>2")
5011 ("trunc<DFP_ALL:mode><BFP:mode>2")
5012 ("extend<BFP:mode><DFP_ALL:mode>2")
5013 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
5014 according to the target operand type.
5015
5016 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5017 Andreas Krebbel <krebbel@linux.ibm.com>
5018
5019 PR tree-optimization/86844
5020 * gimple-ssa-store-merging.c
5021 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
5022 there are any overlapping stores in between them, make sure they are
5023 also coalesced or we give up completely.
5024
5025 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5026
5027 PR middle-end/87248
5028 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
5029 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
5030
5031 2018-09-12 Tom de Vries <tdevries@suse.de>
5032
5033 * common.opt (gdescribe-dies): Add option.
5034 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
5035 attribute for artifical and nameless decls.
5036 (dwarf2out_register_external_die): Add description attribute to
5037 external reference die.
5038 (add_desc_attribute): New functions.
5039 (gen_subprogram_die): Add description attribute to
5040 DW_TAG_call_site_parameter.
5041 * tree-pretty-print.c (print_generic_expr_to_str): New function.
5042 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
5043 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
5044 -gno-describe-dies.
5045 (@item -gdescribe-dies): Add.
5046
5047 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5048
5049 * tree-vrp.c (vrp_shift_undefined_p): Remove.
5050 (extract_range_from_binary_expr_1: Call
5051 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
5052 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
5053 depend on sign.
5054
5055 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5056
5057 * gimple-ssa-warn-alloca.c
5058 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
5059 field for ALLOCA_BOUND_*_LARGE.
5060
5061 2018-09-11 Nathan Sidwell <nathan@acm.org>
5062
5063 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
5064
5065 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5066
5067 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
5068 for clobbers. Remove obsolete comment.
5069
5070 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5071
5072 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
5073 mpxchk, mpxld and mpxst types.
5074 (define_attr length_immediate): Remove all processing of mpx types.
5075 (define_attr prefix_0f): Ditto.
5076 (define_attr memory): Ditto.
5077
5078 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5079
5080 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
5081 (log<mode>2): Change operand 1 predicate to general_operand.
5082 Extend operand 1 to XFmode and generate logxf3 insn.
5083 (log10<mode>2): Change operand 1 predicate to general_operand.
5084 Extend operand 1 to XFmode and generate log10xf3 insn.
5085 (log2<mode>2): Change operand 1 predicate to general_operand.
5086 Extend operand 1 to XFmode and generate log2xf3 insn.
5087 (fyl2xp1_extend<mode>xf3_i387): Remove.
5088 (log1p<mode>2): Change operand 1 predicate to general_operand.
5089 Extend operand 1 to XFmode and generate log1pxf3 insn.
5090 (fxtract_extend<mode>xf3_i387): Remove.
5091 (logb<mode>2): Change operand 1 predicate to general_operand.
5092 Extend operand 1 to XFmode and generate logbxf3 insn.
5093 (ilogb<mode>2): Change operand 1 predicate to general_operand.
5094 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
5095 (significand<mode>2): Change operand 1 predicate to general_operand.
5096 Extend operand 1 to XFmode and generate significandxf3 insn.
5097
5098 2018-09-11 Nathan Sidwell <nathan@acm.org>
5099
5100 * gcc.c (perror_with_name, pfatal_with_name): Delete.
5101 (load_specs): Use fatal_error.
5102 (DELETE_IF_ORDINARY, process_command): Use error.
5103 (execute, run_attempt): Use fatal_error.
5104
5105 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
5106
5107 * diagnostic-core.h (sorry_at): New prototype.
5108 * diagnostic.c (sorry_at): New function.
5109
5110 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
5111
5112 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
5113 by zero as VR_UNDEFINED.
5114
5115 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5116
5117 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
5118 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
5119 (<sincos>mode2): New expander.
5120 (sincos_extend<mode>xf3_i387): Remove insn pattern.
5121 (sincos -> sin, cos splitters): Remove splitter patterns.
5122 (sincos<mode>3): Change operand 2 predicate to general_operand.
5123 Extend operand 2 to XFmode and generate sincosxf3 insn.
5124 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
5125 Change operand 3 predicate to const1_operand.
5126 (fptan_extend<mode>xf4_i387): Remove insn pattern.
5127 (tanxf2): Update operands in the call to fptanxf4_i387.
5128 (tan<mode>2): Change operand 1 predicate to general_operand.
5129 Extend operand 1 to XFmode and generate tanxf3 insn.
5130 (atan2xf3): Rename from *fpatanxf3_i387.
5131 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
5132 (atan2xf3): Remove expander.
5133 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
5134 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
5135 (atan<mode>2): Change operand 1 predicate to general_operand.
5136 Extend operand 1 to XFmode and generate atanxf3 insn.
5137
5138 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5139
5140 * config/i386/i386.md (x87/SSE constant load splitter): Use
5141 memory_operand instead of nonimmediate_operand for input operand
5142 predicate.
5143
5144 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
5145
5146 * config/i386/i386.md (float partial SSE register stall splitter): Move
5147 splitter near its instruction pattern.
5148 (float_extend partial SSE register stall splitter): Ditto.
5149 (float_truncate partial SSE register stall splitter): Ditto.
5150
5151 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
5152
5153 PR target/86794
5154 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5155 to speculation_safe_value_not_needed.
5156
5157 PR target/85666
5158 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
5159 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
5160 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
5161 leaf_function_p, instead use has_hard_reg_initial_val.
5162
5163 2018-09-09 Nathan Sidwell <nathan@acm.org>
5164
5165 * gcc.h (pfatal_with_name): Don't declare here.
5166 * gcc.c (pfatal_with_name): Make static.
5167
5168 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
5169
5170 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
5171 earlyclobber.
5172
5173 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
5174
5175 PR rtl-optimization/85458
5176 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
5177 priority hook to reduce the priority of EXPR.
5178
5179 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
5180
5181 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
5182 DImode for x87 on 32bit targets. Conditionally disable x87 modes
5183 with X87_ENABLE_FLOAT. Remove preparation code.
5184 (*float<SWI48:mode><MODEF:mode>2): Rename from
5185 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
5186 math using "enabled" attribute.
5187 (*floatdi<MODEF:mode>2_i387): Rename from
5188 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
5189 enable for 32bit targets only.
5190 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
5191 splitter.
5192 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
5193 as operand 1 predicate. Rewrite as define_insn_and_split.
5194 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
5195
5196 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5197
5198 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
5199 to fallthru to FLOAT case.
5200
5201 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5202
5203 PR target/86731
5204 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
5205 around folding of vec_sl to handle out of range shift values.
5206
5207 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5208
5209 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
5210 Update callers to gen_fix_trunc<mode>_i387_fisttp
5211 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
5212 nonimmediate_operand.
5213 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
5214 and corresponding splitters.
5215 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
5216 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
5217 (fix_truncdi_i387_with_temp): Remove insn pattern
5218 and corresponding splitters.
5219 (fix_trunc<mode>_i387): Change operand 0 predicate to
5220 nonimmediate_operand.
5221 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
5222 and corresponding splitters.
5223 (*fistdi2_1): Remove.
5224 (fistdi2): Ditto.
5225 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
5226 (lrintxfdi2): Remove expander. Reimplement as define_insn.
5227 (*fist<mode>2_1): Remove.
5228 (fist<mode>2): Ditto.
5229 (fist<mode>2_with_temp): Remove insn pattern and corresponding
5230 splitters.
5231 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
5232 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
5233 (fistdi2_<rounding>): Change operand 0 predicate to
5234 nonimmediate_operand.
5235 (fistdi2_<rounding>_with_temp): Remove insn pattern
5236 and corresponding splitters.
5237 (fist<mode>2_<rounding>): Change operand 0 predicate to
5238 nonimmediate_operand.
5239 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
5240 and corresponding splitters.
5241
5242 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5243
5244 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5245
5246 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5247 the init value.
5248
5249 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5250
5251 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5252 early gimple folding of vec_splat().
5253 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5254 * gimple-fold.h: Add an extern define for tree_vec_extract().
5255
5256 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5257
5258 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5259 wrappers around TREE_TYPE comparisons.
5260
5261 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5262
5263 PR target/80080
5264 * config/s390/predicates.md: Add nonsym_memory_operand.
5265 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5266 contains a SYMBOL_REF, load it into an intermediate pseudo.
5267 (s390_emit_compare_and_swap): Legitimize operand.
5268 * config/s390/s390.md: Use the new nonsym_memory_operand
5269 with UNSPECV_CAS patterns.
5270
5271 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5272
5273 PR target/80080
5274 * config/s390/s390-passes.def: New file.
5275 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5276 declaration.
5277 (make_pass_s390_early_mach): Add declaration.
5278 * config/s390/s390.c (make_pass_s390_early_mach):
5279 (s390_option_override): Remove dynamic registration.
5280 * config/s390/t-s390: Add s390-passes.def.
5281
5282 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5283
5284 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5285 Remove UNSPEC_LTREL_BASE check.
5286 (annotate_constant_pool_refs): Likewise.
5287 (find_constant_pool_ref): Likewise.
5288 (find_ltrel_base): Removed.
5289 (replace_ltrel_base): Removed.
5290 (s390_mainpool_finish): Remove replace_ltrel_base call.
5291 (s390_chunkify_start): Remove pending LTREL_BASE logic.
5292 (s390_chunkify_finish): Remove replace_ltrel_base call.
5293 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5294
5295 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
5296
5297 PR target/86779
5298 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5299 to speculation_safe_value_not_needed.
5300
5301 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
5302 Bernd Schmidt <bernds_cb1@t-online.de>
5303
5304 * config/nvptx/nvptx-opts.h: New file.
5305 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5306 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5307 (ASM_SPEC): Define.
5308 (TARGET_SM35): New macro.
5309 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5310 correct predicate.
5311 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5312 values.
5313 (misa=): New option.
5314 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5315
5316 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
5317
5318 * config/i386/i386.md (truncdfsf2): Remove expander.
5319 (truncdfsf2_with_temp): Ditto.
5320 (truncxf<mode>2): Ditto.
5321 (*truncdfsf_fast_mixed): Remove insn pattern.
5322 (*truncdfsf_fast_i387): Ditto.
5323 (*truncdfsf_mixed): Ditto.
5324 (*truncdfsf_i387): Ditto.
5325 (*truncdfsf2_i387_1): Ditto.
5326 (*truncxfsf2_mixed): Ditto.
5327 (*truncxfdf2_mixed): Ditto.
5328 (*truncxf<mode>2_i387_noop): Ditto. Update callers
5329 to call gen_truncxf<mode>2 instead.
5330 (*truncxf<mode>2_i387): Remove.
5331 (reg->reg splitters): Remove splitter pattern.
5332 (reg->mem splitters): Ditto.
5333
5334 (truncdfsf2): New insn pattern.
5335 (truncxf<mode>2): Ditto.
5336
5337 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5338
5339 * tree-ssa-math-opts.c (is_mult_by): New function.
5340 (is_square_of): Use the above.
5341 (optimize_recip_sqrt): New function.
5342 (pass_cse_reciprocals::execute): Use the above.
5343
5344 2018-09-05 Richard Biener <rguenther@suse.de>
5345
5346 PR bootstrap/87134
5347 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5348 to zero-init the emplaced vec.
5349
5350 2018-09-05 Martin Liska <mliska@suse.cz>
5351
5352 PR tree-optimization/87205
5353 * tree-switch-conversion.c (pass_lower_switch::execute):
5354 Group cases for switch statements.
5355
5356 2018-09-05 Richard Biener <rguenther@suse.de>
5357
5358 PR tree-optimization/87217
5359 * tree-ssa-sccvn.c (vuse_valueize): New.
5360 (vn_reference_lookup_pieces): Use it.
5361 (vn_reference_lookup): Likewise.
5362
5363 2018-09-05 Nathan Sidwell <nathan@acm.org>
5364
5365 PR c++/87137
5366 * stor-layout.c (place_field): Scan forwards to check last
5367 bitfield when ms_bitfield_placement is in effect.
5368
5369 2018-09-05 Richard Biener <rguenther@suse.de>
5370
5371 PR bootstrap/87225
5372 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5373 return.
5374
5375 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
5376 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5377
5378 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5379 * config.gcc (extra_objs): Build it.
5380 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5381 Likewise.
5382 * config/aarch64/aarch64-passes.def
5383 (pass_tag_collision_avoidance): New pass.
5384 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5385 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5386 (aarch64_classify_address): Remove static qualifier.
5387 (aarch64_address_info, aarch64_address_type): Move to...
5388 * config/aarch64/aarch64-protos.h: ... here.
5389 (make_pass_tag_collision_avoidance): New function.
5390 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5391 New tuning flag.
5392
5393 2018-09-05 Martin Liska <mliska@suse.cz>
5394
5395 * doc/gcov.texi: Update documentation of humar
5396 readable mode.
5397 * gcov.c (format_count): Print one decimal place, it provides
5398 more fine number of situations like '1G' vs. '1.4G'.
5399
5400 2018-09-05 Martin Liska <mliska@suse.cz>
5401
5402 PR target/87164
5403 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5404 * optc-gen.awk: Allow 'Var' for Deprecated options in order
5405 to generate a MASK value.
5406
5407 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
5408
5409 PR debug/86593
5410 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5411 if frame pointer isn't used.
5412 (compute_frame_pointer_to_fb_displacement): Likewise.
5413
5414 2018-09-04 Jakub Jelinek <jakub@redhat.com>
5415
5416 PR target/87198
5417 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5418 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5419 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5420 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5421 and OPTION_MASK_ISA_XSAVEC_UNSET.
5422
5423 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
5424
5425 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5426 XOR operations in NAND case.
5427
5428 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5429
5430 * wide-int-range.cc (wide_int_range_convert): New.
5431 * wide-int-range.h (wide_int_range_convert): New.
5432 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5433 code into wide_int_range_convert.
5434 (extract_range_into_wide_ints): Do not munge anti range constants
5435 into the entire domain. Just return the range back.
5436
5437 2018-09-04 Martin Liska <mliska@suse.cz>
5438
5439 * genmatch.c (output_line_directive): Add new argument
5440 fnargs.
5441 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5442
5443 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5444
5445 * doc/invoke.texi (Option Summary): Add whitespace.
5446
5447 * doc/invoke.texi (Option Summary): Add -Waligned-new.
5448
5449 2018-09-04 Richard Biener <rguenther@suse.de>
5450
5451 PR tree-optimization/87211
5452 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5453 backedge value we're supposed to treat as VARYING also number
5454 the PHI to VARYING in case it got a different value-number already.
5455
5456 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5457
5458 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5459 (extract_range_from_binary_expr_1): Do not call
5460 vrp_can_optimize_bit_op.
5461 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5462 static.
5463 (wide_int_range_get_mask_and_bounds): New.
5464 (wide_int_range_optimize_bit_op): New.
5465 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5466 (wide_int_range_bit_and): Same.
5467 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5468 (wide_int_range_optimize_bit_op): New.
5469 (wide_int_range_get_mask_and_bounds): New.
5470
5471 2018-09-04 Richard Biener <rguenther@suse.de>
5472
5473 PR tree-optimization/87176
5474 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5475 variable. When value-numbering a virtual PHI node make sure
5476 to not value-number to the backedge value.
5477
5478 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5479
5480 * doc/extend.texi (Long Long, Hex Floats): Document support for
5481 long long and hex floats in more recent versions of ISO C++.
5482
5483 2018-09-03 Richard Biener <rguenther@suse.de>
5484
5485 PR tree-optimization/87177
5486 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5487 cleanup.
5488
5489 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5490
5491 * bb-reorder.c (edge_order): Convert to C-qsort-style
5492 tri-state comparator.
5493 (reorder_basic_blocks_simple): Change std::stable_sort to
5494 gcc_stablesort.
5495
5496 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5497
5498 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5499 tri-state comparator.
5500 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5501
5502 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5503
5504 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5505 (mergesort): ... here as maximum count for using netsort.
5506 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5507 (gcc_stablesort): New.
5508 * system.h (gcc_stablesort): Declare.
5509
5510 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5511
5512 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5513 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5514 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5515
5516 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5517
5518 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5519 lxsdx and stxsdx alternatives.
5520 (*mov<mode>_hardfloat64): Ditto.
5521 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5522
5523 2018-09-03 Richard Biener <rguenther@suse.de>
5524
5525 PR tree-optimization/87200
5526 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5527 simplify result.
5528
5529 2018-09-03 Martin Liska <mliska@suse.cz>
5530
5531 PR tree-optimization/87201
5532 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5533 Fix parenthesis in an expression.
5534
5535 2018-09-03 Richard Biener <rguenther@suse.de>
5536
5537 PR tree-optimization/87197
5538 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5539 visited. CSE the VN_INFO hashtable lookup.
5540
5541 PR tree-optimization/87169
5542 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5543 iterating make sure there's no extra backedges from irreducible
5544 regions feeding the header. Mark the destination block
5545 executable.
5546
5547 2018-09-03 Martin Liska <mliska@suse.cz>
5548
5549 PR driver/83193
5550 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5551 * common/common-targhooks.c (default_get_valid_option_values):
5552 New function.
5553 * common/common-targhooks.h (default_get_valid_option_values):
5554 Likewise.
5555 * common/config/i386/i386-common.c: Move processor_target_table
5556 from i386.c.
5557 (ix86_get_valid_option_values): New function.
5558 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5559 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5560 (PTA_*): Move all defined masks into i386-common.c.
5561 (ix86_function_specific_restore): Use new processor_cost_table.
5562 * config/i386/i386.h (struct ptt): Moved from i386.c.
5563 (struct pta): Likewise.
5564 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5565 * doc/tm.texi.in: Likewise.
5566 * opt-suggestions.c (option_proposer::suggest_option):
5567 Pass prefix to build_option_suggestions.
5568 (option_proposer::get_completions): Likewise.
5569 (option_proposer::build_option_suggestions): Use the new target
5570 hook.
5571 * opts.c (struct option_help_tuple): New struct.
5572 (print_filtered_help): Use the new target hook.
5573
5574 2018-09-03 Martin Liska <mliska@suse.cz>
5575
5576 PR middle-end/59521
5577 * predict.c (set_even_probabilities): Add likely_edges
5578 argument and handle cases where we have precisely one
5579 likely edge.
5580 (combine_predictions_for_bb): Catch also likely_edges.
5581 (tree_predict_by_opcode): Handle gswitch statements.
5582 * tree-cfg.h (find_case_label_for_value): New declaration.
5583 (find_taken_edge_switch_expr): Likewise.
5584 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5585 Find pivot in decision tree based on probabily, not by number of
5586 nodes.
5587
5588 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5589
5590 * doc/standards.texi (Standards): Update Objective-C reference.
5591
5592 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5593
5594 * doc/install.texi (Prerequisites): Update link for MPC.
5595
5596 2018-09-01 Michael Matz <matz@suse.de>
5597
5598 PR tree-optimization/87074
5599 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5600 PHIs for outer-loop uses.
5601
5602 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5603
5604 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5605 * doc/invoke.texi (C Dialect Options): Ditto.
5606
5607 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5608
5609 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5610
5611 2018-08-31 Richard Biener <rguenther@suse.de>
5612
5613 PR tree-optimization/87168
5614 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5615 (rpo_elim::eliminate_avail): When OP was not visited it must
5616 be available.
5617
5618 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5619
5620 * tree-vrp.c (copy_value_range): Convert param "from" from
5621 "value_range *" to "const value_range *".
5622 (range_is_null): Likewise for param "vr".
5623 (range_int_cst_p): Likewise.
5624 (range_int_cst_singleton_p): Likewise.
5625 (symbolic_range_p): Likewise.
5626 (value_ranges_intersect_p): Likewise for both params.
5627 (value_range_nonnegative_p): Likewise for param "vr".
5628 (value_range_constant_singleton): Likewise.
5629 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5630 (extract_range_into_wide_ints): Likewise for param "vr".
5631 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5632 and "vr1".
5633 (vrp_can_optimize_bit_op): Likewise.
5634 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5635 "vr1_".
5636 (extract_range_from_unary_expr): Likewise.
5637 (debug_value_range): Likewise for param "vr".
5638 (value_range::dump): Add "const" qualifier.
5639 (vrp_prop::check_array_ref): Convert local "vr" from
5640 "value_range *" to "const value_range *".
5641 (vrp_prop::check_mem_ref): Likewise.
5642 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5643 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5644 (vrp_intersect_ranges): Likewise.
5645 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5646 (vrp_prop::vrp_finalize): Likewise.
5647 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5648 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5649 (extract_range_from_unary_expr): Likewise.
5650 (value_range_constant_singleton): Likewise.
5651 (symbolic_range_p): Likewise.
5652 (copy_value_range): Likewise.
5653 (extract_range_from_binary_expr_1): Likewise.
5654 (range_int_cst_p): Likewise.
5655 (vrp_set_zero_nonzero_bits): Likewise.
5656 (range_int_cst_singleton_p): Likewise.
5657
5658 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5659
5660 * config/aarch64/arm_neon.h (vabsd_s64): New.
5661 (vnegd_s64): Likewise.
5662
5663 2018-08-31 Martin Jambor <mjambor@suse.cz>
5664
5665 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5666
5667 2018-08-31 Martin Liska <mliska@suse.cz>
5668
5669 * ipa-icf.c (sem_item::add_type): Use
5670 sem_item::m_type_hash_cache.
5671 * ipa-icf.h: Move the cache from sem_item_optimizer
5672 to sem_item.
5673
5674 2018-08-31 Nathan Sidwell <nathan@acm.org>
5675
5676 * doc/extend.texi (Backwards Compatibility): Remove implicit
5677 extern C leeway of () being (...).
5678
5679 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5680
5681 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5682
5683 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5684
5685 PR target/86684
5686 PR target/87149
5687 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5688
5689 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5690
5691 PR middle-end/87138
5692 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5693 gen_int_mode. Formatting fixes.
5694
5695 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5696
5697 * target.def (custom_function_descriptors): Improve documentation.
5698 * doc/tm.texi.in (Trampolines): Expand discussion of function
5699 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5700 beginning of the section.
5701 * doc/tm.texi: Regenerated.
5702
5703 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5704
5705 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5706 base class in the initializer list. This is a workaround for
5707 building with older GCC.
5708 (class auto_bb_flag): Likewise.
5709
5710 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5711
5712 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5713 (altivec_vcmpequ<VI_char>_p): Remove star.
5714 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5715 vector load modes.
5716 (expand_strncmp_vec_sequence): New function.
5717 (emit_final_str_compare_vec): New function.
5718 (expand_strn_compare): Add support for vector strncmp.
5719 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5720 length specification to bytes.
5721 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5722 (vcmpnezb_p): New pattern.
5723 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5724 for option -mstring-compare-inline-limit.
5725
5726 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5727
5728 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5729 (PTA_SKYLAKE): Add PTA_AES.
5730 (PTA_GOLDMONT): Likewise.
5731
5732 2018-08-29 Jan Hubicka <jh@suse.cz>
5733
5734 PR lto/86517
5735 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5736 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5737
5738 2018-08-29 Jan Hubicka <jh@suse.cz>
5739
5740 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5741 TYPE_STUB_DECL.
5742 (hash_tree): Do not visit TYPE_STUB_DECL.
5743 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5744 stream TYPE_STUB_DECL.
5745 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5746 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5747 after free_lang_data.
5748 (type_in_anonymous_namespace_p): Likewise.
5749
5750 2018-08-29 Jan Hubicka <jh@suse.cz>
5751
5752 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5753 comment that it has to be even number.
5754 (class sreal): Change m_sig type to int32_t.
5755 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5756 int64_t for temporary calculations.
5757 (sreal_verify_basics): Drop one bit from minimum and maximum.
5758
5759 2018-08-30 Richard Biener <rguenther@suse.de>
5760
5761 PR tree-optimization/87147
5762 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5763 (visit_phi): When the degenerate result is from the backedge and
5764 we didn't visit its definition yet drop to VARYING.
5765 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5766
5767 2018-08-29 Jan Hubicka <jh@suse.cz>
5768
5769 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5770 DECL_VINDEX.
5771 (hash_tree): Likewise.
5772
5773 2018-08-29 Jan Hubicka <jh@suse.cz>
5774
5775 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5776 and TYPE_NEXT_REF_TO.
5777
5778 2018-08-29 Jan Hubicka <jh@suse.cz>
5779
5780 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5781 comment that it has to be even number.
5782 (class sreal): Change m_sig type to int32_t.
5783 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5784 int64_t for temporary calculations.
5785 (sreal_verify_basics): Drop one bit from minimum and maximum.
5786
5787 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5788
5789 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5790
5791 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5792
5793 PR middle-end/86995
5794 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5795 if to_add is negative.
5796
5797 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5798
5799 PR middle-end/87053
5800 * builtins.c (c_strlen): Improve range checks.
5801
5802 2018-08-29 Martin Sebor <msebor@redhat.com>
5803 Jeff Law <law@redhat.com>
5804
5805 PR tree-optimization/86714
5806 PR tree-optimization/86711
5807 * builtins.c (c_strlen): Add arguments to call to string_constant.
5808 * expr.c (string_constant): Add argument. Detect missing nul
5809 terminator and outermost declaration it's missing in.
5810 * expr.h (string_constant): Add argument.
5811 * fold-const.c (read_from_constant_string): Add arguments to call to
5812 string_constant.
5813 (c_getstr): Likewise.
5814 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5815 to string_constant.
5816 * tree-ssa-strlen.c (get_stridx): Likewise.
5817
5818 2018-08-29 Jan Hubicka <jh@suse.cz>
5819
5820 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5821 Do not stream DECL_VINDEX.
5822 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5823 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5824 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5825
5826 2018-08-29 Richard Biener <rguenther@suse.de>
5827
5828 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5829 virtual operands that are not default defs to honor region
5830 boundaries.
5831 (rpo_vn_valueize): Remove ineffective code here.
5832
5833 2018-08-29 Richard Biener <rguenther@suse.de>
5834
5835 PR tree-optimization/87132
5836 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5837 when skipping defs reachable over backedges.
5838
5839 2018-08-29 Richard Biener <rguenther@suse.de>
5840
5841 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5842 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5843 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5844 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5845 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5846 (vn_reference_lookup_3): Remove use of const_parms.
5847 (free_rpo_vn): Do not free const_parms.
5848 (do_rpo_vn): Do not call init_const_parms.
5849 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5850 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5851 (call_may_clobber_ref_p_1): Likewise.
5852
5853 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5854
5855 PR other/86726
5856 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5857 (-O): Ditto.
5858 (-ftree-scev-cprop): Document.
5859
5860 2018-08-29 Jan Hubicka <jh@suse.cz>
5861
5862 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5863 parameters.
5864 (sreal constructor): Update.
5865 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5866 sreal:operator/): Update.
5867
5868 2018-08-29 Martin Liska <mliska@suse.cz>
5869
5870 * tree-switch-conversion.c (switch_conversion::expand):
5871 Strenghten assumption about gswitch statements.
5872
5873 2018-08-29 Richard Biener <rguenther@suse.de>
5874
5875 PR tree-optimization/87117
5876 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5877 re-value-number released SSA VDEFs.
5878
5879 2018-08-29 Richard Biener <rguenther@suse.de>
5880
5881 PR tree-optimization/87126
5882 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5883
5884 2018-08-28 Jim Wilson <jimw@sifive.com>
5885
5886 * config/riscv/pic.md: Rewrite.
5887 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5888 invalid address.
5889 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5890 (SOFTF, default_load, softload, softstore): New.
5891
5892 2018-08-28 Jeff Law <law@redhat.com>
5893
5894 * fold-const.c (fold_binary_loc): Remove recently added assert.
5895
5896 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5897
5898 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5899 to OP parmeter of generated function.
5900
5901 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5902
5903 PR tree-optimization/87009
5904 * match.pd: Add boolean optimizations.
5905
5906 2018-08-28 Martin Sebor <msebor@redhat.com>
5907
5908 PR middle-end/86631
5909 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5910 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5911 (pass_walloca::gate): Use it.
5912 (alloca_call_type): Same.
5913 (pass_walloca::execute): Same.
5914 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5915
5916 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5917
5918 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5919 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5920 >= 3005 to >= 9000.
5921
5922 2018-08-28 Richard Biener <rguenther@suse.de>
5923
5924 PR tree-optimization/87124
5925 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5926 constants before looking up avail.
5927
5928 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5929
5930 PR middle-end/87099
5931 * calls.c (maybe_warn_nonstring_arg): Punt early if
5932 warn_stringop_overflow is zero. Don't call get_range_strlen
5933 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5934 Swap comparison operands to have constants on rhs. Only use
5935 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5936 increment lenrng[0].
5937
5938 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5939
5940 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5941 use of tree_to_shwi. Remove duplicated test for the size being
5942 a whole number of bytes.
5943
5944 2018-08-28 Richard Biener <rguenther@suse.de>
5945
5946 PR tree-optimization/87117
5947 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5948 Handle removed stmt without LHS (GIMPLE_NOP).
5949
5950 2018-08-28 Richard Biener <rguenther@suse.de>
5951
5952 PR tree-optimization/87117
5953 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5954 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5955
5956 2018-08-28 Richard Biener <rguenther@suse.de>
5957
5958 PR tree-optimization/87117
5959 * tree-ssa-pre.c (compute_avail): Do not make expressions
5960 with predicated values available.
5961 (get_expr_value_id): Assert we do not run into predicated value
5962 expressions.
5963
5964 2018-08-28 Richard Biener <rguenther@suse.de>
5965
5966 PR tree-optimization/87117
5967 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5968 get virtual operands.
5969 (get_expr_operands): Handle STRING_CST like other decls.
5970
5971 2018-08-28 Martin Liska <mliska@suse.cz>
5972
5973 * tree.h: Update documentation of fndecl_built_in_p
5974 functions.
5975
5976
5977 2018-08-27 Jeff Law <law@redhat.com>
5978 PR tree-optimization/87110
5979 * tree-ssa-dse.c (compute_trims): Handle non-constant
5980 TYPE_SIZE_UNIT.
5981
5982 2018-08-27 Martin Sebor <msebor@redhat.com>
5983
5984 PR tree-optimization/86914
5985 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5986
5987 2018-08-27 Martin Sebor <msebor@redhat.com>
5988
5989 PR tree-optimization/87112
5990 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5991 the type of the bound argument.
5992
5993 2018-08-27 Jeff Law <law@redhat.com>
5994
5995 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5996 type does not have a TYPE_SIZE_UNIT.
5997
5998 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5999
6000 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
6001 with include of backend.h.
6002
6003 2018-08-27 Richard Biener <rguenther@suse.de>
6004
6005 PR tree-optimization/86927
6006 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
6007 use const cond reduction code.
6008
6009 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
6010
6011 PR tree-optimization/85758
6012 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
6013
6014 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6015
6016 PR c++/87091
6017 * diagnostic-show-locus.c (class layout_range): Update for
6018 conversion of show_caret_p to a tri-state.
6019 (layout_range::layout_range): Likewise.
6020 (make_range): Likewise.
6021 (layout::maybe_add_location_range): Likewise.
6022 (layout::should_print_annotation_line_p): Don't show annotation
6023 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
6024 (layout::get_state_at_point): Update for conversion of
6025 show_caret_p to a tri-state. Bail out early for
6026 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
6027 underlining or source colorization.
6028 (gcc_rich_location::add_location_if_nearby): Update for conversion
6029 of show_caret_p to a tri-state.
6030 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
6031 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
6032 Likewise.
6033 (selftest::test_one_liner_labels): Likewise.
6034 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
6035 conversion of show_caret_p to a tri-state.
6036 * pretty-print.c (text_info::set_location): Likewise.
6037 * pretty-print.h (text_info::set_location): Likewise.
6038 * substring-locations.c (format_warning_n_va): Likewise.
6039 * tree-diagnostic.c (default_tree_printer): Likewise.
6040 * tree-pretty-print.c (newline_and_indent): Likewise.
6041
6042 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6043
6044 PR c++/87091
6045 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
6046 line above for line-insertion fix-it hints.
6047 (selftest::test_fixit_insert_containing_newline): Update the
6048 expected results, and add a test with line-numbering enabled.
6049
6050 2018-08-27 Martin Liska <mliska@suse.cz>
6051
6052 PR sanitizer/86962
6053 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
6054 params with DECL_HAS_VALUE_EXPR_P.
6055
6056 2018-08-27 Martin Liska <mliska@suse.cz>
6057
6058 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
6059 selected expansion strategy.
6060
6061 2018-08-27 Martin Liska <mliska@suse.cz>
6062
6063 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
6064 * builtins.c (is_builtin_fn): Likewise.
6065 * attribs.c (diag_attr_exclusions): Use new function
6066 fndecl_built_in_p and remove check for FUNCTION_DECL if
6067 possible.
6068 (builtin_mathfn_code): Likewise.
6069 (fold_builtin_expect): Likewise.
6070 (fold_call_expr): Likewise.
6071 (fold_builtin_call_array): Likewise.
6072 (fold_call_stmt): Likewise.
6073 (set_builtin_user_assembler_name): Likewise.
6074 (is_simple_builtin): Likewise.
6075 * calls.c (gimple_alloca_call_p): Likewise.
6076 (maybe_warn_nonstring_arg): Likewise.
6077 * cfgexpand.c (expand_call_stmt): Likewise.
6078 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
6079 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
6080 (cgraph_node::verify_node): Likewise.
6081 * cgraphclones.c (build_function_decl_skip_args): Likewise.
6082 (cgraph_node::create_clone): Likewise.
6083 * config/arm/arm.c (arm_insert_attributes): Likewise.
6084 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
6085 * dse.c (scan_insn): Likewise.
6086 * expr.c (expand_expr_real_1): Likewise.
6087 * fold-const.c (operand_equal_p): Likewise.
6088 (fold_binary_loc): Likewise.
6089 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
6090 * gimple-low.c (lower_stmt): Likewise.
6091 * gimple-pretty-print.c (dump_gimple_call): Likewise.
6092 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
6093 Likewise.
6094 * gimple.c (gimple_build_call_from_tree): Likewise.
6095 (gimple_call_builtin_p): Likewise.
6096 (gimple_call_combined_fn): Likewise.
6097 * gimplify.c (gimplify_call_expr): Likewise.
6098 (gimple_boolify): Likewise.
6099 (gimplify_modify_expr): Likewise.
6100 (gimplify_addr_expr): Likewise.
6101 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
6102 * ipa-cp.c (determine_versionability): Likewise.
6103 * ipa-fnsummary.c (compute_fn_summary): Likewise.
6104 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
6105 * ipa-split.c (visit_bb): Likewise.
6106 (split_function): Likewise.
6107 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6108 * lto-cgraph.c (input_node): Likewise.
6109 * lto-streamer-out.c (write_symbol): Likewise.
6110 * omp-low.c (setjmp_or_longjmp_p): Likewise.
6111 (lower_omp_1): Likewise.
6112 * predict.c (strip_predict_hints): Likewise.
6113 * print-tree.c (print_node): Likewise.
6114 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
6115 * trans-mem.c (is_tm_irrevocable): Likewise.
6116 (is_tm_load): Likewise.
6117 (is_tm_simple_load): Likewise.
6118 (is_tm_store): Likewise.
6119 (is_tm_simple_store): Likewise.
6120 (is_tm_abort): Likewise.
6121 (tm_region_init_1): Likewise.
6122 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
6123 * tree-cfg.c (verify_gimple_call): Likewise.
6124 (move_stmt_r): Likewise.
6125 (stmt_can_terminate_bb_p): Likewise.
6126 * tree-eh.c (lower_eh_constructs_2): Likewise.
6127 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
6128 * tree-inline.c (remap_gimple_stmt): Likewise.
6129 (copy_bb): Likewise.
6130 (estimate_num_insns): Likewise.
6131 (fold_marked_statements): Likewise.
6132 * tree-sra.c (scan_function): Likewise.
6133 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
6134 (optimize_stack_restore): Likewise.
6135 (pass_fold_builtins::execute): Likewise.
6136 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
6137 (mark_all_reaching_defs_necessary_1): Likewise.
6138 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
6139 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6140 (pass_forwprop::execute): Likewise.
6141 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6142 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6143 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
6144 * tree-ssa-strlen.c (get_string_length): Likewise.
6145 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
6146 (find_func_aliases_for_call): Likewise.
6147 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
6148 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
6149 * tree-tailcall.c (find_tail_calls): Likewise.
6150 * tree.c (need_assembler_name_p): Likewise.
6151 (free_lang_data_in_decl): Likewise.
6152 (get_call_combined_fn): Likewise.
6153 * ubsan.c (is_ubsan_builtin_p): Likewise.
6154 * varasm.c (incorporeal_function_p): Likewise.
6155 * tree.h (DECL_BUILT_IN): Remove and replace with
6156 fndecl_built_in_p.
6157 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
6158 (fndecl_built_in_p): New.
6159
6160 2018-08-27 Martin Liska <mliska@suse.cz>
6161
6162 PR tree-optimization/86847
6163 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
6164 Dump also subtree probability.
6165 (switch_decision_tree::do_jump_if_equal): New function.
6166 (switch_decision_tree::emit_case_nodes): Handle special
6167 situations in balanced tree that can be emitted much simpler.
6168 Fix calculation of probabilities that happen in tree expansion.
6169 * tree-switch-conversion.h (struct cluster): Add
6170 is_single_value_p.
6171 (struct simple_cluster): Likewise.
6172 (struct case_tree_node): Add new function has_child.
6173 (do_jump_if_equal): New.
6174
6175 2018-08-27 Martin Liska <mliska@suse.cz>
6176
6177 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
6178 Add new argument to bit_test_cluster constructor.
6179 (bit_test_cluster::emit): Set bits really number of values
6180 handlel by a test.
6181 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
6182 probability argument.
6183 * tree-switch-conversion.h (struct bit_test_cluster):
6184 Add m_handles_entire_switch.
6185
6186 2018-08-27 Martin Liska <mliska@suse.cz>
6187
6188 PR tree-optimization/86702
6189 * tree-switch-conversion.c (jump_table_cluster::emit):
6190 Make probabilities even for values in jump table
6191 according to number of cases handled.
6192 (switch_decision_tree::compute_cases_per_edge): Pass
6193 argument to reset_out_edges_aux function.
6194 (switch_decision_tree::analyze_switch_statement): Likewise.
6195 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
6196 Make it static.
6197
6198 2018-08-27 Martin Liska <mliska@suse.cz>
6199
6200 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
6201 cfun argument explicitly.
6202 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
6203 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
6204 function gimple_switch_default_bb.
6205 (convert_switch_statements):
6206 (expand_builtins):
6207 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
6208 * stmt.c (label_to_block_fn): Use label_to_block and pass
6209 cfun argument explicitly and use gimple_switch_label_bb.
6210 (expand_case): Likewise.
6211 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
6212 cfun argument explicitly. Likewise.
6213 (make_edges_bb): Likewise.
6214 (make_cond_expr_edges): Likewise.
6215 (get_cases_for_edge): Likewise.
6216 (make_gimple_switch_edges): Likewise.
6217 (label_to_block_fn): Likewise.
6218 (label_to_block): Likewise.
6219 (make_goto_expr_edges): Likewise.
6220 (make_gimple_asm_edges): Likewise.
6221 (main_block_label): Likewise.
6222 (group_case_labels_stmt): Likewise.
6223 (find_taken_edge_computed_goto): Likewise.
6224 (find_taken_edge_switch_expr): Likewise.
6225 (gimple_verify_flow_info): Likewise.
6226 (gimple_redirect_edge_and_branch): Likewise.
6227 (gimple_switch_label_bb): New function.
6228 (gimple_switch_default_bb): Likewise.
6229 (gimple_switch_edge): Likewise.
6230 (gimple_switch_default_edge): Likewise.
6231 * tree-cfg.h (label_to_block_fn): Remove and replace ...
6232 (label_to_block): ... with this.
6233 (gimple_switch_label_bb): New.
6234 (gimple_switch_default_bb): Likewise.
6235 (gimple_switch_edge): Likewise.
6236 (gimple_switch_default_edge): Likewise.
6237 * tree-cfgcleanup.c (convert_single_case_switch): Use
6238 new gimple functions and pass new argument to label_to_block.
6239 (cleanup_control_flow_bb):
6240 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
6241 cfun argument explicitly.
6242 (make_eh_edges): Likewise.
6243 (redirect_eh_dispatch_edge): Likewise.
6244 (lower_resx): Likewise.
6245 (lower_eh_dispatch): Likewise.
6246 (maybe_remove_unreachable_handlers): Likewise.
6247 (unsplit_eh): Likewise.
6248 (cleanup_empty_eh): Likewise.
6249 (verify_eh_edges): Likewise.
6250 (verify_eh_dispatch_edge): Likewise.
6251 * tree-ssa-dom.c (record_edge_info): Likewise.
6252 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6253 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6254 (thread_through_normal_block): Likewise.
6255 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6256 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6257 * tree-switch-conversion.c (switch_conversion::collect): Use new
6258 gimple functions.
6259 (switch_conversion::check_final_bb): Likewise.
6260 (switch_conversion::gather_default_values): Pass new argument
6261 to label_to_block.
6262 (switch_conversion::build_constructors): Likewise.
6263 (switch_decision_tree::compute_cases_per_edge): Use new
6264 gimple_switch_edge function.
6265 (switch_decision_tree::analyze_switch_statement): Pass new argument
6266 to label_to_block.
6267 (switch_decision_tree::try_switch_expansion): Use
6268 gimple_switch_default_edge.
6269 * tree-vrp.c (find_switch_asserts): Pass new argument
6270 to label_to_block.
6271 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6272 (vr_values::simplify_switch_using_ranges): Likewise.
6273
6274 2018-08-27 Richard Biener <rguenther@suse.de>
6275
6276 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6277 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6278
6279 * tree-ssa-sccvn.h (struct vn_pval): New structure.
6280 (struct vn_nary_op_s): Add unwind_to member. Add
6281 predicated_values flag and put result into a union together
6282 with a linked list of vn_pval.
6283 (struct vn_ssa_aux): Add name member to make maintaining
6284 a map of SSA name to vn_ssa_aux possible. Remove no longer
6285 needed info, dfsnum, low, visited, on_sccstack, use_processed
6286 and range_info_anti_range_p members.
6287 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6288 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6289 New functions.
6290 (vn_valueize): New global.
6291 (vn_context_bb): Likewise.
6292 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6293 VN_INFO_PTR_INFO): Remove.
6294 * tree-ssa-sccvn.c: ... (rewrite)
6295 (pass_fre::execute): For -O2+ initialize loops and run
6296 RPO VN in optimistic mode (iterating). For -O1 and -Og
6297 run RPO VN in non-optimistic mode.
6298 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6299 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6300 * doc/invoke.texi (sccvn-max-scc-size): Remove.
6301 (rpo-vn-max-loop-depth): Document.
6302 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6303 when valuezing the VUSE signals we walked out of the region.
6304 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6305 (phi_translate): Set VN context block to use for availability
6306 lookup.
6307 (compute_avail): Likewise.
6308 (pre_valueize): New function.
6309 (pass_pre::execute): Adjust to the RPO VN API.
6310
6311 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6312 (propagate_constants_for_unrolling): Remove.
6313 (tree_unroll_loops_completely): Perform value-numbering
6314 on the unrolled bodies loop parent.
6315
6316 2018-08-27 Richard Biener <rguenther@suse.de>
6317
6318 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6319 for partial antic compute.
6320
6321 2018-08-27 Jakub Jelinek <jakub@redhat.com>
6322
6323 PR rtl-optimization/87065
6324 * combine.c (simplify_if_then_else): Formatting fix.
6325 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6326 check.
6327 (known_cond): Don't return const_true_rtx for vector modes. Use
6328 CONST0_RTX instead of const0_rtx. Formatting fixes.
6329
6330 2018-08-27 Martin Liska <mliska@suse.cz>
6331
6332 PR gcov-profile/87069
6333 * gcov.c (process_file): Record files already processed
6334 and warn about a file being processed multiple times.
6335
6336 2018-08-27 Martin Liska <mliska@suse.cz>
6337
6338 PR driver/83193
6339 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6340 Set default values for x_aarch64_*_string strings.
6341 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6342 prefix. For -mabi do not print '=ABI' in help and use
6343 <option_value> format for -msve-vector-bits and -moverride
6344 options.
6345
6346 2018-08-26 Jeff Law <law@redhat.com>
6347
6348 * config/mips/frame-header-opt.c: Include "backend.h" rather than
6349 "cfg.h"
6350
6351 2018-08-26 Marek Polacek <polacek@redhat.com>
6352
6353 PR c++/87029, Implement -Wredundant-move.
6354 * doc/invoke.texi: Document -Wredundant-move.
6355
6356 2018-08-25 Martin Sebor <msebor@redhat.com>
6357
6358 PR tree-optimization/87059
6359 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6360 to the same type as the other.
6361 * fold-const.c (fold_binary_loc): Assert expectation.
6362
6363 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
6364
6365 * config/darwin.c (machopic_legitimize_pic_address): Clean up
6366 extraneous parentheses, dead code section and formatting.
6367
6368 2018-08-24 David Malcolm <dmalcolm@redhat.com>
6369
6370 PR c++/87091
6371 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6372 wide enough for jumps in the line-numbering to be visible.
6373 (layout::print_gap_in_line_numbering): New member function.
6374 (layout::calculate_line_spans): When using line numbering, merge
6375 line spans that are only 1 line apart.
6376 (diagnostic_show_locus): When printing line numbers, show gaps in
6377 line numbering directly, rather than printing headers.
6378 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6379 line-numbering with multiple line spans.
6380 (selftest::test_fixit_insert_containing_newline_2): Add test of
6381 line-numbering, in which the spans are close enough to be merged.
6382
6383 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6384
6385 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6386 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
6387 * tree-vrp.c (range_is_nonnull): Remove.
6388 (range_includes_zero_p): Accept value_range instead of min/max.
6389 (extract_range_from_binary_expr_1): Do not early bail on
6390 POINTER_PLUS_EXPR.
6391 Use range_includes_zero_p instead of range_is_nonnull.
6392 (extract_range_from_unary_expr): Use range_includes_zero_p instead
6393 of range_is_nonnull.
6394 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
6395 special case VR_ANTI_RANGE.
6396 (vrp_finalize): Same.
6397 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6398 instead of min/max.
6399 (range_is_nonnull): Remove.
6400 * vr-values.c (vrp_stmt_computes_nonzero): Use
6401 range_includes_zero_p instead of range_is_nonnull.
6402 (extract_range_basic): Pass value_range to range_includes_zero_p
6403 instead of range_is_nonnull.
6404
6405 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
6406
6407 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6408 * emit-rtl.h (rtl_data): Remove return_bnd.
6409 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6410 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6411 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6412 (POINTER_BOUNDS_MODE): Remove definition.
6413 (make_pointer_bounds_mode): Remove.
6414 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6415 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6416 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6417 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6418 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6419 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6420 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6421
6422 * config/i386/i386-modes.def (BND32, BND64): Remove.
6423 * config/i386/i386.c (dbx_register_map): Remove bound registers.
6424 (dbx64_register_map): Ditto.
6425 (svr4_dbx_register_map): Ditto.
6426 (indirect_thunk_bnd_needed): Remove.
6427 (indirect_thunks_bnd_used): Ditto.
6428 (indirect_return_bnd_needed): Ditto.
6429 (indirect_return_via_cx_bnd): Ditto.
6430 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6431 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6432 (output_indirect_thunk): Ditto. Remove need_prefix argument.
6433 (output_indirect_thunk_function): Remove handling of
6434 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6435 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6436 (ix86_save_reg): Remove handling of crtl->return_bnd.
6437 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6438 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6439 and UNSPEC_BNDLX_ADDR.
6440 (ix86_output_indirect_branch_via_reg): Remove handling of
6441 indirect_thunk_prefix_bnd.
6442 (ix86_output_indirect_branch_via_push): Ditto.
6443 (ix86_output_function_return): Ditto.
6444 (ix86_output_indirect_function_return): Ditto.
6445 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6446 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6447 (CALL_USED_REGISTERS): Ditto.
6448 (REG_ALLOC_ORDER): Update for removal of bound registers.
6449 (HI_REGISTER_NAMES): Ditto.
6450 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6451 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6452 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6453 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6454 (FIRST_PSEUDO_REG): Update.
6455 (BND): Remove mode iterator.
6456 * config/i386/predicates.md (bnd_mem_operator): Remove.
6457
6458 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6459
6460 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6461 vectors.
6462
6463 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6464
6465 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6466 the case in which the permute needs only a single element and
6467 repeats for every vector of the result. Extend that case to
6468 handle variable-length vectors.
6469 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6470
6471 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6472
6473 PR debug/79342
6474 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6475 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6476
6477 2018-08-24 Richard Biener <rguenther@suse.de>
6478
6479 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6480 bb_flags_allocated members.
6481 (auto_flag): New RAII class for allocating flags.
6482 (auto_edge_flag): New RAII class for allocating edge flags.
6483 (auto_bb_flag): New RAII class for allocating bb flags.
6484 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6485 flag dynamically.
6486 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6487 in favor of temporarily allocated BB flag.
6488 * hsa-brig.c: Re-order includes.
6489 * hsa-dump.c: Likewise.
6490 * hsa-regalloc.c: Likewise.
6491 * print-rtl.c: Likewise.
6492 * profile-count.c: Likewise.
6493
6494 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6495
6496 PR target/86989
6497 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6498 the TOC register.
6499
6500 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6501
6502 PR 87073/bootstrap
6503 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6504 from wide_int_range_multiplicative_op.
6505
6506 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6507
6508 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6509 "permutaion".
6510
6511 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6512
6513 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6514 to 'expanded'.
6515
6516 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6517
6518 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6519 full GENERIC expression used for replacement.
6520
6521 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6522
6523 * tree-vrp.c (abs_extent_range): Remove.
6524 (extract_range_into_wide_ints): Pass wide ints by reference.
6525 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6526 Pass wide ints by reference in all calls to
6527 extract_range_into_wide_ints.
6528 * wide-int-range.cc (wide_int_range_div): New.
6529 * wide-int-range.h (wide_int_range_div): New.
6530 (wide_int_range_includes_zero_p): New.
6531 (wide_int_range_zero_p): New.
6532
6533 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6534
6535 * config/aarch64/aarch64.md (arches): New enum.
6536 (arch): New enum attr.
6537 (arch_enabled): New attr.
6538 (enabled): Now uses arch_enabled only.
6539 (simd, sve, fp16): Removed attribute.
6540 (fp): Attr now defined in terms of 'arch'.
6541 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6542 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6543 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6544 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6545 attributes into 'arch'.
6546 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6547 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6548 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6549 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6550 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6551 'simd' attribute into 'arch'.
6552 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6553 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6554 Convert use of 'fp' attribute to 'arch'.
6555 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6556 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6557 into 'arch'.
6558 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6559 (different modes) Merge 'fp' and 'simd' into 'arch'.
6560 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6561 'simd' into 'arch'.
6562
6563 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6564
6565 PR rtl-optimization/87026
6566 * expmed.c (canonicalize_comparison): If we can no longer create
6567 pseudoregisters, don't.
6568
6569 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6570
6571 PR target/86951
6572 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6573 prototype.
6574 * config/arm/arm.c (speculation_barrier_libfunc): New static
6575 variable.
6576 (arm_init_libfuncs): Initialize it.
6577 (arm_emit_speculation_barrier): New function.
6578 * config/arm/arm.md (speculation_barrier): Call
6579 arm_emit_speculation_barrier for architectures that do not have
6580 DSB or ISB.
6581 (speculation_barrier_insn): Only match on Armv7 or later.
6582
6583 2018-08-23 Richard Biener <rguenther@suse.de>
6584
6585 PR middle-end/87024
6586 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6587 calls.
6588
6589 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6590
6591 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6592 of single-vector TBLs.
6593 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6594 one input is given.
6595
6596 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6597
6598 PR target/85910
6599 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6600 aarch64_evpc_tbl guard.
6601
6602 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6603
6604 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6605 behaviour.
6606
6607 2018-08-22 Martin Sebor <msebor@redhat.com>
6608
6609 PR middle-end/87052
6610 * tree-pretty-print.c (pretty_print_string): Add argument.
6611 (dump_generic_node): Call to pretty_print_string with string size.
6612
6613 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6614
6615 PR rtl-optimization/86771
6616 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6617 of two SETs into those two SETs, one to be placed at i2, if that SETs
6618 destination is modified between i2 and i3.
6619
6620 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6621
6622 PR tree-optimization/86725
6623 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6624 function.
6625 (vect_analyze_scalar_cycles_1): Check it.
6626
6627 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6628
6629 PR tree-optimization/86725
6630 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6631 an outer loop phi as a double reduction, make sure that the
6632 single user of the phi result is an inner loop phi.
6633
6634 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6635
6636 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6637 grouped stores with gaps to a strided group.
6638
6639 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6640
6641 * tree-vect-stmts.c (get_group_load_store_type)
6642 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6643 first statement in a group.
6644
6645 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6646
6647 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6648 the sequence used in gcc/gcc.c.
6649
6650 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6651
6652 PR other/704
6653 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6654 building it.
6655
6656 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6657
6658 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6659 Darwin10-specific unwinder-shim.
6660 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6661 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6662 New to cater for Darwin10 Rosetta.
6663
6664 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6665
6666 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6667 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6668
6669 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6670
6671 PR bootstrap/81033
6672 PR target/81733
6673 PR target/52795
6674 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6675 (dwarf2out_switch_text_section): Generate a local label for the
6676 second function sub-section and apply it as the second FDE start
6677 label.
6678 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6679 second sub-section start.
6680
6681 2018-08-22 Richard Biener <rguenther@suse.de>
6682
6683 PR tree-optimization/86988
6684 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6685
6686 2018-08-22 Richard Biener <rguenther@suse.de>
6687
6688 PR tree-optimization/86945
6689 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6690
6691 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6692
6693 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6694 a comment about how uses of r2 for .sdata2 come about.
6695
6696 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6697
6698 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6699
6700 2018-08-21 Marek Polacek <polacek@redhat.com>
6701
6702 PR c++/86981, Implement -Wpessimizing-move.
6703 * doc/invoke.texi: Document -Wpessimizing-move.
6704
6705 2018-08-21 Jan Hubicka <jh@suse.cz>
6706
6707 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6708 * tree.h (is_redundant_typedef): Remove.
6709 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6710
6711 2018-08-21 Jan Hubicka <jh@suse.cz>
6712
6713 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6714 when possible.
6715
6716 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6717
6718 * expmed.c (extract_low_bits): Reject invalid subregs early.
6719
6720 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6721
6722 PR middle-end/86121
6723 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6724 behaviour.
6725
6726 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6727
6728 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6729 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6730 * config/vxworks.c: Likewise.
6731
6732 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6733
6734 * config/vxworks.c: Set targetm.have_ctors_dtors
6735 if HAVE_INITFINI_ARRAY_SUPPORT.
6736 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6737 if HAVE_INITFINI_ARRAY_SUPPORT.
6738
6739 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6740
6741 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6742 default search path for VxWorks < 7.
6743
6744 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6745
6746 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6747 (get_format_string): Refer to c_getstr.
6748
6749 2018-08-21 Tom de Vries <tdevries@suse.de>
6750
6751 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6752 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6753 (debuginfo_early_stop): Declare.
6754 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6755 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6756 (debuginfo_early_stop): New function.
6757 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6758 and debuginfo_early_stop.
6759 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6760 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6761 (general_init): Call debuginfo_early_init.
6762 (finalize): Call debuginfo_fini.
6763 (do_compile): Call debuginfo_init.
6764 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6765 -fdump-early-debug.
6766 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6767
6768 2018-08-21 Tom de Vries <tdevries@suse.de>
6769
6770 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6771 flag_dump_noaddr and flag_dump_unnumbered.
6772
6773 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6774
6775 * wide-int-range.cc (wide_int_range_abs): New.
6776 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6777 * wide-int-range.h (wide_int_range_abs): New.
6778 (wide_int_range_min_max): New.
6779 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6780 case to call wide_int_range_abs.
6781 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6782 (extract_range_from_abs_expr): Delete.
6783
6784 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6785
6786 PR target/87033
6787 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6788 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6789 for indexed loads.
6790
6791 2018-08-20 Nathan Sidwell <nathan@acm.org>
6792 Jeff Law <law@redhat.com>
6793
6794 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6795 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6796
6797 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6798
6799 PR other/84889
6800 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6801 (decl_attributes): Likewise.
6802 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6803 instance.
6804 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6805 * diagnostic-core.h (class auto_diagnostic_group): New class.
6806 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6807 (diagnostic_report_diagnostic): Handle the first diagnostics within
6808 a group.
6809 (emit_diagnostic): Add auto_diagnostic_group instance.
6810 (inform): Likewise.
6811 (inform_n): Likewise.
6812 (warning): Likewise.
6813 (warning_at): Likewise.
6814 (warning_n): Likewise.
6815 (pedwarn): Likewise.
6816 (permerror): Likewise.
6817 (error): Likewise.
6818 (error_n): Likewise.
6819 (error_at): Likewise.
6820 (sorry): Likewise.
6821 (fatal_error): Likewise.
6822 (internal_error): Likewise.
6823 (internal_error_no_backtrace): Likewise.
6824 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6825 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6826 * diagnostic.h (struct diagnostic_context): Add fields
6827 "diagnostic_group_nesting_depth",
6828 "diagnostic_group_emission_count", "begin_group_cb",
6829 "end_group_cb".
6830 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6831 Add auto_diagnostic_group instance(s).
6832 (find_explicit_erroneous_behavior): Likewise.
6833 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6834 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6835 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6836 (gimplify_va_arg_expr): Likewise.
6837 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6838 (HSA_SORRY_AT): Likewise.
6839 * ipa-devirt.c (compare_virtual_tables): Likewise.
6840 (warn_odr): Likewise.
6841 * multiple_target.c (expand_target_clones): Likewise.
6842 * opts-common.c (cmdline_handle_error): Likewise.
6843 * reginfo.c (globalize_reg): Likewise.
6844 * substring-locations.c (format_warning_n_va): Likewise.
6845 * tree-inline.c (expand_call_inline): Likewise.
6846 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6847 * tree-ssa-loop-niter.c
6848 (do_warn_aggressive_loop_optimizations): Likewise.
6849 * tree-ssa-uninit.c (warn_uninit): Likewise.
6850 * tree.c (warn_deprecated_use): Likewise.
6851
6852 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6853
6854 PR target/87014
6855 * config/i386/i386.md (eh_return): Always update EH return
6856 address in word_mode.
6857
6858 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6859
6860 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6861 TARGET_SPLIT_COMPLEX_ARG is defined.
6862
6863 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6864
6865 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6866
6867 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6868
6869 PR target/86984
6870 * expr.c (expand_assignment): Assert that bitpos is positive.
6871 (store_field): Likewise
6872 (expand_expr_real_1): Make sure that bitpos is positive.
6873 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6874 integer overflow.
6875
6876 2018-08-20 Nathan Sidwell <nathan@acm.org>
6877
6878 * Makefile.in (CPP_ID_DATA_H): Delete.
6879 (CPP_INTERNAL_H): Don't add it.
6880 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6881 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6882
6883 2018-08-20 Richard Biener <rguenther@suse.de>
6884
6885 PR tree-optimization/78655
6886 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6887 pointer + offset nonnull if either operand is nonnull work.
6888
6889 2018-08-20 Tom de Vries <tdevries@suse.de>
6890
6891 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6892 unless the referenced die describes the added property using
6893 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6894 Otherwise, add a DW_AT_location to the referenced die.
6895
6896 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6897
6898 PR target/86994
6899 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6900 register_operand when calling ix86_set_reg_reg_cost.
6901 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6902 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6903 predicate and to 1 otherwise.
6904
6905 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6906
6907 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6908 emit a diagnostic that it is not supported and reset the option.
6909 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6910 supported and consume the option. (ASM_FINAL_SPEC): New.
6911
6912 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6913
6914 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6915 a sentence.
6916
6917 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6918
6919 C-SKY port: Documentation
6920
6921 * doc/extend.texi (C-SKY Function Attributes): New section.
6922 * doc/invoke.texi (Option Summary): Add C-SKY options.
6923 (C-SKY Options): New section.
6924 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6925
6926 2018-08-17 Jojo <jijie_rong@c-sky.com>
6927 Huibin Wang <huibin_wang@c-sky.com>
6928 Sandra Loosemore <sandra@codesourcery.com>
6929 Chung-Lin Tang <cltang@codesourcery.com>
6930
6931 C-SKY port: Backend implementation
6932
6933 * config/csky/*: New.
6934 * common/config/csky/*: New.
6935
6936 2018-08-17 Jojo <jijie_rong@c-sky.com>
6937 Huibin Wang <huibin_wang@c-sky.com>
6938 Sandra Loosemore <sandra@codesourcery.com>
6939 Chung-Lin Tang <cltang@codesourcery.com>
6940 Andrew Jenner <andrew@codesourcery.com>
6941
6942 C-SKY port: Configury
6943
6944 * config.gcc (csky-*-*): New.
6945 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6946 * configure: Regenerated.
6947
6948 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6949
6950 * dump-context.h: Include "dumpfile.h".
6951 (dump_context::dump_printf_va): Convert final param from va_list
6952 to va_list *. Convert from ATTRIBUTE_PRINTF to
6953 ATTRIBUTE_GCC_DUMP_PRINTF.
6954 (dump_context::dump_printf_loc_va): Likewise.
6955 * dumpfile.c: Include "stringpool.h".
6956 (make_item_for_dump_printf_va): Delete.
6957 (make_item_for_dump_printf): Delete.
6958 (class dump_pretty_printer): New class.
6959 (dump_pretty_printer::dump_pretty_printer): New ctor.
6960 (dump_pretty_printer::emit_items): New member function.
6961 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6962 function.
6963 (dump_pretty_printer::emit_item): New member function.
6964 (dump_pretty_printer::stash_item): New member function.
6965 (dump_pretty_printer::format_decoder_cb): New member function.
6966 (dump_pretty_printer::decode_format): New member function.
6967 (dump_context::dump_printf_va): Reimplement in terms of
6968 dump_pretty_printer.
6969 (dump_context::dump_printf_loc_va): Convert final param from va_list
6970 to va_list *.
6971 (dump_context::begin_scope): Reimplement call to
6972 make_item_for_dump_printf.
6973 (dump_printf): Update for change to dump_printf_va.
6974 (dump_printf_loc): Likewise.
6975 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6976 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6977 with %T, %E, and %G.
6978 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6979 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6980 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6981 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6982 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6983 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6984 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6985 within a dump_printf_loc call to "%wu".
6986 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6987 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6988 missing space after "=".
6989 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6990 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6991 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6992 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6993 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6994 duplicate "vectorized" from message.
6995
6996 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6997
6998 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6999 polyNxK_t element's TYPE_STRING_FLAG.
7000
7001 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7002
7003 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
7004 (they were unnamed before). Fix comments.
7005
7006 2018-08-17 Nathan Sidwell <nathan@acm.org>
7007
7008 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
7009
7010 2018-08-17 Richard Biener <rguenther@suse.de>
7011
7012 PR tree-optimization/86841
7013 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
7014
7015 2018-08-17 Martin Liska <mliska@suse.cz>
7016
7017 * common.opt: Remove Warn, Init and Report for options with
7018 Ignore/Deprecated flag. Warning is done automatically for
7019 Deprecated flags.
7020 * config/i386/i386.opt: Likewise.
7021 * config/ia64/ia64.opt: Likewise.
7022 * config/rs6000/rs6000.opt: Likewise.
7023 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
7024 Remove usage of flag_check_pointer_bounds.
7025 * lto-wrapper.c (merge_and_complain): Do not handle
7026 OPT_fcheck_pointer_bounds.
7027 (append_compiler_options): Likewise.
7028 * opt-functions.awk: Do not handle Deprecated.
7029 * optc-gen.awk: Check that Var, Report and Init are not
7030 used for an option with Ignore/Deprecated flag.
7031 * opts-common.c (decode_cmdline_option): Do not report
7032 CL_ERR_DEPRECATED.
7033 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
7034 options.
7035 * opts.h (struct cl_option): Remove cl_deprecated flag.
7036 (CL_ERR_DEPRECATED): Remove error enum value.
7037
7038 2018-08-17 Richard Biener <rguenther@suse.de>
7039
7040 PR middle-end/86505
7041 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
7042 across a va-arg-pack using call adjust its return value accordingly.
7043
7044 2018-08-16 Martin Sebor <msebor@redhat.com>
7045
7046 PR tree-optimization/86853
7047 * gimple-ssa-sprintf.c (struct format_result): Rename member.
7048 (struct fmtresult): Add member and initialize it in ctors.
7049 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
7050 (format_string): Handle %S the same as %ls. Set MAYFAIL.
7051 (format_directive): Set POSUNDER4K when MAYFAIL is set.
7052 (parse_directive): Handle %C same as %c.
7053 (sprintf_dom_walker::compute_format_length): Adjust.
7054 (is_call_safe): Adjust.
7055
7056 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
7057
7058 * builtins.c (c_strlen): Add new parameter eltsize. Use it
7059 for determining how to count the elements.
7060 * builtins.h (c_strlen): Adjust prototype.
7061 * expr.c (string_constant): Add new parameter mem_size.
7062 Set *mem_size appropriately.
7063 * expr.h (string_constant): Adjust protoype.
7064 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
7065 * gimple-fold.h (get_range_strlen): Adjust prototype.
7066 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
7067 (format_string): Call get_string_length with eltsize.
7068
7069 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7070
7071 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
7072 to emit the span, rather than setting it as the prefix.
7073
7074 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7075
7076 * diagnostic-show-locus.c (layout::start_annotation_line): Add
7077 "margin_char" parameter, defaulting to space. Use it in place
7078 of pp_space for the initial part of the margin.
7079 (layout::print_leading_fixits): Use '+' when filling the margin
7080 of line-insertion fix-it hints.
7081
7082 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7083
7084 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
7085 Delete.
7086
7087 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7088
7089 * config/rs6000/altivec.md: Don't set length attribute to the default
7090 value.
7091 * config/rs6000/darwin.md: Ditto.
7092 * config/rs6000/dfp.md: Ditto.
7093 * config/rs6000/htm.md: Ditto.
7094 * config/rs6000/rs6000.md: Ditto.
7095 * config/rs6000/sync.md: Ditto.
7096 * config/rs6000/vsx.md: Ditto.
7097
7098 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7099
7100 * config/rs6000/altivec.md: Don't set length attribute to the default
7101 value, for branch instructions.
7102 * config/rs6000/darwin.md: Ditto.
7103 * config/rs6000/rs6000.md: Ditto.
7104
7105 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7106
7107 * config/rs6000/rs6000.md (length): Always define as const_int 4.
7108 (unnamed conditional branch define_insn): Set length to 4 or 8
7109 depending on offset.
7110 (<bd>_<mode>): Similar, for alternative 0.
7111 (<bd>tf_<mode>): Ditto.
7112
7113 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7114
7115 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
7116
7117 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
7118
7119 * doc/rtl.texi: Replace old RTX class names with new names.
7120
7121
7122 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
7123
7124 * expmed.h (canonicalize_comparison): New declaration.
7125 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
7126 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
7127 * optabs.c (prepare_cmp_insn): Likewise.
7128 * rtl.h (unsigned_condition_p): New function which checks if a
7129 comparison operator is unsigned.
7130
7131 2018-08-16 Nathan Sidwell <nathan@acm.org>
7132
7133 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
7134 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
7135
7136 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7137
7138 PR target/84711
7139 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
7140 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
7141 (mov<mov>): ..this and enable unconditionally.
7142
7143 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7144
7145 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
7146
7147 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
7148
7149 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
7150 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
7151 "Common" with "Target".
7152
7153 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7154
7155 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
7156 * doc/invoke.texi (mmitigate-rop): Remove.
7157 * config/i386/i386.c: Do not include "regrename.h".
7158 (ix86_rop_should_change_byte_p, reg_encoded_number)
7159 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
7160 Remove.
7161 (ix86_reorg): Remove call to ix86_mitigate_rop.
7162 * config/i386/i386.md (attr "modrm_class"): Remove.
7163 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
7164 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
7165 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
7166
7167 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
7168
7169 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
7170 allow folding of mergeh() and mergel() for the float and double types.
7171 (fold_mergehl_helper): Rework to handle building a permute tree
7172 for float vectors.
7173
7174 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7175
7176 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
7177 for TARGET_SSE.
7178
7179 2018-08-15 David Malcolm <dmalcolm@redhat.com>
7180
7181 * common.opt (fdiagnostics-show-labels): New option.
7182 * diagnostic-show-locus.c (class layout_range): Add field
7183 "m_label".
7184 (class layout): Add field "m_show_labels_p".
7185 (layout_range::layout_range): Add param "label" and use it to
7186 initialize m_label.
7187 (make_range): Pass in NULL for new "label" param of layout_range's
7188 ctor.
7189 (layout::layout): Initialize m_show_labels_p.
7190 (layout::maybe_add_location_range): Pass in loc_range->m_label
7191 when constructing layout_range instances.
7192 (struct line_label): New struct.
7193 (layout::print_any_labels): New member function.
7194 (layout::print_line): Call it if label-printing is enabled.
7195 (selftest::test_one_liner_labels): New test.
7196 (selftest::test_diagnostic_show_locus_one_liner): Call it.
7197 * diagnostic.c (diagnostic_initialize): Initialize
7198 context->show_labels_p.
7199 * diagnostic.h (struct diagnostic_context): Add field
7200 "show_labels_p".
7201 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7202 -fno-diagnostics-show-labels.
7203 * dwarf2out.c (gen_producer_string): Add
7204 OPT_fdiagnostics_show_labels to the ignored options.
7205 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
7206 param.
7207 (gcc_rich_location::maybe_add_expr): Likewise.
7208 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
7209 label" param, defaulting to NULL.
7210 (gcc_rich_location::add_expr): Add "label" param.
7211 (gcc_rich_location::maybe_add_expr): Likewise.
7212 (class text_range_label): New class.
7213 (class range_label_for_type_mismatch): New class.
7214 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
7215 of format_warning_va.
7216 (fmtwarn_n): Likewise for new params of format_warning_n_va.
7217 * lto-wrapper.c (merge_and_complain): Add
7218 OPT_fdiagnostics_show_labels to the "pick one setting" options.
7219 (append_compiler_options): Likewise to the dropped options.
7220 (append_diag_options): Likewise to the passed-on options.
7221 * opts.c (common_handle_option): Handle the new option.
7222 * selftest-diagnostic.c
7223 (test_diagnostic_context::test_diagnostic_context): Enable
7224 show_labels_p.
7225 * substring-locations.c: Include "gcc-rich-location.h".
7226 (format_warning_n_va): Add "fmt_label" and "param_label" params
7227 and use them as appropriate.
7228 (format_warning_va): Add "fmt_label" and "param_label" params,
7229 passing them on to format_warning_n_va.
7230 (format_warning_at_substring): Likewise.
7231 (format_warning_at_substring_n): Likewise.
7232 * substring-locations.h (format_warning_va): Add "fmt_label" and
7233 "param_label" params.
7234 (format_warning_n_va): Likewise.
7235 (format_warning_at_substring): Likewise.
7236 (format_warning_at_substring_n): Likewise.
7237 * toplev.c (general_init): Initialize global_dc->show_labels_p.
7238
7239 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
7240
7241 PR testsuite/86519
7242 * builtins.c (expand_builtin_memcmp): Do not expand the call
7243 when overflow is detected.
7244
7245 2018-08-15 Martin Sebor <msebor@redhat.com>
7246
7247 PR tree-optimization/71625
7248 * config/aarch64/aarch64-builtins.c
7249 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7250
7251 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
7252
7253 * config/s390/s390.c (s390_reorg): Remove loop.
7254
7255 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7256
7257 * config/darwin.c
7258 (darwin_function_switched_text_sections): Delete.
7259 * gcc/config/darwin.h
7260 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7261
7262 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7263
7264 PR target/81685
7265 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7266 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
7267 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7268
7269 2018-08-15 Martin Liska <mliska@suse.cz>
7270
7271 PR tree-optimization/86925
7272 * predict.c (expr_expected_value_1): When taking
7273 later predictor, assign also probability.
7274 Use fold_build2_initializer_loc in order to fold
7275 the expression in -frounding-math.
7276
7277 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
7278
7279 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7280 patterns.
7281 (expand_vec_perm_1): Try the new method.
7282
7283 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
7284
7285 PR target/86547
7286 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7287 Check whether lra_live_max_point is 0 before dividing.
7288
7289 2018-08-14 Martin Sebor <msebor@redhat.com>
7290
7291 PR tree-optimization/86650
7292 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7293 (vrp_prop::check_mem_ref): Same.
7294
7295 2018-08-13 Liu Hao <lh_mouse@126.com>
7296
7297 * pretty-print.c (eat_esc_sequence): Swap the foreground and
7298 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7299 and clear it thereafter, as it only works for DBCS.
7300
7301 2018-08-13 Liu Hao <lh_mouse@126.com>
7302
7303 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7304 handle returned by _get_osf_handle().
7305
7306 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7307
7308 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7309 for folding vec_perm.
7310
7311 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7312
7313 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7314 Add support for gimple-folding of vec_pack() and vec_unpack()
7315 intrinsics.
7316
7317 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7318
7319 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7320 vec_xst variants to the list.
7321 (rs6000_gimple_fold_builtin): Add support for folding unaligned
7322 vector loads and stores.
7323
7324 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
7325
7326 * config.gcc (rs6000-ibm-aix4.x): Delete.
7327 (rs6000-ibm-aix5.1): Delete.
7328 (rs6000-ibm-aix5.2): Delete.
7329 (rs6000-ibm-aix5.3): Delete.
7330 * config/rs6000/aix43.h: Delete.
7331 * config/rs6000/aix51.h: Delete.
7332 * config/rs6000/aix52.h: Delete.
7333 * config/rs6000/t-aix43: Delete.
7334
7335 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
7336
7337 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7338 New function.
7339 (s390_decompose_address): Factor out constant pool ref
7340 decomposition.
7341
7342 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7343
7344 * config/nds32/nds32-predicates.c
7345 (nds32_can_use_bclr_p): Change return type as bool.
7346 (nds32_can_use_bset_p): Ditto.
7347 (nds32_can_use_btgl_p): Ditto.
7348 (nds32_can_use_bitci_p): Ditto.
7349 * config/nds32/nds32-protos.h
7350 (nds32_can_use_bclr_p): Change declaration.
7351 (nds32_can_use_bset_p): Ditto.
7352 (nds32_can_use_btgl_p): Ditto.
7353 (nds32_can_use_bitci_p): Ditto.
7354
7355 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7356
7357 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7358 Support -msched-prolog-epilog option.
7359 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7360
7361 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7362
7363 * common/config/nds32/nds32-common.c
7364 (nds32_option_optimization_table): Enalbe -malways-align.
7365
7366 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7367
7368 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7369 extra_headers.
7370 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7371 OPT_misr_secure_ case.
7372 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7373 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7374 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7375 secure attribute.
7376 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7377 (nds32_isr_info): New field security_level.
7378 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7379 * config/nds32/nds32.md (return_internal): Consider critical attribute.
7380 * config/nds32/nds32.opt (misr-secure): New option.
7381 * config/nds32/nds32_init.inc: New file.
7382 * config/nds32/nds32_isr.h: New file.
7383
7384 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
7385
7386 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7387 Update comment for atomic instructions.
7388 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7389 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7390 Remove.
7391 (atomic_loaddi): Revise fence expansion to only emit fence prior to
7392 load for __ATOMIC_SEQ_CST model.
7393 (atomic_loaddi_1): Remove float register target.
7394 (atomic_storedi): Handle CONST_INT values.
7395 (atomic_storedi_1): Remove float register source. Add special case
7396 for zero value.
7397 (memory_barrier): New expander and insn.
7398
7399 2018-08-11 Jakub Jelinek <jakub@redhat.com>
7400
7401 PR tree-optimization/86835
7402 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7403 new_stmt after def_gsi, make sure to insert new_square_stmt after
7404 that stmt, not 2 stmts before it.
7405
7406 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
7407
7408 PR target/82418
7409 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7410 instead of SWI48.
7411
7412 2018-08-10 Martin Liska <mliska@suse.cz>
7413
7414 PR target/83610
7415 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7416 function type.
7417 * builtins.c (expand_builtin_expect_with_probability):
7418 New function.
7419 (expand_builtin_expect_with_probability): New function.
7420 (build_builtin_expect_predicate): Add new argumnet probability
7421 for BUILT_IN_EXPECT_WITH_PROBABILITY.
7422 (fold_builtin_expect):
7423 (fold_builtin_2):
7424 (fold_builtin_3):
7425 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7426 * builtins.h (fold_builtin_expect): Set new argument.
7427 * doc/extend.texi: Document __builtin_expect_with_probability.
7428 * doc/invoke.texi: Likewise.
7429 * gimple-fold.c (gimple_fold_call): Pass new argument.
7430 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7431 also BUILT_IN_EXPECT_WITH_PROBABILITY.
7432 * predict.c (get_predictor_value): New function.
7433 (expr_expected_value): Add new argument probability. Assume
7434 that predictor and probability are always non-null.
7435 (expr_expected_value_1): Likewise. For __builtin_expect and
7436 __builtin_expect_with_probability set probability. Handle
7437 combination in binary expressions.
7438 (tree_predict_by_opcode): Simplify code by simply calling
7439 get_predictor_value.
7440 (pass_strip_predict_hints::execute): Add handling of
7441 BUILT_IN_EXPECT_WITH_PROBABILITY.
7442 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7443 new predictor.
7444 * tree.h (DECL_BUILT_IN_P): New function.
7445
7446 2018-08-10 Martin Liska <mliska@suse.cz>
7447
7448 PR tree-optimization/85799
7449 * passes.def: Add argument for pass_strip_predict_hints.
7450 * predict.c (class pass_strip_predict_hints): Add new argument
7451 early_p.
7452 (strip_predictor_early): New function.
7453 (pass_strip_predict_hints::execute): Call the function to
7454 strip predictors.
7455 (strip_predict_hints): New function.
7456 * predict.def: Fix comment.
7457
7458 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7459
7460 * Makefile.in: Clarify which tm.texi to copy over to assert the
7461 right to grant a GFDL license for all.
7462
7463 2018-08-09 Jeff Law <law@redhat.com>
7464
7465 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7466 unused variable.
7467
7468 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7469
7470 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7471 prototype.
7472
7473 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7474
7475 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7476 reductions for variable-length vectors.
7477
7478 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7479
7480 PR other/84889
7481 * common.opt (fdiagnostics-show-line-numbers): New option.
7482 * diagnostic-show-locus.c (class layout): Add fields
7483 "m_show_line_numbers_p" and "m_linenum_width";
7484 (num_digits): New function.
7485 (test_num_digits): New function.
7486 (layout::layout): Initialize new fields. Update m_x_offset
7487 logic to handle any left margin.
7488 (layout::print_source_line): Print line number when requested.
7489 (layout::start_annotation_line): New member function.
7490 (layout::print_annotation_line): Call it.
7491 (layout::print_leading_fixits): Likewise.
7492 (layout::print_trailing_fixits): Likewise. Update calls to
7493 move_to_column for new parameter.
7494 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7495 it to potentially call start_annotation_line.
7496 (layout::show_ruler): Call start_annotation_line.
7497 (selftest::test_line_numbers_multiline_range): New selftest.
7498 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7499 and selftest::test_line_numbers_multiline_range.
7500 * diagnostic.c (diagnostic_initialize): Initialize
7501 show_line_numbers_p.
7502 * diagnostic.h (struct diagnostic_context): Add field
7503 "show_line_numbers_p".
7504 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7505 -fno-diagnostics-show-line-numbers.
7506 * dwarf2out.c (gen_producer_string): Add
7507 OPT_fdiagnostics_show_line_numbers to the ignored options.
7508 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7509 one setting" options.
7510 (append_compiler_options): Likewise to the dropped options.
7511 (append_diag_options): Likewise to the passed-on options.
7512 * opts.c (common_handle_option): Handle the new option.
7513 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7514
7515 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7516
7517 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7518 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7519 third argument of type "const signed char" to descriptions of
7520 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7521 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7522 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7523 __builtin_bcdsub_ov functions.
7524
7525 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7526
7527 PR tree-optimization/86858
7528 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7529 flow_bb_inside_loop_p calls.
7530
7531 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7532
7533 PR tree-optimization/86871
7534 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7535 instead of gimple_assign_lhs.
7536
7537 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7538
7539 PR target/86887
7540 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7541 register constraint to operand 0.
7542 (add<mode>3_carryinC): Likewise.
7543 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7544
7545 2018-08-09 Martin Liska <mliska@suse.cz>
7546
7547 PR c/86895
7548 * common.opt: Remove extra line.
7549
7550 2018-08-09 Martin Liska <mliska@suse.cz>
7551
7552 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7553 at the end of a line, make first letter capital and end up
7554 a sentence with a dot.
7555 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7556 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7557 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7558 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7559 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7560 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7561 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7562 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7563 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7564 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7565 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7566 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7567 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7568 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7569 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7570 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7571 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7572 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7573
7574 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7575
7576 PR target/84332
7577 * config/s390/s390.c (s390_option_override_internal): Reduce the
7578 stack-clash-protection-probe-interval param if it would be too big
7579 for z900.
7580
7581 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7582
7583 PR target/46179
7584 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7585 * config/m68k/m68k.c (handle_move_double): Don't call
7586 m68k_final_prescan_insn.
7587 (m68k_adjust_decorated_operand): Renamed from
7588 m68k_final_prescan_insn, remove first and third operand and
7589 simplify.
7590 (print_operand): Call it.
7591 (print_operand_address): Call it.
7592
7593 2018-08-08 Nathan Sidwell <nathan@acm.org>
7594
7595 * diagnostic.c (diagnostic_report_current_module): Use
7596 linemap_included_from & linemap_included_from_linemap.
7597
7598 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7599
7600 * config/aarch64/aarch64-cores.def: Add phecda core.
7601 * config/aarch64/aarch64-tune.md: Regenerate.
7602 * doc/invoke.texi: Add phecda core.
7603
7604 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7605
7606 PR target/85295
7607 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7608 definitions.
7609 * config/s390/s390.md ("movti"): Add more alternatives for
7610 constant to GPR copies.
7611
7612 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7613
7614 * config/s390/s390.c: Fix whitespace damage throughout the file.
7615 * config/s390/s390.h: Likewise.
7616 * config/s390/tpf.h: Likewise.
7617
7618 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7619
7620 * config/s390/s390.c (s390_loadrelative_operand_p):
7621 Remove TARGET_CPU_ZARCH usages.
7622 (s390_rtx_costs): Likewise.
7623 (s390_legitimate_constant_p): Likewise.
7624 (s390_cannot_force_const_mem): Likewise.
7625 (legitimate_reload_constant_p): Likewise.
7626 (s390_preferred_reload_class): Likewise.
7627 (legitimize_pic_address): Likewise.
7628 (legitimize_tls_address): Likewise.
7629 (s390_split_branches): Removed.
7630 (s390_add_execute): Removed.
7631 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7632 (s390_mainpool_start): Likewise.
7633 (s390_mainpool_finish): Likewise.
7634 (s390_mainpool_cancel): Removed.
7635 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7636 (s390_chunkify_cancel): Likewise.
7637 (s390_return_addr_rtx): Likewise.
7638 (s390_register_info): Remove split_branches_pending_p uages.
7639 (s390_optimize_register_info): Likewise.
7640 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7641 split_branches_pending_p usages.
7642 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7643 (s390_load_got): Likewise.
7644 (s390_expand_split_stack_prologue): Likewise.
7645 (output_asm_nops): Likewise.
7646 (s390_function_profiler): Likewise.
7647 (s390_emit_call): Likewise.
7648 (s390_conditional_register_usage): Likewise.
7649 (s390_optimize_prologue): Likewise.
7650 (s390_reorg): Remove TARGET_CPU_ZARCH and
7651 split_branches_pending_p usages.
7652 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7653 usages.
7654 (s390_output_indirect_thunk_function): Likewise.
7655 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7656 (TARGET_CPU_ZARCH_P): Removed.
7657 (struct machine_function): Remove split_branches_pending_p.
7658 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7659
7660 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7661
7662 * common/config/s390/s390-common.c (processor_flags_table):
7663 Remove flags.
7664 * config.gcc: Remove with_arch/with_tune support.
7665 * config/s390/2064.md: Remove cpu attribute comparisons.
7666 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7667 Remove MTN.
7668 * config/s390/linux.h (ASM_SPEC):
7669 Remove -march support.
7670 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7671 Use a table to get an arch level.
7672 * config/s390/s390-opts.h (enum processor_type):
7673 Remove enum values.
7674 * config/s390/s390.c
7675 (processor_table): Remove entries, add arch_level values.
7676 (s390_issue_rate): Remove cases.
7677 (s390_option_override): Adjust
7678 s390_option_override_internal() call.
7679 (s390_option_override_internal): Remove deprecation warning.
7680 (s390_valid_target_attribute_tree): Adjust
7681 s390_option_override_internal() call.
7682 * config/s390/s390.h (struct s390_processor):
7683 Share with s390-c.c, add arch_level field.
7684 * config/s390/s390.md:
7685 Remove occurrences in cpu attribute.
7686 * config/s390/s390.opt: Remove -march/-mtune support.
7687 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7688 * doc/invoke.texi: Remove deprecation warning.
7689
7690 2018-08-08 Luis Machado <luis.machado@linaro.org>
7691
7692 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7693 global.
7694 (qdf24xx_tunings): Set vector cost structure to
7695 qdf24xx_vector_cost.
7696
7697 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7698 <register_sextend>: Set to 3.
7699
7700 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7701
7702 PR target/86838
7703 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7704 * config/aarch64/aarch64-simd.md
7705 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7706 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7707 (aarch64_frecpx<mode>): ...this new pattern.
7708 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7709 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7710
7711 2018-08-07 Martin Liska <mliska@suse.cz>
7712
7713 PR middle-end/83023
7714 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7715 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7716 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7717 * doc/extend.texi: Document that malloc attribute adds
7718 hit to compiler.
7719
7720 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7721
7722 PR target/86785
7723 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7724 Define to speculation_safe_value_not_needed.
7725
7726 2018-08-06 Jeff Law <law@redhat.com>
7727
7728 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7729 the vr_values instance to cprop_into_stmt.
7730 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7731 (cprop_operand): Also query EVRP to determine if OP is a constant.
7732
7733 2018-08-06 Nathan Sidwell <nathan@acm.org>
7734
7735 * diagnostic.c (diagnostic_report_current_module): Reroll
7736 included-at loop. Translate text.
7737
7738 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7739
7740 * function-tests.c (selftest::test_expansion_to_rtl): Call
7741 free_after_compilation.
7742
7743 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7744
7745 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7746
7747 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7748
7749 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7750 loops with memory block operations from getting unrolled.
7751
7752 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7753
7754 PR target/86807
7755 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7756 Define to speculation_safe_value_not_needed.
7757
7758 2018-08-06 Jeff Law <law@redhat.com>
7759
7760 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7761 assert.
7762
7763 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7764
7765 PR target/86662
7766 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7767 with all enabled __intN types.
7768
7769 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7770
7771 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7772
7773 * alias.c (record_set): Check for clobber high.
7774 * cfgexpand.c (expand_gimple_stmt): Likewise.
7775 * combine-stack-adj.c (single_set_for_csa): Likewise.
7776 * combine.c (find_single_use_1): Likewise.
7777 (set_nonzero_bits_and_sign_copies): Likewise.
7778 (get_combine_src_dest): Likewise.
7779 (is_parallel_of_n_reg_sets): Likewise.
7780 (try_combine): Likewise.
7781 (record_dead_and_set_regs_1): Likewise.
7782 (reg_dead_at_p_1): Likewise.
7783 (reg_dead_at_p): Likewise.
7784 * dce.c (deletable_insn_p): Likewise.
7785 (mark_nonreg_stores_1): Likewise.
7786 (mark_nonreg_stores_2): Likewise.
7787 * df-scan.c (df_find_hard_reg_defs): Likewise.
7788 (df_uses_record): Likewise.
7789 (df_get_call_refs): Likewise.
7790 * dwarf2out.c (mem_loc_descriptor): Likewise.
7791 * haifa-sched.c (haifa_classify_rtx): Likewise.
7792 * ira-build.c (create_insn_allocnos): Likewise.
7793 * ira-costs.c (scan_one_insn): Likewise.
7794 * ira.c (equiv_init_movable_p): Likewise.
7795 (rtx_moveable_p): Likewise.
7796 (interesting_dest_for_shprep): Likewise.
7797 * jump.c (mark_jump_label_1): Likewise.
7798 * postreload-gcse.c (record_opr_changes): Likewise.
7799 * postreload.c (reload_cse_simplify): Likewise.
7800 (struct reg_use): Add source expr.
7801 (reload_combine): Check for clobber high.
7802 (reload_combine_note_use): Likewise.
7803 (reload_cse_move2add): Likewise.
7804 (move2add_note_store): Likewise.
7805 * print-rtl.c (print_pattern): Likewise.
7806 * recog.c (decode_asm_operands): Likewise.
7807 (store_data_bypass_p): Likewise.
7808 (if_test_bypass_p): Likewise.
7809 * regcprop.c (kill_clobbered_value): Likewise.
7810 (kill_set_value): Likewise.
7811 * reginfo.c (reg_scan_mark_refs): Likewise.
7812 * reload1.c (maybe_fix_stack_asms): Likewise.
7813 (eliminate_regs_1): Likewise.
7814 (elimination_effects): Likewise.
7815 (mark_not_eliminable): Likewise.
7816 (scan_paradoxical_subregs): Likewise.
7817 (forget_old_reloads_1): Likewise.
7818 * reorg.c (find_end_label): Likewise.
7819 (try_merge_delay_insns): Likewise.
7820 (redundant_insn): Likewise.
7821 (own_thread_p): Likewise.
7822 (fill_simple_delay_slots): Likewise.
7823 (fill_slots_from_thread): Likewise.
7824 (dbr_schedule): Likewise.
7825 * resource.c (update_live_status): Likewise.
7826 (mark_referenced_resources): Likewise.
7827 (mark_set_resources): Likewise.
7828 * rtl.c (copy_rtx): Likewise.
7829 * rtlanal.c (reg_referenced_p): Likewise.
7830 (single_set_2): Likewise.
7831 (noop_move_p): Likewise.
7832 (note_stores): Likewise.
7833 * sched-deps.c (sched_analyze_reg): Likewise.
7834 (sched_analyze_insn): Likewise.
7835
7836 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7837
7838 * cse.c (invalidate_reg): New function extracted from...
7839 (invalidate): ...here.
7840 (canonicalize_insn): Check for clobber high.
7841 (invalidate_from_clobbers): invalidate clobber highs.
7842 (invalidate_from_sets_and_clobbers): Likewise.
7843 (count_reg_usage): Check for clobber high.
7844 (insn_live_p): Likewise.
7845 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7846 (cselib_invalidate_regno): Check for clobber in setter.
7847 (cselib_invalidate_rtx): Pass through setter.
7848 (cselib_invalidate_rtx_note_stores):
7849 (cselib_process_insn): Check for clobber high.
7850 * cselib.h (cselib_invalidate_rtx): Add operand.
7851
7852 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7853
7854 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7855 (mark_not_eliminable): Likewise.
7856 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7857 * lra-lives.c (process_bb_lives): Check for clobber high.
7858 * lra.c (new_insn_reg): Remember clobber highs.
7859 (collect_non_operand_hard_regs): Check for clobber high.
7860 (lra_set_insn_recog_data): Likewise.
7861 (add_regs_to_insn_regno_info): Likewise.
7862 (lra_update_insn_regno_info): Likewise.
7863
7864 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7865
7866 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7867 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7868
7869 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7870
7871 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7872 (copy_insn_1): Likewise.
7873 (gen_hard_reg_clobber_high): New gen function.
7874 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7875 * genemit.c (gen_exp): Likewise.
7876 (gen_emit_seq): Pass through info.
7877 (gen_insn): Check for CLOBBER_HIGH.
7878 (gen_expand): Pass through info.
7879 (gen_split): Likewise.
7880 (output_add_clobbers): Likewise.
7881 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7882 (remove_clobbers): Likewise.
7883 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7884
7885 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7886
7887 * doc/rtl.texi (clobber_high): Add.
7888 (parallel): Add in clobber high
7889 * rtl.c (rtl_check_failed_code3): Add function.
7890 * rtl.def (CLOBBER_HIGH): Add expression.
7891 * rtl.h (RTL_CHECKC3): Add macro.
7892 (rtl_check_failed_code3): Add declaration.
7893 (XC3EXP): Add macro.
7894
7895 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7896
7897 PR target/86386
7898 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7899 cfun->machine->max_used_stack_alignment if needed.
7900
7901 2018-08-04 Martin Sebor <msebor@redhat.com>
7902
7903 PR tree-optimization/86571
7904 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7905 NaN output to 4.
7906
7907 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7908
7909 PR target/86799
7910 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7911 Define.
7912
7913 2018-08-03 Jeff Law <law@redhat.com>
7914
7915 PR target/86795
7916 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7917 Define to speculation_safe_value_not_needed.
7918
7919 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7920
7921 * doc/gcov.texi (-x): Remove duplicate "to".
7922 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7923 (-Wif-not-aligned): Remove duplicate "is".
7924 (-flto): Remove duplicate "the".
7925 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7926 duplicate "v5.00.b".
7927 (MSP430 Options): Remove duplicate "and" from the description
7928 of "-mgprel-sec=regexp".
7929 (x86 Options): Remove duplicate copies of "vmldLog102" and
7930 vmlsLog104 from description of "-mveclibabi=type".
7931
7932 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7933
7934 * internal-fn.h (first_commutative_argument): Declare.
7935 * internal-fn.c (first_commutative_argument): New function.
7936 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7937 restrictions for pattern statements. Use first_commutative_argument
7938 to look for commutative operands in calls to internal functions.
7939
7940 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7941
7942 * Makefile.in (wide-int-range.o): New.
7943 * tree-vrp.c: Move all the wide_int_* functions to...
7944 * wide-int-range.cc: ...here.
7945 * tree-vrp.h: Move all the wide_int_* prototypes to...
7946 * wide-int-range.h: ...here.
7947
7948 2018-08-03 Tom de Vries <tdevries@suse.de>
7949
7950 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7951 UI_NONE.
7952 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7953 * except.c (output_function_exception_table): Do early exit if
7954 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7955
7956 2018-08-03 Martin Liska <mliska@suse.cz>
7957
7958 * predict.c (dump_prediction): Change to 2 digits
7959 in fraction part.
7960
7961 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7962
7963 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7964 neon_dup_q to...
7965 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7966
7967 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7968
7969 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7970 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7971 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7972 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7973 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7974
7975 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7976
7977 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7978 pp_take_prefix when saving the existing prefix.
7979 * diagnostic.c (diagnostic_append_note): Likewise.
7980 * langhooks.c (lhd_print_error_function): Likewise.
7981 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7982 param's type. Free the existing prefix.
7983 (pp_take_prefix): New function.
7984 (pretty_printer::pretty_printer): Drop the prefix parameter.
7985 Rename the length parameter to match the comment.
7986 (pretty_printer::~pretty_printer): Free the prefix.
7987 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7988 parameter.
7989 (struct pretty_printer): Drop the "const" from "prefix" field's
7990 type and clarify memory management.
7991 (pp_set_prefix): Drop the "const" from the 2nd param.
7992 (pp_take_prefix): New decl.
7993
7994 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7995
7996 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7997 for word_mode_ok here instead of passing as argument.
7998 (expand_block_compare): Change select_block_compare_mode() call.
7999 (expand_strncmp_gpr_sequence): New function.
8000 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
8001
8002 2018-08-02 Jeff Law <law@redhat.com>
8003
8004 PR target/86790
8005 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8006 Define to speculation_safe_value_not_needed.
8007
8008 PR target/86784
8009 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8010 Define to speculation_safe_value_not_needed.
8011
8012 2018-08-02 Tom de Vries <tdevries@suse.de>
8013
8014 PR target/86660
8015 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
8016 function. Return UI_TARGET unconditionally.
8017 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
8018 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8019
8020 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8021
8022 * genemit.c (print_overload_test): Fix typo.
8023
8024 2018-08-02 Richard Biener <rguenther@suse.de>
8025
8026 PR tree-optimization/86816
8027 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
8028 which checks for value availability before querying it.
8029 (gvn_uses_equal): Use it.
8030 (same_succ_hash): Likewise.
8031 (gimple_equal_p): Likewise.
8032
8033 2018-08-02 Nick Clifton <nickc@redhat.com>
8034
8035 PR target/86813
8036 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8037 Define to speculation_safe_value_not_needed.
8038
8039 PR target/86810
8040 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8041 Define to speculation_safe_value_not_needed.
8042
8043 PR target/86810
8044 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8045 Define to speculation_safe_value_not_needed.
8046
8047 PR target/86803
8048 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8049 Define to speculation_safe_value_not_needed.
8050
8051 PR target/86797
8052 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8053 Define to speculation_safe_value_not_needed.
8054
8055 PR target/86791
8056 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8057 Define to speculation_safe_value_not_needed.
8058
8059 PR target/86789
8060 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8061 Define to speculation_safe_value_not_needed.
8062
8063 PR target/86787
8064 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8065 Define to speculation_safe_value_not_needed.
8066
8067 PR target/86782
8068 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8069 speculation_safe_value_not_needed.
8070
8071 PR target/86781
8072 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
8073 to speculation_safe_value_not_needed.
8074
8075 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8076
8077 * doc/md.texi: Expand the documentation of instruction names
8078 to mention port-local uses. Document '@' in pattern names.
8079 * read-md.h (overloaded_instance, overloaded_name): New structs.
8080 (mapping): Declare.
8081 (md_reader::handle_overloaded_name): New member function.
8082 (md_reader::get_overloads): Likewise.
8083 (md_reader::m_first_overload): New member variable.
8084 (md_reader::m_next_overload_ptr): Likewise.
8085 (md_reader::m_overloads_htab): Likewise.
8086 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
8087 m_next_overload_ptr and m_overloads_htab.
8088 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
8089 (get_mode_token, get_code_token, get_int_token): New functions.
8090 (map_attr_string): Add an optional argument that passes back
8091 the associated iterator.
8092 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
8093 (md_reader::handle_overloaded_name, add_overload_instance): New
8094 functions.
8095 (apply_iterators): Handle '@' names. Report an error if '@'
8096 is used without iterators.
8097 (initialize_iterators): Initialize the new iterator_group fields.
8098 * genopinit.c (handle_overloaded_code_for)
8099 (handle_overloaded_gen): New functions.
8100 (main): Use them to print declarations of maybe_code_for_* and
8101 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
8102 * genemit.c (print_overload_arguments, print_overload_test)
8103 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
8104 (main): Use it to print definitions of maybe_code_for_* and
8105 maybe_gen_* functions.
8106 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
8107 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
8108 instead of explicit mode checks.
8109 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
8110 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
8111 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
8112 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
8113 (aarch64_expand_compare_and_swap): Likewise
8114 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
8115 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
8116 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
8117 (aarch64_constant_pool_reload_icode): Delete.
8118 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
8119 instead of aarch64_constant_pool_reload_icode. Use
8120 code_for_aarch64_reload_mov instead of explicit mode checks.
8121 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
8122 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
8123 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
8124 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
8125 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
8126 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
8127 (aarch64_atomic_load_op_code): Delete.
8128 (aarch64_emit_atomic_load_op): Likewise.
8129 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
8130 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
8131 instead of aarch64_emit_atomic_load_op.
8132 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
8133 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
8134 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
8135 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
8136 character before the pattern name.
8137 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
8138 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
8139 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
8140 (aarch64_frecps<mode>): Likewise.
8141 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
8142 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
8143 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
8144 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
8145 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
8146
8147 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8148
8149 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
8150 Allow HFmode constants if TARGET_FP_F16INST.
8151
8152 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
8153
8154 PR target/86014
8155 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
8156 No longer check last store for clobber of address register.
8157
8158 2018-08-02 Martin Liska <mliska@suse.cz>
8159
8160 PR gcov-profile/86817
8161 * gcov.c (process_all_functions): New function.
8162 (main): Call it.
8163 (process_file): Move functions processing to
8164 process_all_functions.
8165
8166 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8167
8168 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
8169 "const" to the "gimple *" and "rtx_insn *" parameters.
8170 * dumpfile.h (dump_user_location_t::dump_user_location_t):
8171 Likewise.
8172 (dump_location_t::dump_location_t): Likewise.
8173
8174 2018-08-01 Martin Sebor <msebor@redhat.com>
8175
8176 PR tree-optimization/86650
8177 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
8178 rather than a "gcall *". Directly pass the data of interest
8179 to percent_K_format, rather than building a temporary CALL_EXPR
8180 to hold it.
8181 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
8182 (gimple_fold_builtin_strncat): Adjust.
8183 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
8184 gcall* argument with gimple*.
8185 * gimple-ssa-warn-restrict.c (check_call): Same.
8186 (wrestrict_dom_walker::before_dom_children): Same.
8187 (builtin_access::builtin_access): Same.
8188 (check_bounds_or_overlap): Same
8189 (maybe_diag_overlap): Same.
8190 (maybe_diag_offset_bounds): Same.
8191 * tree-diagnostic.c (default_tree_printer): Move usage of
8192 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
8193 to this callsite.
8194 * tree-pretty-print.c (percent_K_format): Add argument.
8195 * tree-pretty-print.h: Add argument.
8196 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
8197 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
8198 (maybe_diag_stxncpy_trunc): Same.
8199 (handle_builtin_stxncpy): Same.
8200 (handle_builtin_strcat): Same.
8201
8202 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8203
8204 * match.pd: Optimise pointer range checks.
8205
8206 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8207
8208 PR tree-optimization/86758
8209 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
8210 to remove pattern statements.
8211
8212 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8213
8214 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
8215 result of dfs_enumerate_from when constructing stmt_vec_infos,
8216 instead of additionally calling get_loop_body.
8217
8218 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8219
8220 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
8221 parameter.
8222 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
8223 When creating an iv, assert that the step is not known to be zero.
8224 (vect_setup_realignment): Update call accordingly.
8225 * tree-vect-stmts.c (vectorizable_store): Likewise.
8226 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
8227
8228 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8229
8230 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
8231 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
8232 (vectorizable_reduction): Likewise.
8233 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8234 (vect_detect_hybrid_slp_stmts): Likewise.
8235 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8236
8237 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
8238
8239 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
8240 (wide_int_set_zero_nonzero_bits): ...this.
8241 (zero_nonzero_bits_from_vr): Rename to...
8242 (vrp_set_zero_nonzero_bits): ...this.
8243 (extract_range_from_multiplicative_op_1): Abstract wide int
8244 code...
8245 (wide_int_range_multiplicative_op): ...here.
8246 (extract_range_from_binary_expr_1): Extract wide int binary
8247 operations into their own functions.
8248 (wide_int_range_lshift): New.
8249 (wide_int_range_can_optimize_bit_op): New.
8250 (wide_int_range_shift_undefined_p): New.
8251 (wide_int_range_bit_xor): New.
8252 (wide_int_range_bit_ior): New.
8253 (wide_int_range_bit_and): New.
8254 (wide_int_range_trunc_mod): New.
8255 (extract_range_into_wide_ints): New.
8256 (vrp_shift_undefined_p): New.
8257 (extract_range_from_multiplicative_op): New.
8258 (vrp_can_optimize_bit_op): New.
8259 * tree-vrp.h (value_range::dump): New.
8260 (wide_int_range_multiplicative_op): New.
8261 (wide_int_range_lshift):New.
8262 (wide_int_range_shift_undefined_p): New.
8263 (wide_int_range_bit_xor): New.
8264 (wide_int_range_bit_ior): New.
8265 (wide_int_range_bit_and): New.
8266 (wide_int_range_trunc_mod): New.
8267 (zero_nonzero_bits_from_bounds): Rename to...
8268 (wide_int_set_zero_nonzero_bits): ...this.
8269 (zero_nonzero_bits_from_vr): Rename to...
8270 (vrp_set_zero_nonzero_bits): ...this.
8271 (range_easy_mask_min_max): Rename to...
8272 (wide_int_range_can_optimize_bit_op): this.
8273 * vr-values.c (simplify_bit_ops_using_ranges): Rename
8274 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8275
8276 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8277
8278 * tree-vectorizer.h (vect_orig_stmt): New function.
8279 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8280 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8281 (vect_create_epilog_for_reduction): Likewise.
8282 (vectorizable_live_operation): Likewise.
8283 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8284 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8285 * tree-vect-stmts.c (vectorizable_call): Likewise.
8286 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8287
8288 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8289
8290 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8291 argument.
8292 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8293 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8294 (vect_transform_loop): Likewise.
8295 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8296
8297 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8298
8299 * tree-vectorizer.h (vect_schedule_slp): Return void.
8300 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8301 (vect_schedule_slp): Likewise.
8302
8303 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8304
8305 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8306 argument.
8307 (vect_transform_loop): Update calls accordingly. Schedule SLP
8308 instances before the main loop, if any exist.
8309
8310 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8311
8312 PR tree-optimization/86749
8313 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8314 If the lhs is used in a COND_EXPR, check that it is being used
8315 as the "then" or "else" value.
8316
8317 2018-08-01 Tom de Vries <tdevries@suse.de>
8318
8319 PR target/86800
8320 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8321 speculation_safe_value_not_needed.
8322
8323 2018-08-01 Richard Biener <rguenther@suse.de>
8324
8325 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8326 as base and offset.
8327
8328 2018-08-01 Martin Liska <mliska@suse.cz>
8329
8330 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8331 format how successful transformation is dumped.
8332 (gimple_mod_pow2_value_transform): Likewise.
8333 (gimple_mod_subtract_transform): Likewise.
8334 (gimple_stringops_transform): Likewise.
8335
8336 2018-08-01 Martin Liska <mliska@suse.cz>
8337
8338 PR value-prof/35543
8339 * value-prof.c (interesting_stringop_to_profile_p):
8340 Simplify the code and add BUILT_IN_MEMMOVE.
8341 (gimple_stringops_transform): Likewise.
8342
8343 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
8344
8345 * config/aarch64/aarch64-simd.md
8346 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8347 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8348 use GPI iterator instead of SI mode.
8349
8350 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8351
8352 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8353 rs6000_speculation_barrier.
8354 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8355 new barrier pattern name.
8356
8357 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8358
8359 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8360 (speculation_barrier): New insn.
8361
8362 2018-08-01 Richard Biener <rguenther@suse.de>
8363
8364 PR bootstrap/86724
8365 * graphite.h: Include isl/id.h and isl/space.h to allow build
8366 with ISL 0.20.
8367
8368 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
8369
8370 PR target/86651
8371 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8372 mode for COFF targets.
8373 * defaults.h (TARGET_COFF): Define.
8374 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8375 TARGET_COFF): Define.
8376 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8377 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8378 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8379
8380 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8381
8382 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8383 * gimple-streamer-out.c (output_bb): Save it.
8384 * lto-streamer-in.c (input_struct_function_base): Restore
8385 instance discriminator if available. Create map on demand.
8386 * lto-streamer-out.c (output_struct_function_base): Save it if
8387 available.
8388 * final.c (decl_to_instance_map): Document LTO strategy.
8389
8390 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8391 Olivier Hainque <hainque@adacore.com>
8392
8393 * debug.h (decl_to_instance_map_t): New type.
8394 (decl_to_instance_map): Declare.
8395 (maybe_create_decl_to_instance_map): New inline function.
8396 * final.c (bb_discriminator, last_bb_discriminator): New statics,
8397 to track basic block discriminators.
8398 (final_start_function_1): Initialize them.
8399 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8400 bb_discriminator.
8401 (decl_to_instance_map): New variable.
8402 (map_decl_to_instance, maybe_set_discriminator): New functions.
8403 (notice_source_line): Set discriminator.
8404
8405 2018-07-31 Ian Lance Taylor <iant@golang.org>
8406
8407 * targhooks.c (default_have_speculation_safe_value): Add
8408 ATTRIBUTE_UNUSED.
8409
8410 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8411
8412 * dump-context.h: Include "pretty-print.h".
8413 (dump_context::refresh_dumps_are_enabled): New decl.
8414 (dump_context::emit_item): New decl.
8415 (class dump_context): Add fields "m_test_pp" and
8416 "m_test_pp_flags".
8417 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8418 (temp_dump_context::get_dumped_text): New decl.
8419 (class temp_dump_context): Add field "m_pp".
8420 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8421 (dump_context::refresh_dumps_are_enabled): ...and add a test for
8422 m_test_pp.
8423 (set_dump_file): Update for above change.
8424 (set_alt_dump_file): Likewise.
8425 (dump_loc): New overload, taking a pretty_printer *.
8426 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
8427 to any test pretty-printer.
8428 (make_item_for_dump_gimple_stmt): New function, adapted from
8429 optinfo::add_gimple_stmt.
8430 (dump_context::dump_gimple_stmt): Call it, and use the result,
8431 eliminating the direct usage of dump_file and alt_dump_file in
8432 favor of indirectly using them via emit_item.
8433 (make_item_for_dump_gimple_expr): New function, adapted from
8434 optinfo::add_gimple_expr.
8435 (dump_context::dump_gimple_expr): Call it, and use the result,
8436 eliminating the direct usage of dump_file and alt_dump_file in
8437 favor of indirectly using them via emit_item.
8438 (make_item_for_dump_generic_expr): New function, adapted from
8439 optinfo::add_tree.
8440 (dump_context::dump_generic_expr): Call it, and use the result,
8441 eliminating the direct usage of dump_file and alt_dump_file in
8442 favor of indirectly using them via emit_item.
8443 (make_item_for_dump_printf_va): New function, adapted from
8444 optinfo::add_printf_va.
8445 (make_item_for_dump_printf): New function.
8446 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8447 and use the result, eliminating the direct usage of dump_file and
8448 alt_dump_file in favor of indirectly using them via emit_item.
8449 (make_item_for_dump_dec): New function.
8450 (dump_context::dump_dec): Call it, and use the result,
8451 eliminating the direct usage of dump_file and alt_dump_file in
8452 favor of indirectly using them via emit_item.
8453 (make_item_for_dump_symtab_node): New function, adapted from
8454 optinfo::add_symtab_node.
8455 (dump_context::dump_symtab_node): Call it, and use the result,
8456 eliminating the direct usage of dump_file and alt_dump_file in
8457 favor of indirectly using them via emit_item.
8458 (dump_context::begin_scope): Reimplement, avoiding direct usage
8459 of dump_file and alt_dump_file in favor of indirectly using them
8460 via emit_item.
8461 (dump_context::emit_item): New member function.
8462 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8463 Set up test pretty-printer on the underlying context. Call
8464 refresh_dumps_are_enabled.
8465 (temp_dump_context::~temp_dump_context): Call
8466 refresh_dumps_are_enabled.
8467 (temp_dump_context::get_dumped_text): New member function.
8468 (selftest::verify_dumped_text): New function.
8469 (ASSERT_DUMPED_TEXT_EQ): New macro.
8470 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8471 and then without optinfo enabled. Add uses of
8472 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8473 * dumpfile.h: Update comment for the dump_* API.
8474 * optinfo-emit-json.cc
8475 (selftest::test_building_json_from_dump_calls): Update for new
8476 param for temp_dump_context ctor.
8477 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8478 and "m_owned" field.
8479 (optinfo_item::~optinfo_item): Likewise.
8480 (optinfo::add_item): New member function.
8481 (optinfo::emit): Update comment.
8482 (optinfo::add_string): Delete.
8483 (optinfo::add_printf): Delete.
8484 (optinfo::add_printf_va): Delete.
8485 (optinfo::add_gimple_stmt): Delete.
8486 (optinfo::add_gimple_expr): Delete.
8487 (optinfo::add_tree): Delete.
8488 (optinfo::add_symtab_node): Delete.
8489 (optinfo::add_dec): Delete.
8490 * optinfo.h (class dump_context): New forward decl.
8491 (optinfo::add_item): New decl.
8492 (optinfo::add_string): Delete.
8493 (optinfo::add_printf): Delete.
8494 (optinfo::add_printf_va): Delete.
8495 (optinfo::add_gimple_stmt): Delete.
8496 (optinfo::add_gimple_expr): Delete.
8497 (optinfo::add_tree): Delete.
8498 (optinfo::add_symtab_node): Delete.
8499 (optinfo::add_dec): Delete.
8500 (optinfo::add_poly_int): Delete.
8501 (optinfo_item::optinfo_item): Remove "owned" param.
8502 (class optinfo_item): Remove field "m_owned".
8503
8504 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8505
8506 PR middle-end/86705
8507 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8508 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8509 requested variable alignment.
8510 (expand_one_ssa_partition): Likewise.
8511 (expand_one_var): Likewise.
8512
8513 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8514
8515 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8516 to speculation_safe_value_not_needed.
8517
8518 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8519
8520 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8521 * targhooks.c (speculation_safe_value_not_needed): New function.
8522 * target.def (have_speculation_safe_value): Update documentation.
8523 * doc/tm.texi: Regenerated.
8524
8525 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8526
8527 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8528 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8529 expand.
8530 (despeculate_copy<ALLI:mode>_insn): New insn.
8531 (despeculate_copyti_insn): New insn.
8532 (despeculate_simple<ALLI:mode>): New insn
8533 (despeculate_simpleti): New insn.
8534 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8535 function.
8536 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8537 aarch64_speculation_safe_value.
8538 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8539
8540 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8541
8542 * config/aarch64/aarch64-speculation.cc: New file.
8543 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8544 before pass_reorder_blocks.
8545 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8546 prototype.
8547 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8548 X14 and X15 when tracking speculation.
8549 * config/aarch64/aarch64.md (register name constants): Add
8550 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8551 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8552 (speculation_barrier): New insn attribute.
8553 (cmp<mode>): Allow SP in comparisons.
8554 (speculation_tracker): New insn.
8555 (speculation_barrier): Add speculation_barrier attribute.
8556 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8557 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8558 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8559
8560 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8561
8562 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8563 aarch64_track_speculation is true.
8564 (tb<optab><mode>1): Likewise.
8565 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8566 generate CB[N]Z when tracking speculation.
8567 (aarch64_split_compare_and_swap): Likewise.
8568 (aarch64_split_atomic_op): Likewise.
8569
8570 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8571
8572 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8573
8574 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8575
8576 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8577 (speculation_barrier): New insn.
8578
8579 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8580
8581 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8582 * config/arm/arm.md (speculation_barrier): New expand.
8583 (speculation_barrier_insn): New pattern.
8584
8585 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8586
8587 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8588 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8589 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8590 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8591 list.
8592 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8593 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8594 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8595 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8596 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8597 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8598 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8599 * builtins.c (expand_speculation_safe_value): New function.
8600 (expand_builtin): Call it.
8601 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8602 * doc/extend.texi: Document __builtin_speculation_safe_value.
8603 * doc/md.texi: Document "speculation_barrier" pattern.
8604 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8605 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8606 * doc/tm.texi: Regenerated.
8607 * target.def (have_speculation_safe_value, speculation_safe_value): New
8608 hooks.
8609 * targhooks.c (default_have_speculation_safe_value): New function.
8610 (default_speculation_safe_value): New function.
8611 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8612 (default_speculation_safe_value): Add prototype.
8613
8614 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8615
8616 * dump-context.h (dump_context::dump_loc): New decl.
8617 * dumpfile.c (dump_context::dump_loc): New member function.
8618 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8619 and dump_gimple_stmt.
8620 (dump_context::dump_gimple_expr_loc): Likewise, using
8621 dump_gimple_expr.
8622 (dump_context::dump_generic_expr_loc): Likewise, using
8623 dump_generic_expr.
8624 (dump_context::dump_printf_loc_va): Likewise, using
8625 dump_printf_va.
8626 (dump_context::begin_scope): Explicitly using the global function
8627 "dump_loc", rather than the member function.
8628
8629 2018-07-31 Martin Sebor <msebor@redhat.com>
8630
8631 PR tree-optimization/86741
8632 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8633
8634 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8635
8636 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8637 depend on whether prefetch instructions will be emitted or not.
8638 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8639 will be emitted or not.
8640 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8641 (TARGET_SETMEM_PFD): New macros.
8642
8643 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8644
8645 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8646 (NULL_STMT_VEC_INFO): Delete.
8647 (stmt_vec_info::operator*): Likewise.
8648 (stmt_vec_info::operator gimple *): Likewise.
8649 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8650 of NULL_STMT_VEC_INFO.
8651 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8652 (vect_reassociating_reduction_p): Likewise.
8653 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8654 (vectorizable_store): Likewise.
8655 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8656 (vec_info::free_stmt_vec_infos): Likewise.
8657
8658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8659
8660 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8661 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8662
8663 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8664
8665 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8666 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8667 (vec_info::free_stmt_vec_info): New private member functions.
8668 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8669 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8670 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8671 set_stmt_vec_info_vec and free_stmt_vec_infos.
8672 * tree-vect-loop.c (_loop_vec_info): Remove call to
8673 set_stmt_vec_info_vec.
8674 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8675 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8676 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8677 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8678 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8679 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8680 with the clearing in the xcalloc.
8681 (stmt_vec_info_vec): Delete.
8682 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8683 (vectorize_loops): Likewise.
8684 (vec_info::~vec_info): Remove argument from call to
8685 free_stmt_vec_infos.
8686 (vec_info::add_stmt): Remove vinfo argument from call to
8687 new_stmt_vec_info.
8688
8689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8690
8691 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8692 rather than a gimple stmt.
8693 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8694 information for pattern statements when passed the original
8695 statement; instead wait to be passed the pattern statement itself.
8696 Don't call set_vinfo_for_stmt here.
8697 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8698 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8699 stmt_vec_infos here.
8700 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8701 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8702 stmt_vec_infos entry.
8703
8704 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8705
8706 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8707 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8708 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8709 * tree-vect-stmts.c (vectorizable_call): Likewise.
8710 (vectorizable_simd_clone_call): Likewise.
8711
8712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8713
8714 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8715 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8716 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8717 * tree-vect-loop.c (vect_transform_loop): Likewise.
8718 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8719 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8720
8721 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8722
8723 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8724 (vect_dr_stmt): Delete.
8725 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8726 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8727 of DR_VECT_AUX.
8728 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8729 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8730 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8731 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8732 (vect_analyze_data_refs): Likewise.
8733 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8734 argument.
8735 (vect_find_same_alignment_drs): Likewise.
8736 (vect_slp_analyze_node_dependences): Update calls accordingly.
8737 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8738 instead of DR_VECT_AUX.
8739 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8740 of a vector data references. Use vec_info::lookup_dr instead of
8741 DR_VECT_AUX.
8742 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8743 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8744 instead of DR_VECT_AUX.
8745
8746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8747
8748 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8749 dr_vec_info.
8750 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8751 accordingly.
8752 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8753 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8754 (vect_gen_prolog_loop_niters): Likewise.
8755
8756 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8757
8758 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8759 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8760 (vect_known_alignment_in_bytes, vect_dr_behavior)
8761 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8762 instead of data_references. Update calls to other routines for
8763 which the same change has been made.
8764 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8765 dr_vec_infos instead of stmt_vec_infos.
8766 (vect_analyze_data_ref_dependence): Update call accordingly.
8767 (vect_slp_analyze_data_ref_dependence)
8768 (vect_record_base_alignments): Use DR_VECT_AUX.
8769 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8770 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8771 (vector_alignment_reachable_p, vect_get_data_access_cost)
8772 (vect_peeling_supportable, vect_analyze_group_access_1)
8773 (vect_analyze_group_access, vect_analyze_data_ref_access)
8774 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8775 (vect_compile_time_alias, vect_small_gap_p)
8776 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8777 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8778 instead of data_references. Update calls to other routines for
8779 which the same change has been made.
8780 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8781 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8782 (vect_slp_analyze_and_verify_node_alignment)
8783 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8784 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8785 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8786 above changes.
8787 (_vect_peel_info::dr): Replace with...
8788 (_vect_peel_info::dr_info): ...this new field.
8789 (vect_peeling_hash_get_most_frequent)
8790 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8791 (vect_peeling_hash_get_lowest_cost):
8792 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8793 routines for which the same change has been made.
8794 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8795 data_reference.
8796 * tree-vect-loop-manip.c (get_misalign_in_elems)
8797 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8798 above changes.
8799 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8800 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8801 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8802 (get_group_load_store_type, get_negative_load_store_type)
8803 (vect_get_data_ptr_increment, vectorizable_store)
8804 (vectorizable_load): Likewise.
8805 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8806 Update calls to other routines for which the same change has been made.
8807
8808 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8809
8810 * tree-vectorizer.h (vec_info::move_dr): New member function.
8811 (dataref_aux): Rename to...
8812 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8813 (_stmt_vec_info::dr_aux): Update accordingly.
8814 (_stmt_vec_info::data_ref_info): Delete.
8815 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8816 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8817 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8818 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8819 of data_ref.
8820 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8821 (STMT_VINFO_DR_INFO): New macro.
8822 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8823 (set_dr_misalignment): Update after rename of dataref_aux.
8824 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8825 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8826 initialization of STMT_VINFO_DATA_REF.
8827 * tree-vectorizer.c (vec_info::move_dr): New function.
8828 * tree-vect-patterns.c (vect_recog_bool_pattern)
8829 (vect_recog_mask_conversion_pattern)
8830 (vect_recog_gather_scatter_pattern): Use it.
8831 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8832 the "dr" and "stmt" fields of dr_vec_info instead of
8833 STMT_VINFO_DATA_REF.
8834
8835 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8836
8837 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8838 (is_pattern_stmt_p): Use it.
8839 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8840 on pattern statements.
8841
8842 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8843
8844 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8845 original stmt as a stmt_vec_info rather than a gimple stmt.
8846 (vect_pattern_recog_1): Take the statement directly as a
8847 stmt_vec_info, rather than via a gimple_stmt_iterator.
8848 Update call to vect_mark_pattern_stmts.
8849 (vect_pattern_recog): Update calls accordingly.
8850
8851 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8852
8853 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8854 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8855 a vect_def_type for the first argument.
8856 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8857 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8858 operand if it isn't defined by a vectorized statement.
8859 (vect_build_gather_load_calls): Remove the mask_dt argument and
8860 update calls to vect_get_vec_def_for_stmt_copy.
8861 (vectorizable_bswap): Likewise the dt argument.
8862 (vectorizable_call): Update calls to vectorizable_bswap and
8863 vect_get_vec_def_for_stmt_copy.
8864 (vectorizable_simd_clone_call, vectorizable_assignment)
8865 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8866 (vectorizable_comparison): Update calls to
8867 vect_get_vec_def_for_stmt_copy.
8868 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8869 vect_is_simple_use.
8870 (vect_get_loop_based_defs): Remove dt argument and update call
8871 to vect_get_vec_def_for_stmt_copy.
8872 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8873 and vect_get_vec_def_for_stmt_copy.
8874 (vectorizable_load): Update calls to vect_build_gather_load_calls
8875 and vect_get_vec_def_for_stmt_copy.
8876 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8877 (vectorizable_reduction, vectorizable_live_operation): Update calls
8878 to vect_get_vec_def_for_stmt_copy.
8879
8880 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8881
8882 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8883 and gimple stmt arguments with a stmt_vec_info.
8884 (vect_record_base_alignments): Update calls accordingly.
8885 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8886 and gimple stmt arguments with a stmt_vec_info.
8887 (vect_build_slp_tree_1): Remove vinfo argument and update call
8888 to vect_record_max_nunits.
8889 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8890 and vect_record_max_nunits.
8891
8892 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8893
8894 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8895 file and take a stmt_vec_info instead of a gimple stmt.
8896 (supportable_widening_operation, vect_finish_replace_stmt)
8897 (vect_finish_stmt_generation, vect_get_store_rhs)
8898 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8899 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8900 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8901 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8902 (vect_create_data_ref_ptr, bump_vector_ptr)
8903 (vect_permute_store_chain, vect_setup_realignment)
8904 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8905 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8906 (vectorizable_reduction, vectorizable_induction)
8907 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8908 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8909 than gimple stmts as arguments.
8910 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8911 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8912 (can_group_stmts_p, vect_check_gather_scatter)
8913 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8914 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8915 (vect_permute_load_chain, vect_shift_permute_load_chain)
8916 (vect_transform_grouped_load)
8917 (vect_record_grouped_load_vectors): Likewise.
8918 * tree-vect-loop.c (vect_fixup_reduc_chain)
8919 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8920 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8921 (vectorizable_reduction, vectorizable_induction)
8922 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8923 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8924 (vect_get_load_store_mask): Likewise.
8925 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8926 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8927 * tree-vect-stmts.c (vect_mark_relevant)
8928 (is_simple_and_all_uses_invariant)
8929 (exist_non_indexing_operands_for_use_p, process_use)
8930 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8931 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8932 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8933 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8934 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8935 (get_negative_load_store_type, get_load_store_type)
8936 (vect_check_load_store_mask, vect_check_store_rhs)
8937 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8938 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8939 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8940 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8941 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8942 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8943 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8944 (supportable_widening_operation): Likewise.
8945
8946 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8947
8948 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8949 a stmt_vec_info instead of a gcall.
8950 (vect_check_gather_scatter): Update call accordingly.
8951 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8952 of a gphi.
8953 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8954 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8955 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8956 instead of a gimple stmt.
8957 (vect_transform_loop): Update calls accordingly.
8958 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8959 stmt_vec_infos instead of gimple stmts.
8960 (vect_analyze_slp_instance): Update use accordingly.
8961 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8962 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8963 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8964 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8965 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8966 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8967 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8968 down to subroutines.
8969
8970 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8971
8972 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8973 of the worklist from a vector of gimple stmts to a vector of
8974 stmt_vec_infos.
8975 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8976 (vect_mark_stmts_to_be_vectorized): Likewise
8977
8978 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8979
8980 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8981 statement before passing it to vect_analyze_stmt.
8982 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8983 the chain of phi vector definitions. Track the exit phi via its
8984 stmt_vec_info.
8985 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8986 STMT_VINFO_REDUC_DEF.
8987 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8988 stmt_vec_infos to handle the statement chains.
8989 (vect_get_slp_defs): Record the first statement in the node
8990 using a stmt_vec_info.
8991 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8992 statements here and pass their stmt_vec_info down to subroutines.
8993 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8994 down to vect_finish_stmt_generation.
8995 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8996 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8997 stmt_vec_infos to subroutines.
8998 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8999 chains.
9000
9001 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9002
9003 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
9004 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
9005 (vect_permute_store_chain, vect_setup_realignment)
9006 (vect_permute_load_chain, vect_shift_permute_load_chain)
9007 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
9008 stmts internally, and when passing values to other vectorizer routines.
9009 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9010 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
9011 (vect_analyze_loop_operations, get_initial_def_for_reduction)
9012 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
9013 (vectorizable_reduction, vectorizable_induction)
9014 (vectorizable_live_operation, vect_transform_loop_stmt)
9015 (vect_transform_loop): Likewise.
9016 * tree-vect-patterns.c (vect_reassociating_reduction_p)
9017 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
9018 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
9019 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9020 (vect_slp_analyze_node_operations_1): Likewise.
9021 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9022 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
9023 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
9024 (vect_finish_stmt_generation_1, get_group_load_store_type)
9025 (get_load_store_type, vect_build_gather_load_calls)
9026 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9027 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9028 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9029 (vectorizable_store, vectorizable_load, vectorizable_condition)
9030 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
9031 (supportable_widening_operation): Likewise.
9032 (vect_get_vector_types_for_stmt): Likewise.
9033 * tree-vectorizer.h (vect_dr_behavior): Likewise.
9034
9035 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9036
9037 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9038 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
9039 (vect_permute_store_chain, vect_permute_load_chain)
9040 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
9041 repeated stmt_vec_info lookups.
9042 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9043 (vect_update_ivs_after_vectorizer): Likewise.
9044 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
9045 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9046 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
9047 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9048 (vect_bb_slp_scalar_cost): Likewise.
9049 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
9050
9051 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9052
9053 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
9054 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
9055 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
9056 to get gassigns and gcalls, rather than operating on generc gimple
9057 stmts.
9058 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
9059 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
9060 (vectorizable_load, vect_analyze_stmt): Likewise.
9061 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
9062
9063 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9064
9065 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
9066 return stmt_vec_infos rather than gimple stmts. Do not accept
9067 null arguments.
9068 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
9069 of a gimple stmt.
9070 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9071 Update use of get_later_stmt.
9072 (vect_get_constant_vectors): Update call accordingly.
9073 (vect_schedule_slp_instance): Likewise
9074 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
9075 (vect_slp_analyze_instance_dependence): Likewise.
9076 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
9077
9078 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9079
9080 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
9081 (stmt_info_for_cost::stmt_info): ...this new field.
9082 (add_stmt_costs): Update accordingly.
9083 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9084 (vect_get_known_peeling_cost): Likewise.
9085 (vect_estimate_min_profitable_iters): Likewise.
9086 * tree-vect-stmts.c (record_stmt_cost): Likewise.
9087
9088 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9089
9090 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
9091 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9092 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9093 accordingly.
9094 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
9095
9096 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9097
9098 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
9099 a gimple stmt to a stmt_vec_info.
9100 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9101
9102 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9103
9104 * tree-vectorizer.h (vec_info::grouped_stores): Change from
9105 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9106 (_loop_vec_info::reduction_chains): Likewise.
9107 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
9108 accordingly.
9109 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9110
9111 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9112
9113 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
9114 a gimple stmt to a stmt_vec_info.
9115 (_stmt_vec_info::next_element): Likewise.
9116 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
9117 (vect_slp_analyze_and_verify_node_alignment)
9118 (vect_analyze_group_access_1, vect_analyze_group_access)
9119 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
9120 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
9121 (vect_supportable_dr_alignment): Update accordingly.
9122 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
9123 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
9124 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
9125 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9126 * tree-vect-slp.c (vect_build_slp_tree_1)
9127 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
9128 (vect_split_slp_store_group, vect_analyze_slp_instance)
9129 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
9130 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
9131 (get_group_load_store_type, get_load_store_type)
9132 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
9133 (vect_transform_stmt, vect_remove_stores): Likewise.
9134
9135 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9136
9137 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
9138 than a gimple stmt.
9139 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9140 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
9141 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
9142 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
9143 (vector_alignment_reachable_p, vect_get_data_access_cost)
9144 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
9145 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
9146 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9147 (vect_analyze_group_access_1, vect_analyze_group_access)
9148 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
9149 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
9150 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
9151 result of vect_dr_stmt and use the stmt_vec_info instead of
9152 the associated gimple stmt.
9153 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9154 (vect_gen_prolog_loop_niters): Likewise.
9155 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9156
9157 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9158
9159 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
9160 to a vec<stmt_vec_info>.
9161 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
9162 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
9163 vec<stmt_vec_info>.
9164 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
9165 to a vec<stmt_vec_info>.
9166 (bst_traits::value_type, bst_traits::value_type): Likewise.
9167 (bst_traits::hash): Update accordingly.
9168 (vect_get_and_check_slp_defs): Change the stmts parameter from
9169 a vec<gimple *> to a vec<stmt_vec_info>.
9170 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
9171 (vect_build_slp_tree): Likewise.
9172 (vect_build_slp_tree_2): Likewise. Update uses of
9173 SLP_TREE_SCALAR_STMTS.
9174 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
9175 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
9176 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
9177 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
9178 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
9179 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
9180 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
9181 (vect_get_constant_vectors, vect_get_slp_defs)
9182 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
9183 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
9184 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
9185 instead of gimple stmts.
9186 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
9187 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
9188 (vect_slp_analyze_instance_dependence): Update uses of
9189 SLP_TREE_SCALAR_STMTS.
9190 (vect_slp_analyze_and_verify_node_alignment): Likewise.
9191 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
9192 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
9193 (get_initial_defs_for_reduction): Likewise.
9194 (vect_create_epilog_for_reduction): Likewise.
9195 (vectorize_fold_left_reduction): Likewise.
9196 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
9197 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
9198 (can_vectorize_live_stmts): Likewise.
9199
9200 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9201
9202 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
9203 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9204 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
9205 than gimple stmts.
9206 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
9207 of a gimple stmt.
9208 (gather_scalar_reductions): Update after above interface changes.
9209 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
9210 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
9211 than gimple stmts.
9212 (vect_force_simple_reduction): Likewise.
9213 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
9214 LOOP_VINFO_REDUCTIONS.
9215 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9216
9217 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9218
9219 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
9220 a gimple stmt to a stmt_vec_info.
9221 * tree-vect-loop.c (vect_active_double_reduction_p)
9222 (vect_force_simple_reduction, vectorizable_reduction): Update
9223 accordingly.
9224
9225 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9226
9227 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
9228 vec<gimple *> to a vec<stmt_vec_info>.
9229 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
9230 the reduction_phis argument from a vec<gimple *> to a
9231 vec<stmt_vec_info>.
9232 (vectorizable_reduction): Likewise the phis local variable that
9233 is passed to vect_create_epilog_for_reduction. Update for new type
9234 of SLP_TREE_VEC_STMTS.
9235 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
9236 (vectorizable_live_operation): Likewise.
9237 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
9238 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
9239
9240 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9241
9242 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9243 a gimple stmt to a stmt_vec_info.
9244 (vectorizable_condition, vectorizable_live_operation)
9245 (vectorizable_reduction, vectorizable_induction): Pass back the
9246 vectorized statement as a stmt_vec_info.
9247 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9248 use of STMT_VINFO_VEC_STMT.
9249 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9250 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9251 as stmt_vec_infos rather than gimple stmts.
9252 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9253 to a stmt_vec_info.
9254 (vectorizable_live_operation): Likewise.
9255 (vectorizable_reduction, vectorizable_induction): Likewise,
9256 updating use of STMT_VINFO_VEC_STMT.
9257 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9258 of STMT_VINFO_VEC_STMT.
9259 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9260 (vectorizable_simd_clone_call, vectorizable_conversion)
9261 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9262 (vectorizable_store, vectorizable_load, vectorizable_condition)
9263 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9264 from a gimple stmt to a stmt_vec_info.
9265 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
9266 pointer to a stmt_vec_info to the vectorizable_* routines.
9267
9268 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9269
9270 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9271 a gimple stmt to a stmt_vec_info.
9272 (is_pattern_stmt_p): Update accordingly.
9273 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9274 (vect_record_grouped_load_vectors): Likewise.
9275 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9276 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9277 (vect_model_reduction_cost): Likewise.
9278 (vect_create_epilog_for_reduction): Likewise.
9279 (vectorizable_reduction, vectorizable_induction): Likewise.
9280 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9281 Return the stmt_vec_info for the pattern statement.
9282 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9283 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9284 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9285 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9286 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9287 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9288 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9289 (free_stmt_vec_info, vect_is_simple_use): Likewise.
9290
9291 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9292
9293 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9294 (vect_finish_stmt_generation): Likewise.
9295 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9296 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9297 (vect_build_gather_load_calls): Use the return value of the above
9298 functions instead of a separate call to vinfo_for_stmt. Use narrow
9299 scopes for the input gimple stmt and wider scopes for the associated
9300 stmt_vec_info. Use vec_info::lookup_def when setting these
9301 stmt_vec_infos from an SSA_NAME definition.
9302 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9303 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9304 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9305 (vectorizable_store, vectorizable_load, vectorizable_condition)
9306 (vectorizable_comparison): Likewise.
9307 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9308 (vectorizable_reduction): Likewise.
9309
9310 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9311
9312 * tree-vectorizer.h (vect_is_simple_use): Add an optional
9313 stmt_vec_info * parameter before the optional gimple **.
9314 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9315 (process_use, vect_get_vec_def_for_operand_1): Update callers.
9316 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9317 * tree-vect-loop.c (vectorizable_reduction): Likewise.
9318 (vectorizable_live_operation): Likewise.
9319 * tree-vect-patterns.c (type_conversion_p): Likewise.
9320 (vect_look_through_possible_promotion): Likewise.
9321 (vect_recog_rotate_pattern): Likewise.
9322 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9323
9324 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9325
9326 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9327 a typedef to a wrapper class.
9328 (NULL_STMT_VEC_INFO): New macro.
9329 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9330 (stmt_vec_info::operator*): New function.
9331 (stmt_vec_info::operator gimple *): Likewise.
9332 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9333 (add_stmt_costs): Likewise.
9334 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9335 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9336 (vect_get_known_peeling_cost): Likewise.
9337 (vect_estimate_min_profitable_iters): Likewise.
9338 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9339 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9340 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9341 (vectorizable_store, free_stmt_vec_infos): Likewise.
9342 (new_stmt_vec_info): Change return type of xcalloc to
9343 _stmt_vec_info *.
9344
9345 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9346
9347 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9348 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9349 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9350 a single_imm_use-based sequence.
9351 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9352
9353 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9354
9355 * tree-vectorizer.h (vec_info::lookup_def): Declare.
9356 * tree-vectorizer.c (vec_info::lookup_def): New function.
9357 * tree-vect-patterns.c (vect_get_internal_def): Use it.
9358 (vect_widened_op_tree): Likewise.
9359 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9360 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9361 (vectorizable_reduction): Likewise.
9362 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9363 of a gimple *.
9364 (vect_is_slp_reduction): Update calls accordingly. Use
9365 vec_info::lookup_def.
9366 (vect_is_simple_reduction): Likewise
9367 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9368
9369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9370
9371 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9372 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9373 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9374 of vinfo_for_stmt.
9375 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9376 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9377 (vect_update_vf_for_slp, vect_analyze_loop_operations)
9378 (vect_is_slp_reduction, vectorizable_induction)
9379 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9380 * tree-vect-patterns.c (vect_init_pattern_stmt):
9381 (vect_determine_min_output_precision_1, vect_determine_precisions)
9382 (vect_pattern_recog): Likewise.
9383 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9384 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9385 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9386 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9387 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9388 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
9389 info field from a loop to a loop_vec_info.
9390
9391 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9392
9393 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9394 (vec_info::add_stmt): Declare.
9395 * tree-vectorizer.c (vec_info::add_stmt): New function.
9396 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9397 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9398 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9399 (vectorizable_induction): Likewise.
9400 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9401 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9402 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9403 (vectorizable_load): Likewise.
9404 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9405 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9406 (vect_recog_gather_scatter_pattern): Likewise.
9407 (append_pattern_def_seq): Likewise. Remove a check that is
9408 performed by add_stmt itself.
9409
9410 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9411
9412 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9413 which make_ssa_name was called with new_stmt before new_stmt
9414 had been created.
9415
9416 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9417
9418 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9419 split out from...
9420 (vect_is_slp_reduction): ...here...
9421 (vect_is_simple_reduction): ...and here. Remove repetition of tests
9422 that are already known to be false.
9423
9424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9425
9426 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9427 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
9428 STMT_VINFO_NUM_SLP_USES when it's true.
9429 (vect_free_slp_instance): Add a final_p parameter and pass it to
9430 vect_free_slp_tree.
9431 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9432 (vect_analyze_slp_instance): Likewise.
9433 (vect_slp_analyze_operations): Likewise.
9434 (vect_slp_analyze_bb_1): Likewise.
9435 * tree-vectorizer.c (vec_info): Likewise.
9436 * tree-vect-loop.c (vect_transform_loop): Likewise.
9437
9438 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9439
9440 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9441 function is not called for second and subsequent members of
9442 a reduction group.
9443
9444 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9445
9446 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9447 cases for nested loops from here to ...
9448 (vect_create_epilog_for_reduction): ...here. Only call
9449 vect_is_simple_use for inner-loop reductions.
9450
9451 2018-07-31 Martin Liska <mliska@suse.cz>
9452
9453 PR gcov-profile/85338
9454 PR gcov-profile/85350
9455 PR gcov-profile/85372
9456 * profile.c (struct location_triplet): New.
9457 (struct location_triplet_hash): Likewise.
9458 (output_location): Do not output a BB that
9459 is already recorded for a line.
9460 (branch_prob): Use streamed_locations.
9461
9462 2018-07-31 Martin Liska <mliska@suse.cz>
9463
9464 PR gcov-profile/85370
9465 * coverage.c (coverage_begin_function): Do not mark target
9466 clones as artificial functions.
9467
9468 2018-07-31 Martin Liska <mliska@suse.cz>
9469
9470 PR gcov-profile/83813
9471 PR gcov-profile/84758
9472 PR gcov-profile/85217
9473 PR gcov-profile/85332
9474 * profile.c (branch_prob): Do not record GOTO expressions
9475 for GIMPLE statements which locations are already streamed.
9476
9477 2018-07-31 Olivier Hainque <hainque@adacore.com>
9478
9479 * gcc.c (handle_spec_function): Accept a soft_matched_part
9480 argument, as do_spec_1. Pass it down to ...
9481 (eval_spec_function): Accept a soft_matched_part argument,
9482 and pass it down to ...
9483 (do_spec_2): Accept a soft_matched_part argument, and pass
9484 it down to do_spec_1.
9485 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9486 (handle_braces): Update call to handle_spec_function.
9487 (driver::set_up_specs): Update calls to do_spec_2.
9488 (compare_debug_dump_opt_spec_function): Likewise.
9489 (compare_debug_self_opt_spec_function): Likewise.
9490
9491 2018-07-31 Olivier Hainque <hainque@adacore.com>
9492
9493 * common.opt (nolibc): New option.
9494 * doc/invoke.texi (Link Options): Document it.
9495 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9496 * config/alpha/linux.h: Likewise.
9497 * config/arc/elf.h: Likewise.
9498 * config/arm/uclinux-elf.h: Likewise.
9499 * config/arm/unknown-elf.h: Likewise.
9500 * config/avr/avrlibc.h: Likewise.
9501 * config/bfin/bfin.h: Likewise.
9502 * config/bfin/linux.h: Likewise.
9503 * config/bfin/uclinux.h: Likewise.
9504 * config/darwin.h: Likewise.
9505 * config/darwin10.h: Likewise.
9506 * config/darwin12.h: Likewise.
9507 * config/gnu-user.h: Likewise.
9508 * config/lm32/uclinux-elf.h: Likewise.
9509 * config/pa/pa-hpux11.h: Likewise.
9510 * config/pa/pa64-hpux.h: Likewise.
9511 * config/sparc/sparc.h: Likewise.
9512
9513 2018-07-31 Olivier Hainque <hainque@adacore.com>
9514
9515 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9516 undefined variables.
9517
9518 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9519
9520 PR target/86640
9521 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9522 instead of GEN_INT.
9523
9524 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9525
9526 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9527 terminated string literal.
9528
9529 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9530
9531 PR rtl-optimization/85160
9532 * combine.c (is_just_move): New function.
9533 (try_combine): Allow combining two instructions into two if neither of
9534 the original instructions was a move.
9535
9536 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9537
9538 PR target/86673
9539 * doc/extend.texi (Global Register Variables): Discourage use of type
9540 qualifiers.
9541 (Local Register Variables): Likewise.
9542
9543 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9544
9545 PR tree-optimization/86506
9546 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9547
9548 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9549
9550 PR target/86547
9551 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9552 hard_regno, make sure no insn between `from` and `to` clobbers it.
9553
9554 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9555 Tom de Vries <tdevries@suse.de>
9556
9557 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9558 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9559 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9560 PTX_DEFAULT_RUNTIME_DIM.
9561 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9562
9563 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9564
9565 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9566 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9567 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9568
9569 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9570
9571 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9572 used.
9573 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9574 predicate to reflect toc fusion has been deleted.
9575 (toc_fusion_mem_raw): Delete, no longer used.
9576 (toc_fusion_mem_wrapped): Likewise.
9577 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9578 fusion mask bit.
9579 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9580 Delete, no longer used.
9581 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9582 meant to be used for toc fusion.
9583 (rs6000_debug_print_mode): Delete toc fusion debugging.
9584 (rs6000_debug_reg_global): Likewise.
9585 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9586 fusion and secondary reload support that were never used.
9587 (rs6000_option_override_internal): Delete TOC fusion, that was only
9588 partially defined, and it did not work unless you also used the
9589 -mcmodel= switch.
9590 (rs6000_legitimate_address_p): Delete TOC fusion support.
9591 (rs6000_opt_masks): Likewise.
9592 (fusion_wrap_memory_address): Delete function, no longer used.
9593 (fusion_split_address); Delete TOC fusion support.
9594 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9595 longer used with toc fusion being deleted.
9596 (TARGET_TOC_FUSION_FP): Likewise.
9597 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9598 UNSPEC.
9599 (toc fusion spliter): Delete TOC fusion support.
9600 (toc_fusionload_<mode>): Likewise.
9601 (toc_fusionload_di): Likewise.
9602 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9603 longer needs to be named. Rename predicate to delete TOC fusion.
9604 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9605 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9606 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9607 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9608 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9609
9610 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9611
9612 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9613 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9614 __int128 in built-in function prototypes.
9615 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9616 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9617
9618 2018-07-27 Martin Sebor <msebor@redhat.com>
9619
9620 PR tree-optimization/86696
9621 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9622 types, including enums.
9623 (handle_char_store): Be prepared for the above function to fail.
9624
9625 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9626
9627 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9628 when optimization level is lower than 2 or optimize for size.
9629
9630 2018-07-26 Martin Sebor <msebor@redhat.com>
9631
9632 PR tree-optimization/86043
9633 PR tree-optimization/86042
9634 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9635 (get_string_cst_length): Rename...
9636 (get_min_string_length): ...to this. Add argument.
9637 (handle_char_store): Extend to handle multi-character stores by
9638 MEM_REF.
9639 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9640 * tree.h (initializer_zerop): Add argument.
9641
9642 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9643
9644 PR middle-end/86660
9645 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9646 declare target to variables if they have always,{to,from,tofrom} map
9647 kinds.
9648
9649 2018-07-26 Martin Liska <mliska@suse.cz>
9650
9651 PR lto/86548
9652 * lto-wrapper.c: Add linker_output as prefix
9653 for ltrans_output_file.
9654
9655 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9656
9657 PR rtl-optimization/85805
9658 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9659 value for hard registers if that was written in the same mode.
9660
9661 2018-07-26 Martin Liska <mliska@suse.cz>
9662
9663 PR gcov-profile/86536
9664 * gcov.c (format_gcov): Use printf format %.*f directly
9665 and do not handle special values.
9666
9667 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9668
9669 * common/config/arc/arc-common.c (arc_option_optimization_table):
9670 Update default optimizations for size.
9671
9672 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9673
9674 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9675 * config/arc/constraints.md (CfZ): New constraint.
9676 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9677 (subsf3_fpu): Likewise.
9678 (cmpsf_fpu): Likewise.
9679 (cmpsf_fpu_uneq): Likewise.
9680
9681 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9682
9683 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9684 accesses as well.
9685 (arc_is_uncached_mem_p): uncached applies to both the variable and
9686 the pointer.
9687
9688 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9689
9690 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9691 register names.
9692
9693 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9694
9695 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9696 field "m_scopes" from vec to auto_vec.
9697
9698 2018-07-25 Martin Liska <mliska@suse.cz>
9699
9700 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9701 return type.
9702
9703 2018-07-25 Richard Biener <rguenther@suse.de>
9704
9705 PR debug/86654
9706 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9707 special wrt context_die late.
9708 (gen_subprogram_die): Re-use DIEs in local scope.
9709
9710 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9711
9712 PR tree-optimization/86644
9713 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9714
9715 2018-07-25 Martin Liska <mliska@suse.cz>
9716
9717 PR middle-end/86645
9718 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9719 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9720
9721 2018-07-25 Martin Liska <mliska@suse.cz>
9722
9723 PR sanitizer/79635
9724 * params.def: Explain ASan abbreviation and provide
9725 a documentation link.
9726
9727 2018-07-24 Martin Sebor <msebor@redhat.com>
9728
9729 PR tree-optimization/86622
9730 PR tree-optimization/86532
9731 * builtins.h (string_length): Declare.
9732 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9733 (check_access): Be prepared for non-constant length ranges.
9734 (string_length): Make extern.
9735 * expr.c (string_constant): Only handle the minor non-constant
9736 array index. Use string_constant to compute the length of
9737 a generic string constant.
9738
9739 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9740
9741 PR tree-optimization/86618
9742 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9743 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9744
9745 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9746
9747 PR tree-optimization/86636
9748 * json.cc (json::object::set): Fix comment. Add assertions.
9749 (json::array::append): Move here from json.h. Add comment and an
9750 assertion.
9751 (json::string::string): Likewise.
9752 * json.h (json::array::append): Move to json.cc.
9753 (json::string::string): Likewise.
9754 * optinfo-emit-json.cc
9755 (optrecord_json_writer::impl_location_to_json): Assert that we
9756 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9757 wrapper around it. Expand the location once, rather than three
9758 times.
9759 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9760 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9761 wrappers.
9762 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9763 places. Fix some overlong lines.
9764
9765 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9766
9767 * config/aarch64/aarch64-simd.md
9768 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9769 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9770 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9771 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9772 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9773 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9774 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9775 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9776 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9777
9778 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9779
9780 PR middle-end/86627
9781 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9782 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9783 and abs_d == d, do the power of two handling if profitable.
9784
9785 2018-07-24 Richard Biener <rguenther@suse.de>
9786
9787 * match.pd: Add BIT_FIELD_REF canonicalizations.
9788
9789 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9790
9791 PR c/86617
9792 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9793
9794 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9795
9796 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9797 terminated STRING_CST object.
9798
9799 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9800
9801 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9802
9803 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9804
9805 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9806 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9807 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9808 the elements into a register.
9809 (rs6000_split_v4si_init_di_reg): Delete.
9810 (rs6000_split_v4si_init): Delete.
9811 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9812 (vsx_init_v4si): Rewrite as a define_expand.
9813
9814 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9815
9816 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9817 zero_extend argument from memory): New.
9818
9819 2018-07-22 Martin Sebor <msebor@redhat.com>
9820
9821 PR bootstrap/86621
9822 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9823 diagnosing calls with unknown arguments unless -Walloca-larger-than
9824 is restricted to less than PTRDIFF_MAX bytes.
9825
9826 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9827
9828 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9829
9830 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9831
9832 * pretty-print.c (text_info::set_location): Remove redundant
9833 "line_table" parameter from call to rich_location::set_range.
9834
9835 2018-07-20 Martin Sebor <msebor@redhat.com>
9836
9837 PR middle-end/82063
9838 * builtins.c (expand_builtin_alloca): Adjust.
9839 * calls.c (alloc_max_size): Simplify.
9840 * cgraphunit.c (cgraph_node::expand): Adjust.
9841 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9842 variables.
9843 (frame_larger_than_size): Same.
9844 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9845 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9846 Initialize.
9847 * doc/invoke.texi (GCC Command Options): Document option arguments.
9848 Explain byte-size arguments and suffixes.
9849 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9850 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9851 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9852 * doc/options.texi (UInteger): Expand.
9853 (Host_Wide_Int, ByteSize): Document new properties.
9854 * final.c (final_start_function_1): Include sizes in an error message.
9855 * function.c (frame_offset_overflow): Same.
9856 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9857 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9858 Diagnose unbounded alloca calls only for limits of less than
9859 PTRDIFF_MAX.
9860 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9861 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9862 for alloca(0).
9863 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9864 only for limits of less than PTRDIFF_MAX.
9865 * langhooks-def.h (lhd_handle_option): Change function argument
9866 to HOST_WIDE_INT.
9867 * langhooks.c (lhd_handle_option): Same.
9868 * langhooks.h (handle_option): Same.
9869 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9870 ByteSize flags.
9871 (var_type, var_type_struct): Same.
9872 (var_set): Handle ByteSize flag.
9873 * optc-gen.awk: Add comments to output to ease debugging. Make
9874 use of HOST_WIDE_INT where appropriate.
9875 * opts-gen-save.awk: Use %lx to format unsigned long.
9876 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9877 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9878 arguments. Parse bytes-size suffixes.
9879 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9880 (enum_value_to_arg): Same.
9881 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9882 (handle_option): Adjust.
9883 (generate_option): Change function argument to HOST_WIDE_INT.
9884 (cmdline_handle_error): Adjust.
9885 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9886 (set_option): Change function argument to HOST_WIDE_INT.
9887 (option_enabled): Handle cl_host_wide_int.
9888 (get_option_state): Handle CLVC_SIZE.
9889 (control_warning_option): Same.
9890 * opts.c (common_handle_option): Change function argument to
9891 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9892 OPT_Wvla_larger_than_.
9893 * opts.h (enum cl_var_type): Add an enumerator.
9894 * stor-layout.c (layout_decl): Print a more meaningful warning.
9895 * toplev.c (output_stack_usage): Adjust.
9896
9897 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9898
9899 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9900 call to inline_expand_builtin_string_cmp.
9901 (expand_builtin_strcmp): Likewise.
9902 (expand_builtin_strncmp): Likewise.
9903 (inline_string_cmp): Delete the last parameter, change char_type_node
9904 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9905 two operands.
9906 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9907 the inlining expansion on target where the type of the call has same or
9908 narrower precision than unsigned char.
9909
9910 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9911
9912 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9913 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9914 * common.opt (fsave-optimization-record): New option.
9915 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9916 * doc/invoke.texi (-fsave-optimization-record): New option.
9917 * dumpfile.c: Include "optinfo-emit-json.h".
9918 (struct kv_pair): Move to coretypes.h.
9919 (optgroup_options): Make non-static.
9920 (dump_context::end_scope): Call
9921 optimization_records_maybe_pop_dump_scope.
9922 * dumpfile.h (optgroup_options): New decl.
9923 * json.cc: New file.
9924 * json.h: New file.
9925 * optinfo-emit-json.cc: New file.
9926 * optinfo-emit-json.h: New file.
9927 * optinfo.cc: Include "optinfo-emit-json.h".
9928 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9929 (optinfo_enabled_p): Check optimization_records_enabled_p.
9930 (optinfo_wants_inlining_info_p): Likewise.
9931 * optinfo.h: Update comment.
9932 * profile-count.c (profile_quality_as_string): New function.
9933 * profile-count.h (profile_quality_as_string): New decl.
9934 (profile_count::quality): New accessor.
9935 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9936 and optinfo_emit_json_cc_tests.
9937 * selftest.h (selftest::json_cc_tests): New decl.
9938 (selftest::optinfo_emit_json_cc_tests): New decl.
9939 * toplev.c: Include "optinfo-emit-json.h".
9940 (compile_file): Call optimization_records_finish.
9941 (do_compile): Call optimization_records_start.
9942 * tree-ssa-live.c: Include optinfo.h.
9943 (remove_unused_scope_block_p): Retain inlining information if
9944 optinfo_wants_inlining_info_p returns true.
9945
9946 2018-07-20 Richard Biener <rguenther@suse.de>
9947
9948 PR debug/86585
9949 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9950 to cover -flto-partition=none.
9951
9952 2018-07-20 Martin Liska <mliska@suse.cz>
9953
9954 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9955 (get_decl_source_range): Remove unused function.
9956
9957 2018-07-20 Richard Biener <rguenther@suse.de>
9958
9959 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9960 (struct vn_phi_s): Likewise.
9961 (struct vn_reference_s): Likewise.
9962 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9963 for searching the slot of an entry known to be in the hash itself.
9964 (vn_phi_hasher::equal): Likewise.
9965 (vn_reference_hasher::equal): Likewise.
9966 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9967 globals.
9968 (optimistic_info, current_info): Remove, keeping only valid_info.
9969 (vn_reference_lookup_1): Remove fallback lookup.
9970 (vn_reference_lookup_2): Likewise.
9971 (vn_nary_op_lookup_1): Likewise.
9972 (vn_phi_lookup): Likewise.
9973 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9974 hash element.
9975 (vn_reference_insert): Adjust, chain the inserted hash element
9976 at last_inserted_ref.
9977 (vn_reference_insert_pieces): Likewise.
9978 (visit_reference_op_call): Likewise.
9979 (vn_nary_op_insert_into): Chain the inserted hash element at
9980 last_inserted_nary.
9981 (vn_nary_op_insert_pieces): Adjust.
9982 (vn_nary_op_insert): Likewise.
9983 (vn_nary_op_insert_stmt): Likewise.
9984 (vn_phi_insert): Adjust, chain the inserted hash element at
9985 last_inserted_phi.
9986 (process_scc): Remove clearing and copying the optimistic
9987 table. Instead remove elements inserted during an optimistic
9988 iteration from the single table we maintain.
9989 (init_scc_vn): Adjust.
9990 (free_scc_vn): Likewise.
9991 (sccvn_dom_walker::record_cond): Likewise.
9992 (sccvn_dom_walker::after_dom_children): Likewise.
9993
9994 2018-07-19 Martin Sebor <msebor@redhat.com>
9995
9996 PR tree-optimization/84047
9997 PR tree-optimization/83776
9998 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9999 (check_array_bounds): Call it.
10000
10001 2018-07-19 Martin Sebor <msebor@redhat.com>
10002
10003 * align.h (align_flags): Use member initialization.
10004
10005 2018-07-19 David Malcolm <dmalcolm@redhat.com>
10006
10007 * Makefile.in (OBJS): Add optinfo.o.
10008 * coretypes.h (class symtab_node): New forward decl.
10009 (struct cgraph_node): New forward decl.
10010 (class varpool_node): New forward decl.
10011 * dump-context.h: New file.
10012 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
10013 "tree-pass.h".
10014 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
10015 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
10016 (set_alt_dump_file): Likewise.
10017 (dump_context::~dump_context): New dtor.
10018 (dump_gimple_stmt): Move implementation to...
10019 (dump_context::dump_gimple_stmt): ...this new member function.
10020 Add the stmt to any pending optinfo, creating one if need be.
10021 (dump_gimple_stmt_loc): Move implementation to...
10022 (dump_context::dump_gimple_stmt_loc): ...this new member function.
10023 Start a new optinfo and add the stmt to it.
10024 (dump_gimple_expr): Move implementation to...
10025 (dump_context::dump_gimple_expr): ...this new member function.
10026 Add the stmt to any pending optinfo, creating one if need be.
10027 (dump_gimple_expr_loc): Move implementation to...
10028 (dump_context::dump_gimple_expr_loc): ...this new member function.
10029 Start a new optinfo and add the stmt to it.
10030 (dump_generic_expr): Move implementation to...
10031 (dump_context::dump_generic_expr): ...this new member function.
10032 Add the tree to any pending optinfo, creating one if need be.
10033 (dump_generic_expr_loc): Move implementation to...
10034 (dump_context::dump_generic_expr_loc): ...this new member
10035 function. Add the tree to any pending optinfo, creating one if
10036 need be.
10037 (dump_printf): Move implementation to...
10038 (dump_context::dump_printf_va): ...this new member function. Add
10039 the text to any pending optinfo, creating one if need be.
10040 (dump_printf_loc): Move implementation to...
10041 (dump_context::dump_printf_loc_va): ...this new member function.
10042 Start a new optinfo and add the stmt to it.
10043 (dump_dec): Move implementation to...
10044 (dump_context::dump_dec): ...this new member function. Add the
10045 value to any pending optinfo, creating one if need be.
10046 (dump_context::dump_symtab_node): New member function.
10047 (dump_context::get_scope_depth): New member function.
10048 (dump_context::begin_scope): New member function.
10049 (dump_context::end_scope): New member function.
10050 (dump_context::ensure_pending_optinfo): New member function.
10051 (dump_context::begin_next_optinfo): New member function.
10052 (dump_context::end_any_optinfo): New member function.
10053 (dump_context::s_current): New global.
10054 (dump_context::s_default): New global.
10055 (dump_scope_depth): Delete global.
10056 (dumpfile_ensure_any_optinfo_are_flushed): New function.
10057 (dump_symtab_node): New function.
10058 (get_dump_scope_depth): Reimplement in terms of dump_context.
10059 (dump_begin_scope): Likewise.
10060 (dump_end_scope): Likewise.
10061 (selftest::temp_dump_context::temp_dump_context): New ctor.
10062 (selftest::temp_dump_context::~temp_dump_context): New dtor.
10063 (selftest::verify_item): New function.
10064 (ASSERT_IS_TEXT): New macro.
10065 (ASSERT_IS_TREE): New macro.
10066 (ASSERT_IS_GIMPLE): New macro.
10067 (selftest::test_capture_of_dump_calls): New test.
10068 (selftest::dumpfile_c_tests): Call it.
10069 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
10070 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
10071 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
10072 descriptive comment.
10073 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
10074 (dump_node, dump_bb): Move these unrelated decls.
10075 (class dump_manager): Add leading comment.
10076 * optinfo.cc: New file.
10077 * optinfo.h: New file.
10078
10079 2018-07-19 Michael Collison <michael.collison@arm.com>
10080 Richard Henderson <rth@redhat.com>
10081
10082 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
10083 (subti): Handle op1 zero.
10084 (subvti4, usub4ti4): New.
10085 (*sub<GPI>3_compare1_imm): New.
10086 (sub<GPI>3_carryinCV): New.
10087 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
10088 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
10089
10090 2018-07-19 Michael Collison <michael.collison@arm.com>
10091 Richard Henderson <rth@redhat.com>
10092
10093 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
10094 (addti3): Create simpler code if low part is already known to be 0.
10095 (addvti4, uaddvti4): New.
10096 (*add<GPI>3_compareC_cconly_imm): New.
10097 (*add<GPI>3_compareC_cconly): New.
10098 (*add<GPI>3_compareC_imm): New.
10099 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
10100 handle constants within this pattern..
10101 (*add<GPI>3_compareV_cconly_imm): New.
10102 (*add<GPI>3_compareV_cconly): New.
10103 (*add<GPI>3_compareV_imm): New.
10104 (add<GPI>3_compareV): New.
10105 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
10106 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
10107 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
10108 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
10109 with 'comparison' operator.
10110 (*add<GPI>3_compareV_cconly_imm): Ditto.
10111 (*add<GPI>3_compareV_cconly): Ditto.
10112 (*add<GPI>3_compareV_imm): Ditto.
10113 (add<GPI>3_compareV): Ditto.
10114 (add<mode>3_carryinC): Ditto.
10115 (*add<mode>3_carryinC_zero): Ditto.
10116 (*add<mode>3_carryinC): Ditto.
10117 (add<mode>3_carryinV): Ditto.
10118 (*add<mode>3_carryinV_zero): Ditto.
10119 (*add<mode>3_carryinV): Ditto.
10120
10121 2018-07-19 Michael Collison <michael.collison@arm.com>
10122 Richard Henderson <rth@redhat.com>
10123
10124 * config/aarch64/aarch64-modes.def (CC_V): New.
10125 * config/aarch64/aarch64-protos.h
10126 (aarch64_addti_scratch_regs): Declare
10127 (aarch64_subvti_scratch_regs): Declare.
10128 (aarch64_expand_subvti): Declare.
10129 (aarch64_gen_unlikely_cbranch): Declare
10130 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
10131 for signed overflow using CC_Vmode.
10132 (aarch64_get_condition_code_1): Handle CC_Vmode.
10133 (aarch64_gen_unlikely_cbranch): New function.
10134 (aarch64_addti_scratch_regs): New function.
10135 (aarch64_subvti_scratch_regs): New function.
10136 (aarch64_expand_subvti): New function.
10137
10138 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10139
10140 * config/aarch64/aarch64-option-extensions.def: New entry for profile
10141 extension.
10142 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
10143 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
10144 extension.
10145
10146 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10147
10148 PR target/83009
10149 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10150 address check not strict.
10151
10152 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10153
10154 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
10155 Umq with Umn.
10156 (store_pair_lanes<mode>): Likewise.
10157 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
10158 enum value 'ADDR_QUERY_LDP_STP_N'.
10159 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
10160 (aarch64_print_address_internal): Add declaration.
10161 (aarch64_print_ldpstp_address): Remove.
10162 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
10163 (aarch64_print_operand): Change printing of 'y'.
10164 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
10165 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
10166 'true' rather than '1'.
10167 * config/aarch64/constraints.md (Uml): Likewise.
10168 (Uml): Rename to Umn.
10169 (Umq): Remove.
10170
10171 2018-07-19 Richard Biener <rguenther@suse.de>
10172
10173 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
10174 a trailing array.
10175 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
10176 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
10177 (vn_reference_hasher): Likewise.
10178 (struct vn_tables_s): Remove obstack and alloc-pool members.
10179 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
10180 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
10181 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
10182 (vn_reference_insert_pieces): Likewise.
10183 (alloc_vn_nary_op_noinit): Adjust.
10184 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
10185 (vn_phi_eq): Adjust.
10186 (shared_lookup_phiargs): Remove.
10187 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
10188 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
10189 (visit_reference_op_call): Likewise.
10190 (copy_nary, copy_phi, copy_reference): Remove.
10191 (process_scc): Rewind the obstack when iterating. Do not
10192 copy the elements to valid_info but just move them from one
10193 hashtable to the other.
10194 (allocate_vn_table): Adjust.
10195 (free_vn_table): Likewise.
10196 (init_scc_vn): Likewise.
10197 (free_scc_vn): Likewise.
10198
10199 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
10200
10201 PR target/86560
10202 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
10203 indirect_return as function type attribute.
10204 (ix86_attribute_table): Change indirect_return to function
10205 type attribute.
10206 * doc/extend.texi: Update indirect_return attribute.
10207
10208 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
10209
10210 * wide-int.h (widest2_int): New.
10211 * gimple-fold.c (arith_overflowed_p): Use it.
10212 * tree.h (widest2_int_cst): New.
10213 * tree-vrp.c (wide_int_binop_overflow): Rename from
10214 vrp_int_const_binop.
10215 Rewrite to work on trees.
10216 (extract_range_from_multiplicative_op_1): Abstract code to...
10217 (wide_int_range_min_max): ...here.
10218 (wide_int_range_cross_product): ...and here.
10219 (extract_range_from_binary_expr_1): Abstract overflow code to...
10220 (wide_int_range_mult_wrapping): ...here.
10221 * tree-vrp.h (wide_int_range_cross_product): New.
10222 (wide_int_range_mult_wrapping): New.
10223
10224 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
10225 Julia Koval <julia.koval@intel.com>
10226
10227 * config/i386/x86-tune-costs.h (skylake_memcpy,
10228 skylake_memset): Replace rep_prefix with unrolling for size 512.
10229
10230 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
10231
10232 PR middle-end/86544
10233 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
10234 comparision with EQ_EXPR in last stmt.
10235
10236 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
10237
10238 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
10239 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
10240 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
10241 previously known as "PowerPC AltiVec Built-in Functions". Move
10242 some material to new subsubsections "PowerPC AltiVec Built-in
10243 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10244 ISA 2.07".
10245 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10246 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10247 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10248 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10249
10250 2018-07-18 Richard Biener <rguenther@suse.de>
10251
10252 PR tree-optimization/86557
10253 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10254 EXACT_DIV_EXPR.
10255
10256 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
10257
10258 * config/s390/s390.c (s390_function_profiler): Generate CFI.
10259
10260 2018-07-17 Jeff Law <law@redhat.com>
10261
10262 * config/arm/arm.c (get_label_padding): Update for recent
10263 changes to label_to_alignment.
10264
10265 PR tree-optimization/86010
10266 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10267
10268 * config/mips/mips.c (vr4130_align_insns): Update for recent
10269 changes to label_to_alignment.
10270
10271 * config/frv/frv.c (frv_label_align): Update for recent changes
10272 to label_to_alignment.
10273
10274 * config/nios2/nios2.c (nios2_label_align): Update for recent
10275 changes which dropped ALIGN_LABELS_LOG.
10276
10277 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
10278
10279 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10280 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10281
10282 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
10283
10284 * config/arc/arc.c (arc_label_align): Use align_labels instead of
10285 deprecated align_labels_log.
10286
10287 2018-07-17 Richard Biener <rguenther@suse.de>
10288
10289 PR lto/86456
10290 * dwarf2out.c (init_sections_and_labels): Always generate
10291 a debug_line_str_section for early LTO debug.
10292 (dwarf2out_finish): Reset debug_line_str_hash output early.
10293 Bump counter for extra dwarf5 .debug_loc labels to not conflict
10294 with fat LTO part.
10295 (dwarf2out_early_finish): Output debug_line_str.
10296
10297 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10298
10299 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10300 index register on z196 or later.
10301
10302 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10303
10304 * config/s390/s390.c (s390_default_align): Set default function
10305 alignment to 16.
10306 (s390_override_options_after_change): Call s390_default align.
10307 (s390_option_override_internal): Call s390_default_align.
10308 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10309
10310 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10311
10312 PR middle-end/86542
10313 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10314 to _looptemp_ clauses, other than the first two.
10315
10316 2018-07-17 Martin Liska <mliska@suse.cz>
10317
10318 * opts.c: Do not enable OPT_falign_* for -Os.
10319
10320 2018-07-17 Martin Liska <mliska@suse.cz>
10321
10322 * align.h (MAX_CODE_ALIGN): New.
10323 (MAX_CODE_ALIGN_VALUE): New.
10324 * common/config/i386/i386-common.c (ix86_handle_option):
10325 (MAX_CODE_ALIGN): Moved to align.h.
10326 * final.c (MAX_CODE_ALIGN): Likewise.
10327 * opts.c (parse_and_check_align_values):
10328 (MAX_CODE_ALIGN): Likewise.
10329 (MAX_CODE_ALIGN_VALUE): Likewise.
10330
10331 2018-07-17 Martin Liska <mliska@suse.cz>
10332
10333 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10334 in order to fulfil coding style.
10335 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10336 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10337 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10338 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10339 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10340 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10341 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10342 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10343 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10344
10345 2018-07-17 Martin Liska <mliska@suse.cz>
10346
10347 * align.h: New file.
10348 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10349 directly.
10350 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10351 align_flags of label_to_alignment.
10352 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10353 align_flags class.
10354 * config/m68k/m68k.c: Do not use removed align_labels_value and
10355 align_loops_value.
10356 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10357 (LOOP_ALIGN): Likewise.
10358 (LABEL_ALIGN): Likewise.
10359 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10360 Remove not used macro.
10361 (rs6000_loop_align): Change return type to align_flags.
10362 (rs6000_loop_align_max_skip): Remove.
10363 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
10364 Change return type to align_flags.
10365 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10366 Remove not used macro.
10367 (rs6000_loop_align): Change return type to align_flags.
10368 (rs6000_loop_align_max_skip): Remove.
10369 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10370 * config/rx/rx-protos.h (rx_align_for_label): Make it
10371 static function.
10372 * config/rx/rx.c (rx_align_for_label): Change return type
10373 to align_flags.
10374 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10375 macro definitions.
10376 into align_flags class.
10377 (LABEL_ALIGN): Likewise.
10378 (LOOP_ALIGN): Likewise.
10379 * config/s390/s390.c (s390_label_align): Use align_flags
10380 class member.
10381 (s390_asm_output_function_label): Likewise.
10382 * config/sh/sh.c (sh_override_options_after_change):
10383 Use align_flags class directly without macros.
10384 (find_barrier): Likewise.
10385 (barrier_align): Likewise.
10386 (sh_loop_align): Likewise.
10387 * config/spu/spu.c (spu_option_override):
10388 Use align_flags_tuple::get_value instead of removed macros.
10389 (spu_sched_init): Likewise.
10390 * config/spu/spu.h (GTY): Likewise.
10391 * config/visium/visium.c (visium_option_override):
10392 Set "8" as default secondary alignment.
10393 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10394 in order to guarantee secondary alignment of 8.
10395 * coretypes.h: Include align.h header file.
10396 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10397 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10398 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10399 * doc/tm.texi.in: Likewise.
10400 * final.c (struct label_alignment): Remove not used structure.
10401 (LABEL_ALIGN): Change type to align_flags.
10402 (LOOP_ALIGN): Likewise.
10403 (JUMP_ALIGN): Likewise.
10404 (default_loop_align_max_skip): Remove.
10405 (default_label_align_max_skip): Likewise.
10406 (default_jump_align_max_skip): Likewise.
10407 (default_label_align_after_barrier_max_skip):
10408 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10409 (LABEL_TO_MAX_SKIP): Remove.
10410 (label_to_alignment): Return align_flags type instead of integer.
10411 (label_to_max_skip): Remove.
10412 (align_fuzz): Use align_flags type.
10413 (compute_alignments): Use align_flags type and use align_flags::max
10414 to combine multiple alignments.
10415 (grow_label_align): Grow vec instead of C array.
10416 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10417 (shorten_branches): Use align_flags type and use align_flags::max
10418 to combine multiple alignments.
10419 (final_scan_insn_1): Remove usage of secondary alignment that comes
10420 from label alignment, but instead use proper secondary alignment
10421 which is computed in grow_label_align.
10422 * flags.h (struct align_flags_tuple): Move to align.h.
10423 (struct align_flags): Likewise.
10424 (state_align_loops): Rename to align_loops.
10425 (state_align_jumps): Rename to align_jumps.
10426 (state_align_labels): Rename to align_labels.
10427 (state_align_functions): Rename to align_functions.
10428 (align_loops_log): Remove.
10429 (align_jumps_log): Remove.
10430 (align_labels_log): Remove.
10431 (align_functions_log): Remove.
10432 (align_loops_max_skip): Remove.
10433 (align_jumps_max_skip): Remove.
10434 (align_labels_max_skip): Remove.
10435 (align_functions_max_skip): Remove.
10436 (align_loops_value): Remove.
10437 (align_jumps_value): Remove.
10438 (align_labels_value): Remove.
10439 (align_functions_value): Remove.
10440 * output.h (label_to_alignment): Change return type to align_flags.
10441 (label_to_max_skip): Remove.
10442 * target.def: Remove loop_align_max_skip, label_align_max_skip,
10443 jump_align_max_skip macros.
10444 * targhooks.h (default_loop_align_max_skip): Remove.
10445 (default_label_align_max_skip): Likewise.
10446 (default_jump_align_max_skip): Likewise.
10447 (default_label_align_after_barrier_max_skip): Remove.
10448 * toplev.c (read_log_maxskip): Use ::normalize function.
10449 (parse_N_M): Remove not used argument and also call ::normalize.
10450 (parse_alignment_opts): Do not pass unused arguments.
10451 * varasm.c (assemble_start_function): Use directly align_functions
10452 instead of removed macros.
10453 * system.h: Do not poison removed macros.
10454
10455 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10456
10457 PR middle-end/86539
10458 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10459 and cond temporaries don't have reference type if iterator has
10460 pointer type. For init use &for_pre_body instead of pre_p if
10461 for_pre_body is non-empty.
10462
10463 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10464
10465 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10466 double-double modes to SFmode directly directly.
10467 (trunc<mode>sf2_fprs): Delete.
10468
10469 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10470
10471 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10472 for conversions between IFmode and the decimal floating point modes.
10473 (init_float128_ieee): Use the correct names for conversions between
10474 KFmode and the decimal floating point modes.
10475
10476 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10477
10478 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10479 for the conversions between TDmode and IFmode.
10480 (init_float128_ieee): Use more correct names for the conversions
10481 between TDmode and KFmode.
10482
10483 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10484
10485 PR tree-optimization/86526
10486 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10487 (inline_expand_builtin_string_cmp): Likewise.
10488 (inline_string_cmp): Likewise. Use c_readstr instead of
10489 builtin_memcpy_read_str. Add unit_mode temporary.
10490
10491 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10492
10493 PR middle-end/86528
10494 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10495 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10496
10497 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10498
10499 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10500 Alphabetize prototypes of built-in functions, separating out
10501 built-in functions that are listed in this section but should be
10502 described elsewhere.
10503
10504 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10505
10506 PR target/86511
10507 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10508 conditional move when trapping comparison was split to a
10509 non-trapping one (and vice versa).
10510
10511 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10512
10513 * config/s390/s390.c (s390_function_profiler): Generate nops
10514 instead of profiler call sequences.
10515 * config/s390/s390.opt: Add the new option.
10516
10517 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10518
10519 * config/s390/s390.c (s390_function_profiler): Generate
10520 __mcount_loc section.
10521 * config/s390/s390.opt: Add the new option.
10522
10523 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10524
10525 * common.opt: Add the new warning.
10526 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10527 %r0,__fentry__" when -mfentry is specified.
10528 (s390_option_override_internal): Disallow -mfentry for 31-bit
10529 CPUs.
10530 * config/s390/s390.opt: Add the new option.
10531
10532 2018-07-16 Richard Biener <rguenther@suse.de>
10533
10534 PR lto/86523
10535 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10536 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10537
10538 2018-07-16 Martin Liska <mliska@suse.cz>
10539
10540 PR ipa/86529
10541 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10542 to ::get_create.
10543
10544 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10545
10546 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10547
10548 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10549
10550 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10551 for ARCHS4x.
10552 * config/arc/arc-cpus.def (hs4x): New cpu.
10553 (hs4xd): Likewise.
10554 * config/arc/arc-tables.opt: Regenerate.
10555 * config/arc/arc.c (arc_sched_issue_rate): New function.
10556 (TARGET_SCHED_ISSUE_RATE): Define.
10557 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10558 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10559 fpu_cvt.
10560 (attr tune): Add ARCHS4x tune values.
10561 (attr tune_dspmpy): Define.
10562 (*tst): Correct instruction type.
10563 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10564 * config/arc/arcHS4x.md: New file.
10565 * config/arc/fpu.md: Update instruction type attributes.
10566 * config/arc/t-multilib: Regenerate.
10567
10568 2018-07-16 Tom de Vries <tdevries@suse.de>
10569
10570 PR debug/86455
10571 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10572
10573 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10574
10575 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10576 early clobber.
10577
10578 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10579
10580 PR tree-optimization/86514
10581 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10582 conversion to a boolean type from a type with greater precision.
10583
10584 2018-07-16 Tom de Vries <tdevries@suse.de>
10585
10586 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10587 dump_flags request TDF_SLIM.
10588
10589 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10590
10591 * fold-const.c (int_const_binop_1): Abstract...
10592 (wide_int_binop): ...wide int code here.
10593 (poly_int_binop): ...poly int code here.
10594 Abstract the rest of int_const_binop_1 into int_const_binop.
10595 * fold-const.h (wide_int_binop): New.
10596 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10597 Remove useless PLUS/MINUS_EXPR case.
10598 (zero_nonzero_bits_from_vr): Move wide int code...
10599 (zero_nonzero_bits_from_bounds): ...here.
10600 (extract_range_from_binary_expr_1): Move mask optimization code...
10601 (range_easy_mask_min_max): ...here.
10602 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10603 (range_easy_mask_min_max): New.
10604
10605 2018-07-15 Jeff Law <law@redhat.com>
10606
10607 PR target/85993
10608 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10609 block.
10610
10611 2018-07-14 Jim Wilson <jimw@sifive.com>
10612
10613 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10614
10615 2018-07-14 Paul Koning <ni1d@arrl.net>
10616
10617 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10618
10619 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10620
10621 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10622 copying section.
10623
10624 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10625 Steve Munroe <munroesj52@gmail.com>
10626
10627 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10628 (_mm_andnot_si128): Likewise.
10629 (_mm_or_si128): Likewise.
10630 (_mm_xor_si128): Likewise.
10631
10632 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10633
10634 PR middle-end/78809
10635 * builtins.c (expand_builtin_memcmp): Inline the calls first
10636 when result_eq is false.
10637 (expand_builtin_strcmp): Inline the calls first.
10638 (expand_builtin_strncmp): Likewise.
10639 (inline_string_cmp): New routine. Expand a string compare
10640 call by using a sequence of char comparison.
10641 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10642 a call to str(n)cmp/memcmp.
10643 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10644 New option.
10645 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10646
10647 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10648
10649 * config/arm/driver-arm.c: Include arm-native.h.
10650 (host_detect_local_cpu): Use auto-generated data tables.
10651 (vendors, arm_cpu_table): Delete. Move part information to ...
10652 * config/arm/arm-cpus.in: ... here.
10653 * config/arm/parsecpu.awk (gen_native): New function.
10654 (vendor, part): New CPU fields.
10655 (END): Add support for building the native CPU detection tables.
10656 * config/arm/t-arm (arm-native.h): Add build rule.
10657 (driver-arm.o): Add dependency on arm-native.h.
10658
10659 2018-07-13 Richard Biener <rguenther@suse.de>
10660
10661 PR middle-end/85974
10662 * match.pd (addr1 - addr2): Allow either of the operand to
10663 have a conversion.
10664
10665 2018-07-13 Tom de Vries <tdevries@suse.de>
10666
10667 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10668 in remap_ssa_name.
10669
10670 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10671
10672 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10673 arrays instead of numbered variables.
10674
10675 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10676
10677 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10678 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10679
10680 2018-07-13 Richard Biener <rguenther@suse.de>
10681
10682 PR debug/86452
10683 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10684 instead of get_context_die.
10685
10686 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10687 Richard Biener <rguenther@suse.de>
10688
10689 PR middle-end/86489
10690 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10691 that the loop latch destination where phi is defined.
10692
10693 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10694
10695 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10696 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10697 (riscv_set_current_function): Extract getting interrupt type to new
10698 function.
10699 (riscv_get_interrupt_type): New function.
10700 (riscv_merge_decl_attributes): New function, checking interrupt type is
10701 same.
10702 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10703
10704 2018-07-12 Paul Koning <ni1d@arrl.net>
10705
10706 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10707 directive.
10708
10709 2018-07-12 Paul Koning <ni1d@arrl.net>
10710
10711 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10712 zero reference, add doloop_end instead.
10713 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10714 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10715 detail for doloop_end.
10716
10717 2018-07-12 Martin Sebor <msebor@redhat.com>
10718
10719 PR c/86453
10720 * attribs.c (decl_attributes): Reject conflicting attributes before
10721 calling attribute handlers.
10722
10723 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10724
10725 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10726 parameter.
10727 (gcc::dump_manager::get_dump_file_name): likewise.
10728 (dump_begin): Likewise.
10729 * dumpfile.h (dump_begin): Update prototype.
10730 (gcc::dump_manager::get_dump_file_name,
10731 gcc::dump_manager::get_dump_file_name): Update prototype.
10732
10733 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10734
10735 * internal-fn.h (vectorizable_internal_fn_p): New function.
10736 * tree-vect-slp.c (compatible_calls_p): Likewise.
10737 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10738 to internal functions.
10739 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10740
10741 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10742
10743 * fold-const.h (inverse_conditions_p): Declare.
10744 * fold-const.c (inverse_conditions_p): New function.
10745 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10746 that test the inverse condition of a conditional internal function.
10747 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10748 * internal-fn.c (internal_fn_mask_index): Handle conditional
10749 internal functions.
10750 (vectorized_internal_fn_supported_p): New function.
10751 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10752 (any_pred_load_store): Replace with...
10753 (need_to_predicate): ...this new variable.
10754 (redundant_ssa_names): New variable.
10755 (ifcvt_can_use_mask_load_store): Move initial checks to...
10756 (ifcvt_can_predicate): ...this new function. Handle tree codes
10757 for which a conditional internal function exists.
10758 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10759 instead of ifcvt_can_use_mask_load_store. Update after variable
10760 name change.
10761 (predicate_load_or_store): New function, split out from
10762 predicate_mem_writes.
10763 (check_redundant_cond_expr): New function.
10764 (value_available_p): Likewise.
10765 (predicate_rhs_code): Likewise.
10766 (predicate_mem_writes): Rename to...
10767 (predicate_statements): ...this. Use predicate_load_or_store
10768 and predicate_rhs_code.
10769 (combine_blocks, tree_if_conversion): Update after above name changes.
10770 (ifcvt_local_dce): Handle redundant_ssa_names.
10771 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10772 general conditional functions.
10773 * tree-vect-stmts.c (vectorizable_call): Likewise.
10774
10775 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10776 Alan Hayward <alan.hayward@arm.com>
10777 David Sherwood <david.sherwood@arm.com>
10778
10779 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10780 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10781 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10782 plus and minus and convert them into IFN_COND_FMA-based sequences.
10783 (convert_mult_to_fma): Handle conditional plus and minus.
10784
10785 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10786
10787 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10788 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10789 (cond_fnms_optab): New optabs.
10790 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10791 internal functions.
10792 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10793 * internal-fn.h (get_conditional_internal_fn): Declare.
10794 (get_unconditional_internal_fn): Likewise.
10795 * internal-fn.c (cond_ternary_direct): New macro.
10796 (expand_cond_ternary_optab_fn): Likewise.
10797 (direct_cond_ternary_optab_supported_p): Likewise.
10798 (FOR_EACH_COND_FN_PAIR): Likewise.
10799 (get_conditional_internal_fn): New function.
10800 (get_unconditional_internal_fn): Likewise.
10801 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10802 (gimple_match_op::gimple_match_op): Add a new overload for 5
10803 operands.
10804 (gimple_match_op::set_op): Likewise.
10805 (gimple_resimplify5): Declare.
10806 * genmatch.c (decision_tree::gen): Generate simplifications for
10807 5 operands.
10808 * gimple-match-head.c (gimple_simplify): Define an overload for
10809 5 operands. Handle calls with 5 arguments in the top-level overload.
10810 (convert_conditional_op): Handle conversions from unconditional
10811 internal functions to conditional ones.
10812 (gimple_resimplify5): New function.
10813 (build_call_internal): Pass a fifth operand.
10814 (maybe_push_res_to_seq): Likewise.
10815 (try_conditional_simplification): Try converting conditional
10816 internal functions to unconditional internal functions.
10817 Handle 3-operand unconditional forms.
10818 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10819 Define ternary equivalents of the current rules for binary conditional
10820 internal functions.
10821 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10822 ternary operations.
10823 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10824 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10825 (optab): Handle them.
10826 (SVE_COND_FP_TERNARY): New int iterator.
10827 (sve_fmla_op, sve_fmad_op): New int attributes.
10828 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10829 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10830 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10831
10832 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10833
10834 * target.def (preferred_else_value): New target hook.
10835 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10836 * doc/tm.texi: Regenerate.
10837 * targhooks.h (default_preferred_else_value): Declare.
10838 * targhooks.c (default_preferred_else_value): New function.
10839 * internal-fn.h (conditional_internal_fn_code): Declare.
10840 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10841 (get_conditional_internal_fn): Use it.
10842 (conditional_internal_fn_code): New function.
10843 * gimple-match.h (gimple_match_cond): New struct.
10844 (gimple_match_op): Add a cond member function.
10845 (gimple_match_op::gimple_match_op): Update all forms to take a
10846 gimple_match_cond.
10847 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10848 for the suboperation, but don't specify a particular else_value.
10849 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10850 (visit_nary_op, visit_reference_op_load): Pass
10851 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10852 * gimple-match-head.c: Include tree-eh.h
10853 (convert_conditional_op): New function.
10854 (maybe_resimplify_conditional_op): Likewise.
10855 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10856 (gimple_resimplify2): Likewise.
10857 (gimple_resimplify3): Likewise.
10858 (gimple_resimplify4): Likewise.
10859 (maybe_push_res_to_seq): Return null for conditional operations.
10860 (try_conditional_simplification): New function.
10861 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10862 constructor.
10863 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10864 IFN_COND_* call.
10865 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10866 function.
10867 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10868
10869 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10870
10871 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10872 DECL_FCONTEXT
10873 (hash_tree): Do not hash DECL_FCONTEXT
10874 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10875 Do not stream DECL_FCONTEXT.
10876 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10877 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10878
10879 2018-07-12 Richard Biener <rguenther@suse.de>
10880
10881 PR debug/86462
10882 * dwarf2out.c (gen_block_die): Only output blocks when they have
10883 at least one !DECL_IGNORED_P variable.
10884
10885 2018-07-12 Richard Biener <rguenther@suse.de>
10886
10887 PR target/84829
10888 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10889 Remove -mieee-fp handling.
10890
10891 2018-07-12 Richard Biener <rguenther@suse.de>
10892
10893 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10894 left-over from last patch.
10895
10896 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10897
10898 PR tree-optimization/86492
10899 * gimple-ssa-store-merging.c
10900 (imm_store_chain_info::coalesce_immediate_stores): Call
10901 check_no_overlap even for the merge_overlapping case. Formatting fix.
10902
10903 2018-07-12 Richard Biener <rguenther@suse.de>
10904
10905 PR middle-end/86479
10906 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10907 move possibly trapping operations into the conditional.
10908
10909 2018-07-12 Richard Biener <rguenther@suse.de>
10910
10911 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10912 (vn_lookup_simplify_result): Remove recursion limit applied
10913 here.
10914 (vn_nary_build_or_lookup_1): Adjust.
10915 (try_to_simplify): Likewise.
10916 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10917 here.
10918 (gimple_resimplify2): Likewise.
10919 (gimple_resimplify3): Likewise.
10920 (gimple_resimplify4): Likewise.
10921
10922 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10923
10924 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10925 Use __mmask64 type instead of __mmask8 for __M argument.
10926 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10927 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10928 __U argument.
10929 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10930 __mmask16 for __M argument.
10931 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10932 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10933 to __mmask16 instead of __mmask8.
10934 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10935 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10936 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10937 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10938 instead of __mmask16 for __U argument.
10939 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10940 __mmask16 instead of __mmask8 for __U argument.
10941 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10942 __U argument.
10943 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10944 __mmask16.
10945 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10946 argument.
10947 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10948 __U argument.
10949 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10950 __mmask16.
10951 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10952 of __mmask16.
10953 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10954 __U argument.
10955 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10956 __U argument.
10957 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10958 __U argument.
10959 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10960 __U argument.
10961 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10962 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10963 return type as well as __M argument type and all casts from __mmask8
10964 to __mmask32.
10965 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10966 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10967 return type as well as __M argument type and all casts from __mmask8
10968 to __mmask16.
10969 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10970 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10971 return type as well as __M argument type and all casts from __mmask8
10972 to __mmask32.
10973 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10974 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10975 return type as well as __M argument type and all casts from __mmask8
10976 to __mmask16.
10977 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10978 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10979 __mmask16.
10980
10981 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10982
10983 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10984 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10985 for __U argument.
10986
10987 2018-07-11 Paul Koning <ni1d@arrl.net>
10988
10989 * doc/md.texi (define_subst): Document how multiple occurrences of
10990 the same argument in the replacement pattern are handled.
10991
10992 2018-07-11 Paul Koning <ni1d@arrl.net>
10993
10994 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10995 alphabetical order.
10996 (Common Type Attributes): Add "mode" attribute.
10997
10998 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10999
11000 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
11001 stream DECL_ORIGINAL_TYPE.
11002 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
11003 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
11004 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
11005 Do not walk original type.
11006 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
11007 external decls.
11008 (write_ts_decl_non_common_tree_pointers): Do not stream
11009 DECL_ORIGINAL_TYPE
11010 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
11011 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
11012
11013 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11014
11015 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
11016 thread twice from the same starting edge.
11017
11018 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11019
11020 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
11021 * gimple.c (gimple_call_nonnull_result_p): ...here...
11022 (gimple_call_nonnull_arg): ...and here.
11023 * gimple.h (gimple_call_nonnull_result_p): New.
11024 (gimple_call_nonnull_arg): New.
11025
11026 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
11027
11028 * config/arm/arm-cpus.in: Move information from fpu field of each
11029 cpu definition to the isa field.
11030 * config/arm/parsecpu.awk (fpu): Delete match rule.
11031 (gen_comm_data): Don't add bits from the CPU's FPU entry.
11032
11033 2018-07-11 Richard Biener <rguenther@suse.de>
11034
11035 PR debug/86457
11036 * dwarf2out.c (init_sections_and_labels): Use
11037 output_asm_line_debug_info consistently.
11038 (dwarf2out_early_finish): Likewise.
11039 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
11040 type units.
11041
11042 2018-07-11 Richard Biener <rguenther@suse.de>
11043
11044 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
11045 Rework father_bb setting in a way to avoid propagating constants
11046 multiple times on a loop body.
11047
11048 2018-07-10 Mark Wielaard <mark@klomp.org>
11049
11050 PR debug/86459
11051 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
11052
11053 2018-07-10 Richard Biener <rguenther@suse.de>
11054
11055 * hash-map.h (hash_map::iterator::operator*): Return
11056 references to key and value.
11057
11058 2018-07-10 Jakub Jelinek <jakub@redhat.com>
11059
11060 PR c++/86443
11061 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
11062 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
11063 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
11064 (gimplify_omp_for): For composite loops, move outer
11065 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
11066 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
11067 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
11068 TREE_LIST for both the original class iterator and the "last" helper
11069 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
11070 loop, remember has_decl_expr from outer composite loops for the
11071 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
11072
11073 2018-07-09 Martin Sebor <msebor@redhat.com>
11074
11075 PR middle-end/77357
11076 PR middle-end/86428
11077 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
11078 accessing implicitly initialized array elements.
11079 * expr.c (string_constant): Handle string initializers of
11080 character arrays within aggregates.
11081 * gimple-fold.c (fold_array_ctor_reference): Add argument.
11082 Store element offset. As a special case, handle zero size.
11083 (fold_nonarray_ctor_reference): Same.
11084 (fold_ctor_reference): Add argument. Store subobject offset.
11085 * gimple-fold.h (fold_ctor_reference): Add argument.
11086
11087 2018-07-09 Paul Koning <ni1d@arrl.net>
11088
11089 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
11090 (pdp11_insn_cost): New function.
11091 (pdp11_md_asm_adjust): New function.
11092 (TARGET_INVALID_WITHIN_DOLOOP): Define.
11093 (pdp11_rtx_costs): Update to match machine better.
11094 (output_addr_const_pdp11): Correct format mismatch warnings.
11095 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
11096 * config/pdp11/pdp11.md: General change to add base_cost and/or
11097 length attributes for use by new pdp11_insn_cost function.
11098 (MIN_BRANCH): Correct definition.
11099 (MIN_SOB): Ditto.
11100 (doloop_end): Use standard pattern name for looping pattern.
11101 (doloop_end_nocc): New.
11102 (movsf): Add another constraint alternative.
11103 (zero_extendqihi2): Add constraint alternatives for not in place
11104 extend.
11105 (zero_extendhisi2): Remove.
11106 (shift patterns): Add CC handling variants.
11107 (bswaphi2): New.
11108 (bswapsi2): New.
11109 (rothi3): New.
11110 (define_peephole2): New peephole to recognize mov that sets CC for
11111 subsequent test.
11112
11113 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11114
11115 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
11116 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
11117 wi::add.
11118
11119 2018-07-09 Jakub Jelinek <jakub@redhat.com>
11120
11121 PR c/86420
11122 * real.c (real_nextafter): Return true if result is denormal.
11123
11124 2018-07-09 Martin Liska <mliska@suse.cz>
11125
11126 * common.opt: Add back wrongly removed attribute.
11127
11128 2018-07-09 Richard Biener <rguenther@suse.de>
11129
11130 PR debug/86413
11131 * dwarf2out.c (gen_block_die): For an early generated DIE
11132 always output high/low PC attributes.
11133
11134 2018-07-09 Tom de Vries <tdevries@suse.de>
11135
11136 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
11137 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
11138 onto VAR_DECL with abstract origin.
11139
11140 2018-07-07 Jim Wilson <jimw@sifive.com>
11141
11142 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
11143
11144 2018-07-07 Tom de Vries <tdevries@suse.de>
11145
11146 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
11147
11148 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
11149
11150 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
11151 overflow_type.
11152 (combine_bound): Use wide-int overflow calculation instead of
11153 rolling our own.
11154 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
11155 overflow_type.
11156 * fold-const.c (int_const_binop_2): Same.
11157 (extract_muldiv_1): Same.
11158 (fold_div_compare): Same.
11159 (fold_abs_const): Same.
11160 * match.pd: Same.
11161 * poly-int.h (add): Same.
11162 (sub): Same.
11163 (neg): Same.
11164 (mul): Same.
11165 * predict.c (predict_iv_comparison): Same.
11166 * profile-count.c (slow_safe_scale_64bit): Same.
11167 * simplify-rtx.c (simplify_const_binary_operation): Same.
11168 * tree-chrec.c (tree_fold_binomial): Same.
11169 * tree-data-ref.c (split_constant_offset_1): Same.
11170 * tree-if-conv.c (idx_within_array_bound): Same.
11171 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
11172 * tree-ssa-phiopt.c (minmax_replacement): Same.
11173 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
11174 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
11175 * vr-values.c (vr_values::adjust_range_with_scev): Same.
11176 * wide-int.cc (wi::add_large): Same.
11177 (wi::mul_internal): Same.
11178 (wi::sub_large): Same.
11179 (wi::divmod_internal): Same.
11180 * wide-int.h: Change overflow type to overflow_type for neg, add,
11181 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
11182 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
11183 mul_internal, divmod_internal.
11184 (overflow_type): New enum.
11185 (accumulate_overflow): New.
11186
11187 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11188
11189 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
11190 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
11191
11192 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11193
11194 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
11195 argument is checked for zero before entering loop, avoid checking again.
11196
11197 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11198
11199 * gimplify.h (generic_expr_could_trap_p): Set as global function.
11200 * gimplify.h (generic_expr_could_trap_p): Likwise.
11201 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
11202
11203 2018-07-06 Jakub Jelinek <jakub@redhat.com>
11204
11205 PR tree-optimization/86401
11206 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
11207 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
11208 (fold_bit_and_mask): ... here. New helper function for match.pd.
11209 * fold-const.h (fold_bit_and_mask): Declare.
11210 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
11211
11212 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
11213
11214 PR target/86324
11215 * target.def (translate_mode_attribute): New hook.
11216 * targhooks.h (default_translate_mode_attribute): Declare.
11217 * targhooks.c (default_translate_mode_attribute): New function.
11218 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
11219 * doc/tm.texi: Regenerate.
11220 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
11221 (rs6000_translate_mode_attribute): New function.
11222
11223 2018-07-06 Paul Koning <ni1d@arrl.net>
11224
11225 * doc/md.texi (define_split): Document DONE and FAIL.
11226 (define_peephole2): Ditto.
11227
11228 2018-07-05 Jeff Law <law@redhat.com>
11229
11230 PR tree-optimization/86010
11231 * tree-ssa-dse.c (compute_trims): More aggressively trim at
11232 both the head and tail of mem* and str* calls.
11233
11234 2018-07-05 Jim Wilson <jimw@sifive.com>
11235
11236 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
11237
11238 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
11239
11240 * config/aarch64/aarch64-simd.md: correct flags text for
11241 MIN_EXPR replacement.
11242
11243 2018-07-05 James Clarke <jrtc27@jrtc27.com>
11244
11245 * configure: Regenerated.
11246
11247 2018-07-05 Carl Love <cel@us.ibm.com>
11248
11249 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11250 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11251 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11252 VSX_BUILTIN_DOUBLEL_V4SF.
11253
11254 2018-07-05 Martin Sebor <msebor@redhat.com>
11255
11256 PR c++/86400
11257 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11258 than its domain to compute its the upper bound of a char array.
11259
11260 2018-07-05 Nathan Sidwell <nathan@acm.org>
11261
11262 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11263 * doc/cpp.texi: Update comment.
11264 * doc/tm.texi: Rebuilt.
11265 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11266 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11267 * doc/extend.texi (Backwards Compatibility): Clarify it is system
11268 headers affected by extern "C".
11269 * system.h: Poison NO_IMPLICIT_EXTERN_C.
11270 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11271 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11272 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11273 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11274 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11275 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11276 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11277 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11278 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11279 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11280 config/sparc/sp64-elf.h, config/spu/spu.h,
11281 config/stormy16/stormy16.h, config/v850/v850.h,
11282 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11283 define NO_IMPLICIT_EXTERN_C.
11284 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11285
11286 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11287
11288 PR target/84711
11289 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11290 instead of GET_MODE_SIZE when comparing Units.
11291
11292 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11293
11294 PR target/84711
11295 * rtlanal.c (set_noop_p): Constrain on mode change,
11296 include hard-reg-set.h
11297
11298 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11299
11300 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11301
11302 2018-07-05 Jakub Jelinek <jakub@redhat.com>
11303
11304 Revert
11305 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11306
11307 PR sanitizer/84250
11308 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11309 libasan.
11310 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11311
11312 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11313
11314 PR sanitizer/84250
11315 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11316 libasan.
11317 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11318
11319 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
11320
11321 PR middle-end/86380
11322 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11323
11324 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
11325
11326 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11327 neg_*_op* variables.
11328
11329 2018-07-04 Martin Liska <mliska@suse.cz>
11330
11331 * tree-switch-conversion.c: Define
11332 max_ratio_for_speed and max_ratio_for_size constants.
11333
11334 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11335 Martin Liska <mliska@suse.cz>
11336
11337 PR middle-end/66240
11338 PR target/45996
11339 PR c/84100
11340 * common.opt: Rename align options with 'str_' prefix.
11341 * common/config/i386/i386-common.c (set_malign_value): New
11342 function.
11343 (ix86_handle_option): Use it to set -falign-* options/
11344 * config/aarch64/aarch64-protos.h (struct tune_params): Change
11345 type from int to string.
11346 * config/aarch64/aarch64.c: Update default values from int
11347 to string.
11348 * config/alpha/alpha.c (alpha_override_options_after_change):
11349 Likewise.
11350 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11351 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11352 max skip conditionally.
11353 * config/i386/freebsd.h (SUBALIGN_LOG): New.
11354 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11355 max skip conditionally.
11356 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11357 max skip conditionally.
11358 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11359 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11360 max skip conditionally.
11361 * config/i386/i386.c (struct ptt): Change type from int to
11362 string.
11363 (ix86_default_align): Set default values.
11364 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11365 max skip conditionally.
11366 * config/i386/iamcu.h (SUBALIGN_LOG): New.
11367 (ASM_OUTPUT_MAX_SKIP_ALIGN):
11368 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11369 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11370 max skip conditionally.
11371 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11372 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11373 * config/i386/x86-64.h (SUBALIGN_LOG): New.
11374 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11375 max skip conditionally.
11376 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11377 * config/ia64/ia64.c (ia64_option_override): Set default values
11378 for alignment options.
11379 * config/m68k/m68k.c: Handle new str_align_* options.
11380 * config/mips/mips.c (mips_set_compression_mode): Change
11381 type of constants.
11382 (mips_option_override): Set default values for options.
11383 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11384 Likewise.
11385 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11386 Likewise.
11387 * config/rx/rx.c (rx_option_override): Likewise.
11388 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11389 (LABEL_ALIGN): Use align_labels_log.
11390 (LOOP_ALIGN): Use align_loops_align.
11391 * config/s390/s390.c (s390_asm_output_function_label): Use new
11392 macros.
11393 * config/sh/sh.c (sh_override_options_after_change):
11394 Change type of constants.
11395 * config/spu/spu.c (spu_sched_init): Likewise.
11396 * config/sparc/sparc.c (sparc_option_override): Set default
11397 values for options.
11398 * config/visium/visium.c (visium_option_override): Likewise.
11399 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11400 emit p2align format with last argument if it's not needed.
11401 * doc/invoke.texi: Document extended format of -falign-*.
11402 * final.c: Use align_labels alignment.
11403 * flags.h (struct target_flag_state): Change type to use
11404 align_flags.
11405 (struct align_flags_tuple): New.
11406 (struct align_flags): Likewise.
11407 (align_loops_log): Redefine macro to use new types.
11408 (align_loops_max_skip): Redefine macro to use new types.
11409 (align_jumps_log): Redefine macro to use new types.
11410 (align_jumps_max_skip): Redefine macro to use new types.
11411 (align_labels_log): Redefine macro to use new types.
11412 (align_labels_max_skip): Redefine macro to use new types.
11413 (align_functions_log): Redefine macro to use new types.
11414 (align_loops): Redefine macro to use new types.
11415 (align_jumps): Redefine macro to use new types.
11416 (align_labels): Redefine macro to use new types.
11417 (align_functions): Redefine macro to use new types.
11418 (align_functions_max_skip): Redefine macro to use new types.
11419 (align_loops_value): New macro.
11420 (align_jumps_value): New macro.
11421 (align_labels_value): New macro.
11422 (align_functions_value): New macro.
11423 * function.c (invoke_set_current_function_hook): Propagate
11424 alignment values from flags to global variables default in
11425 topleev.h.
11426 * ipa-icf.c (sem_function::equals_wpa): Use
11427 cl_optimization_option_eq instead of memcmp.
11428 * lto-streamer.h (cl_optimization_stream_out): Support streaming
11429 of string types.
11430 (cl_optimization_stream_in): Likewise.
11431 * optc-save-gen.awk: Support strings in cl_optimization.
11432 * opth-gen.awk: Likewise.
11433 * opts.c (finish_options): Remove error checking of invalid
11434 value ranges.
11435 (MAX_CODE_ALIGN): Remove.
11436 (MAX_CODE_ALIGN_VALUE): Likewise.
11437 (parse_and_check_align_values): New function.
11438 (check_alignment_argument): Likewise.
11439 (common_handle_option): Use check_alignment_argument.
11440 * opts.h (parse_and_check_align_values): Declare.
11441 * toplev.c (init_alignments): Remove.
11442 (read_log_maxskip): New.
11443 (parse_N_M): Likewise.
11444 (parse_alignment_opts): Likewise.
11445 (backend_init_target): Remove usage of init_alignments.
11446 * toplev.h (parse_alignment_opts): Declare.
11447 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11448 argument.
11449 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11450 * tree.c (cl_option_hasher::equal): New.
11451 * varasm.c: Use new global macros.
11452
11453 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11454
11455 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11456 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11457 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11458 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11459 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11460 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11461 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11462 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11463 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11464 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11465 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11466 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11467 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11468
11469 2018-07-04 Martin Liska <mliska@suse.cz>
11470 Jonathan Wakely <jwakely@redhat.com>
11471
11472 * coverage.c: Use correct type.
11473 * doc/invoke.texi: Language correction.
11474
11475 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11476
11477 PR target/85620
11478 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11479 ENDBRANCH for non-tail call which may return via indirect branch.
11480 * doc/extend.texi: Document indirect_return attribute.
11481
11482 2018-07-03 Martin Sebor <msebor@redhat.com>
11483
11484 PR tree-optimization/86274
11485 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11486 precondition.
11487 (format_floating): Correct handling of infinities and NaNs.
11488
11489 2018-07-03 Martin Sebor <msebor@redhat.com>
11490
11491 * print-tree.c (print_real_cst): New function.
11492 (print_node_brief): Call it.
11493 (print_node): Ditto.
11494
11495 2018-07-03 Jeff Law <law@redhat.com>
11496
11497 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11498 into a single pattern.
11499
11500 * config/h8300/h8300.md (ors code_iterator): New.
11501 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11502 a single pattern and single splitter.
11503 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11504 (iorqi3_1, xorqi3_1): Likewise.
11505 (iorqi3, xorqi3 expanders): Similarly.
11506
11507 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11508 (movmd_internal) into a single pattern using the P mode iterator.
11509 (movmd splitters): Similarly.
11510 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11511 (movsd splitters): Similarly.
11512
11513 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11514 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11515 right table based on the size of the operand.
11516 * config/h8300/h8300.md (length_table): Corresponding changes. All
11517 references to "addb", "addw" and "addl" changed to "add".
11518 (btst patterns): Merge two variants into a single pattern.
11519 (tstqi, tsthi): Likewise.
11520 (addhi3_incdec, addsi3_incdec): Likewise.
11521 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11522 (mulhi3, mulsi3): Likewise.
11523 (udivhi3, udivsi3): Likewise.
11524 (divhi3, divsi3): Likewise.
11525 (andorqi3, andorhi3, andorsi3): Likewise.
11526
11527 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11528
11529 PR target/85694
11530 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11531 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11532
11533 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11534
11535 PR tree-optimization/85694
11536 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11537 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11538 UNSPEC_URHADD.
11539 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11540 (<u>avg<mode>3_ceil): New patterns.
11541
11542 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11543
11544 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11545 scan-tree-dump directive.
11546 * gcc.dg/vect/slp-perm-2.c: Likewise.
11547 * gcc.dg/vect/slp-perm-3.c: Likewise.
11548 * gcc.dg/vect/slp-perm-5.c: Likewise.
11549 * gcc.dg/vect/slp-perm-6.c: Likewise.
11550 * gcc.dg/vect/slp-perm-7.c: Likewise.
11551 * gcc.dg/vect/slp-perm-8.c: Likewise.
11552
11553 2018-07-03 Marek Polacek <polacek@redhat.com>
11554
11555 PR middle-end/86202
11556 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11557
11558 2018-07-03 Richard Biener <rguenther@suse.de>
11559
11560 PR ipa/86389
11561 * tree-ssa-structalias.c (find_func_clobbers): Properly
11562 handle indirect calls.
11563
11564 2018-07-03 Jeff Law <law@redhat.com>
11565
11566 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11567 (shifts): New code iterator.
11568 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11569 expander. Fix HImode handling on H8/SX.
11570 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11571 (subqi3, subhi3, subsi3 expanders): Likewise.
11572 (andqi3, andhi3, andsi3 expanders): Likewise.
11573 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11574 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11575 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11576 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11577 (zero_extendqihi2, zero_extendqisi2): Likewise.
11578 (extendqihi2, extendqisi2): Likewise.
11579 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11580 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11581 (rotlqi3_1, rotlhi3_1): Likewise.
11582 (logicalhi3_sn, logicalsi3_sn): Likewise.
11583 (logicalhi3, logicalsi3): Likewise.
11584
11585 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11586
11587 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11588 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11589 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11590 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11591 type to append_pattern_def_seq instead of creating a stmt_vec_info
11592 directly.
11593 (build_mask_conversion): Likewise. Remove vinfo argument.
11594 (vect_add_conversion_to_patterm): Likewise, renaming to...
11595 (vect_add_conversion_to_pattern): ...this.
11596 (vect_recog_mask_conversion_pattern): Update call to
11597 build_mask_conversion. Pass the vector type to
11598 append_pattern_def_seq here too.
11599 (vect_recog_gather_scatter_pattern): Update call to
11600 vect_add_conversion_to_pattern.
11601
11602 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11603
11604 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11605 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11606 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11607 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11608 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11609 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11610 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11611 append_pattern_def_seq instead of new_pattern_def_seq.
11612 (vect_recog_divmod_pattern): Do both of the above.
11613 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11614 is null.
11615
11616 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11617
11618 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11619 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11620 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11621 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11622 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11623 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11624 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11625 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11626 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11627 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11628 parameter with a single stmt_vec_info.
11629 (vect_recog_func_ptr): Likewise.
11630 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11631 (vect_try_gather_scatter_pattern): ...this.
11632 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11633 the stmt_vec_info of the statement to be matched. Don't clear
11634 STMT_VINFO_RELATED_STMT.
11635 (vect_pattern_recog): Update call accordingly.
11636
11637 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11638
11639 PR tree-optimization/85694
11640 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11641 (uavgM3_ceil): Document new optabs.
11642 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11643 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11644 functions.
11645 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11646 (savg_ceil_optab): New optabs.
11647 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11648 (vect_vect_recog_func_ptrs): Add it.
11649 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11650 constant directly from the associated lhs.
11651
11652 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11653
11654 * tree-vect-patterns.c (vect_split_statement): New function.
11655 (vect_convert_input): Use it to try to split an existing cast.
11656
11657 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11658
11659 * poly-int.h (print_hex): New function.
11660 * dumpfile.h (dump_dec, dump_hex): Declare.
11661 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11662 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11663 min_input_precision, operation_precision and operation_sign.
11664 * tree-vect-patterns.c (vect_get_range_info): New function.
11665 (vect_same_loop_or_bb_p, vect_single_imm_use)
11666 (vect_operation_fits_smaller_type): Delete.
11667 (vect_look_through_possible_promotion): Add an optional
11668 single_use_p parameter.
11669 (vect_recog_over_widening_pattern): Rewrite to use new
11670 stmt_vec_info infomration. Handle one operation at a time.
11671 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11672 (vect_truncatable_operation_p, vect_set_operation_type)
11673 (vect_set_min_input_precision): New functions.
11674 (vect_determine_min_output_precision_1): Likewise.
11675 (vect_determine_min_output_precision): Likewise.
11676 (vect_determine_precisions_from_range): Likewise.
11677 (vect_determine_precisions_from_users): Likewise.
11678 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11679 (vect_vect_recog_func_ptrs): Put over_widening first.
11680 Add cast_forwprop.
11681 (vect_pattern_recog): Call vect_determine_precisions.
11682
11683 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11684
11685 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11686 statements that have been replaced by further pattern statements.
11687 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11688
11689 2018-07-03 Richard Biener <rguenther@suse.de>
11690
11691 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11692 always set *dt. Dump vectype in vectype overload.
11693 * dumpfile.h (dump_gimple_expr): New function.
11694 (dump_gimple_expr_loc): Likewise.
11695 * dumpfile.c (dump_gimple_expr): New function.
11696 (dump_gimple_expr_loc): Likewise.
11697
11698 2018-07-02 Jeff Law <law@redhat.com>
11699
11700 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11701 the H8/300, H8/300H and H8/S variants into a single pattern.
11702 (movhi_h8300, movqi_h8300hs): Similarly.
11703 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11704 (QHI mode iterator): New.
11705
11706 * config/h8300/h8300.md: Remove trailing whitespace.
11707
11708 2018-07-02 Jim Wilson <jimw@sifive.com>
11709
11710 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11711 instead of emit_insn for interrupt returns.
11712 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11713 (riscv_sret, riscv_uret): Likewise.
11714
11715 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11716
11717 * pretty-print.c (selftest::test_pp_format): Move save and restore
11718 of quotes to class auto_fix_quotes, and add an instance.
11719 * selftest.c: Include "intl.h".
11720 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11721 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11722 * selftest.h (selftest::auto_fix_quotes): New class.
11723
11724 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11725
11726 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11727 (aarch64_sve_prepare_conditional_op): Remove.
11728 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11729 Allow aarch64_simd_reg_or_zero as select operand; remove
11730 the aarch64_sve_prepare_conditional_op call.
11731 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11732 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11733 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11734 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11735 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11736 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11737 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11738 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11739 and a splitters to match all of the *_any patterns.
11740 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11741
11742 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11743 (SVE_COND_FP_BINARY_REV): Remove.
11744 (sve_int_op_rev, sve_fp_op_rev): New.
11745 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11746 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11747 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11748 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11749 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11750 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11751 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11752 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11753 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11754
11755 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11756 Remove match_dup 1 from the inner unspec.
11757 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11758
11759 * config/aarch64/aarch64.md (movprfx): New attr.
11760 (length): Default movprfx to 8.
11761 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11762 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11763 (*<su>mul<SVE_I>3_highpart): Likewise.
11764 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11765 (*v<ASHIFT><SVE_I>3): Likewise.
11766 (*<su><MAXMIN><SVE_I>3): Likewise.
11767 (*<su><MAXMIN><SVE_F>3): Likewise.
11768 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11769 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11770 (*div<SVE_F>4): Likewise.
11771
11772 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11773
11774 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11775 in dump string.
11776
11777 2018-07-02 Richard Biener <rguenther@suse.de>
11778
11779 PR tree-optimization/86363
11780 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11781 memset argument refers to a non-variable address.
11782
11783 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11784
11785 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11786 {PLUS,MINUS}_EXPR code to...
11787 (adjust_symbolic_bound): ...here,
11788 (combine_bound): ...here,
11789 (set_value_range_with_overflow): ...and here.
11790
11791 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11792
11793 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11794 code...
11795 (extract_range_from_abs_expr): ...here.
11796
11797 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11798
11799 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11800 -fno-omit-frame-pointer when not optimizing.
11801
11802 2018-07-02 Martin Liska <mliska@suse.cz>
11803
11804 PR ipa/86279
11805 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11806 (propagate_nothrow): Likewise.
11807
11808 2018-07-02 Martin Liska <mliska@suse.cz>
11809
11810 PR ipa/86323
11811 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11812
11813 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11814
11815 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11816 function in r262149, changing "loc" param from source_location to
11817 const dump_location_t &.
11818 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11819 declaration, as above.
11820
11821 2018-07-01 Paul Koning <ni1d@arrl.net>
11822
11823 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11824 -munit-asm, -mgnu-asm, -mdec-asm.
11825 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11826 (pdp11_output_labelref): New.
11827 (pdp11_output_def): New.
11828 (pdp11_output_addr_vec_elt): New.
11829 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11830 %# and %@ format codes.
11831 (pdp11_option_override): New.
11832 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11833 (pdp11_output_ident): New.
11834 (pdp11_asm_named_section): New.
11835 (pdp11_asm_init_sections): New.
11836 (pdp11_file_start): New.
11837 (pdp11_file_end): New.
11838 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11839 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11840 %o, like %c but octal.
11841 (pdp11_option_override): New.
11842 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11843 -mdec-asm.
11844 (DATA_SECTION_ASM_OP): Ditto.
11845 (READONLY_DATA_SECTION_ASM_OP): New.
11846 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11847 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11848 (ASM_OUTPUT_LABELREF): Ditto.
11849 (ASM_OUTPUT_DEF): Ditto.
11850 (ASM_OUTPUT_EXTERNAL): New.
11851 (ASM_OUTPUT_SOURCE_FILENAME): New.
11852 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11853 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11854 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11855 %# and %@ format codes.
11856 * config/pdp11/pdp11.opt (mgnu-asm): New.
11857 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11858 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11859 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11860
11861 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11862
11863 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11864 dereferencing path[] beyond its length.
11865 (debug_path): New.
11866 (debug_all_paths): New.
11867 (rewire_first_differing_edge): New.
11868 (adjust_paths_after_duplication): New.
11869 (duplicate_thread_path): Call adjust_paths_after_duplication.
11870 Add new argument.
11871 (thread_through_all_blocks): Add new argument to
11872 duplicate_thread_path.
11873
11874 2018-06-30 Jim Wilson <jimw@sifive.com>
11875
11876 * config/riscv/predicates.md (p2m1_shift_operand): New.
11877 (high_mask_shift_operand): New.
11878 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11879 pattern using p2m1_shift_operand.
11880 (lshsi3_zero_extend_3+2): New combiner pattern using
11881 high_mask_shift_operand.
11882
11883 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11884
11885 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11886 split out from...
11887 (vect_recog_rotate_pattern): ...here.
11888 (vect_convert_input): Try to insert casts of invariants in the
11889 preheader.
11890 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11891 preheader to be empty.
11892
11893 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11894
11895 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11896 vector type. If given, install it in the new statement's
11897 STMT_VINFO_VECTYPE.
11898 (vect_element_precision): New function.
11899 (vect_unpromoted_value): New struct.
11900 (vect_unpromoted_value::vect_unpromoted_value): New function.
11901 (vect_unpromoted_value::set_op): Likewise.
11902 (vect_look_through_possible_promotion): Likewise.
11903 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11904 (vect_widened_op_tree, vect_convert_input): Likewise.
11905 (vect_convert_inputs, vect_convert_output): Likewise.
11906 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11907 to handle the optional cast of the multiplication result and
11908 vect_widened_op_tree to detect the widened multiplication itself.
11909 Do not require the input and output of promotion casts to have
11910 the same sign, but base the signedness of the operation on the
11911 input rather than the result. If the pattern includes two
11912 promotions, check that those promotions have the same sign.
11913 Do not restrict the MULT_EXPR handling to a double-width result;
11914 handle quadruple-width results and wider. Use vect_convert_inputs
11915 to convert the inputs to the common type.
11916 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11917 to handle the optional cast of the ABS result. Also allow a sign
11918 change or a sign extension between the ABS and MINUS.
11919 Use vect_widened_op_tree to detect the widened subtraction and use
11920 vect_convert_inputs to convert the inputs to the common type.
11921 (vect_handle_widen_op_by_const): Delete.
11922 (vect_recog_widen_op_pattern): New function.
11923 (vect_recog_widen_mult_pattern): Use it.
11924 (vect_recog_widen_shift_pattern): Likewise.
11925 (vect_recog_widen_sum_pattern): Use
11926 vect_look_through_possible_promotion to handle the promoted
11927 PLUS_EXPR operand.
11928
11929 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11930
11931 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11932 the containing gimple_seq *.
11933 * gimple-iterator.h (gsi_for_stmt): Declare it.
11934 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11935 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11936 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11937 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11938 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11939 checks.
11940 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11941 split out from...
11942 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11943 statement being replaced is part of an existing pattern
11944 definition sequence, inserting the new pattern statements before
11945 the original one.
11946 (vect_pattern_recog_1): Don't return a bool. If the statement
11947 is already part of a pattern, instead apply pattern matching
11948 to the pattern definition statements. Don't clear the
11949 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11950 (vect_pattern_recog): Don't break after the first match;
11951 continue processing the pattern definition statements instead.
11952 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11953
11954 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11955
11956 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11957 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11958 (vect_recog_widen_sum_pattern): Use it.
11959
11960 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11961
11962 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11963 phi is not a pattern statement and has not been replaced by
11964 a pattern statement.
11965 * tree-vect-patterns.c (type_conversion_p): Don't check
11966 STMT_VINFO_IN_PATTERN_P.
11967 (vect_recog_vector_vector_shift_pattern): Likewise.
11968 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11969 the pattern statement rather than the original statement; check
11970 directly for a WIDEN_MULT_EXPR here.
11971 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11972 vect_is_simple_use to return the pattern statement rather
11973 than the original statement; use is_pattern_stmt_p to check
11974 for such a pattern statement.
11975 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11976 to return the pattern statement rather than the original statement;
11977 don't do the same transformation here.
11978 (vect_is_simple_use): If the defining statement has been replaced
11979 by a pattern statement, return the pattern statement instead.
11980 Remove the corresponding (local) transformation from the vectype
11981 overload.
11982
11983 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11984
11985 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11986 end and default to null.
11987 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11988 (vectorizable_reduction): Update calls accordingly, dropping the
11989 gimple ** argument if the passed-back statement isn't needed.
11990 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11991 (vect_recog_rotate_pattern): Likewise.
11992 (vect_recog_mask_conversion_pattern): Likewise.
11993 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11994 (vect_mask_constant_operand_p): Likewise.
11995 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11996 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11997 (get_group_load_store_type, get_load_store_type): Likewise.
11998 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11999 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
12000 (vectorizable_conversion, vectorizable_assignment): Likewise.
12001 (vectorizable_shift, vectorizable_operation): Likewise.
12002 (vectorizable_store, vect_is_simple_cond): Likewise.
12003 (vectorizable_condition, vectorizable_comparison): Likewise.
12004 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
12005 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
12006 and move it to the end. Cope with null def_stmt_outs.
12007
12008 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12009
12010 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
12011
12012 2018-06-29 Jeff Law <law@redhat.com>
12013
12014 * config/v850/v850.c (v850_legitimate_address_p): Handle large
12015 displacements for TARGET_V850E2V3 and newer.
12016 (TARGET_LRA_P): Remove. Defaults to LRA now.
12017 * config/v850/v850.md (sign23byte_load): Remove.
12018 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
12019 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
12020
12021 2018-06-29 Martin Liska <mliska@suse.cz>
12022
12023 PR lto/85759
12024 * coverage.c (coverage_init): Mangle full path name.
12025 * doc/invoke.texi: Document the change.
12026 * gcov-io.c (mangle_path): New.
12027 * gcov-io.h (mangle_path): Likewise.
12028 * gcov.c (mangle_name): Use mangle_path for path mangling.
12029
12030 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12031
12032 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
12033 if starting source register is not even.
12034
12035 2018-06-29 Martin Liska <mliska@suse.cz>
12036
12037 PR tree-optimization/86263
12038 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
12039 Make edge redirection.
12040
12041 2018-06-29 David Malcolm <dmalcolm@redhat.com>
12042
12043 * dumpfile.c (dump_loc): Add indentation based on scope depth.
12044 (dump_scope_depth): New variable.
12045 (get_dump_scope_depth): New function.
12046 (dump_begin_scope): New function.
12047 (dump_end_scope): New function.
12048 * dumpfile.h (get_dump_scope_depth): New declaration.
12049 (dump_begin_scope): New declaration.
12050 (dump_end_scope): New declaration.
12051 (class auto_dump_scope): New class.
12052 (AUTO_DUMP_SCOPE): New macro.
12053 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
12054 AUTO_DUMP_SCOPE.
12055
12056 2018-06-29 Richard Biener <rguenther@suse.de>
12057
12058 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
12059 compute_all_dependences succeeds.
12060 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
12061 exceed --param loop-max-datarefs-for-datadeps.
12062
12063 2018-06-29 Jakub Jelinek <jakub@redhat.com>
12064
12065 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
12066
12067 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
12068
12069 PR target/86348
12070 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
12071 alternative 0 in preferred_for_speed attribute.
12072
12073 2018-06-28 Paul Koning <ni1d@arrl.net>
12074
12075 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
12076 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
12077 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
12078 * config/pdp11/pdp11.md: Correct "length" attribute calculation
12079 for shift insn patterns.
12080
12081 2018-06-28 David Malcolm <dmalcolm@redhat.com>
12082
12083 * cgraph.c (cgraph_node::get_body): Replace assignments to
12084 "dump_file" with calls to set_dump_file.
12085 * dumpfile.c (alt_dump_file): Make static, and group with...
12086 (alt_flags): ...this definition.
12087 (dumps_are_enabled): New variable.
12088 (refresh_dumps_are_enabled): New function.
12089 (set_dump_file): New function.
12090 (set_alt_dump_file): New function.
12091 (gcc::dump_manager::dump_start): Replace assignments to
12092 "dump_file" and "alt_dump_file" with calls to set_dump_file and
12093 set_alt_dump_file.
12094 (gcc::dump_manager::dump_finish): Likewise.
12095 * dumpfile.h (alt_dump_file): Delete decl.
12096 (dumps_are_enabled): New variable decl.
12097 (set_dump_file): New function decl.
12098 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
12099 global.
12100 * tree-nested.c (lower_nested_functions): Replace assignments to
12101 "dump_file" with calls to set_dump_file.
12102
12103 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12104
12105 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
12106 goto_locus of each outgoing edge of each basic block.
12107
12108 2018-06-28 Richard Biener <rguenther@suse.de>
12109
12110 * dwarf2out.c (decl_scope_table): Remove.
12111 (push_decl_scope): Likewise.
12112 (pop_decl_scope): Likewise.
12113 (gen_type_die_for_member): Do not call push/pop_decl_scope.
12114 (gen_struct_or_union_type_die): Likewise.
12115 (gen_tagged_type_die): Likewise.
12116 (dwarf2out_init): Do not initialize decl_scope_table.
12117 (dwarf2out_c_finalize): Do not free it.
12118
12119 2018-06-28 Richard Biener <rguenther@suse.de>
12120
12121 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
12122 deciding whether to not re-use a DIE.
12123
12124 2018-06-28 Richard Biener <rguenther@suse.de>
12125
12126 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
12127 DW_AT_abstract_origin attribute.
12128
12129 2018-06-28 Martin Liska <mliska@suse.cz>
12130
12131 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12132 Use newly introduced constants.
12133 * tree-switch-conversion.h (struct jump_table_cluster):
12134 Define max_ratio_for_size and max_ratio_for_speed.
12135
12136 2018-06-28 Martin Liska <mliska@suse.cz>
12137
12138 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12139 Add new checking assert to catch invalid state.
12140 (jump_table_cluster::can_be_handled): Handle single case
12141 clusters.
12142 (jump_table_cluster::is_beneficial): Bail out for such case.
12143 (bit_test_cluster::find_bit_tests):
12144 Add new checking assert to catch invalid state.
12145 (bit_test_cluster::can_be_handled): Handle single case
12146 clusters.
12147 (bit_test_cluster::is_beneficial): Bail out for such case.
12148 (switch_decision_tree::analyze_switch_statement):
12149 Fix comment.
12150
12151 2018-06-28 Martin Liska <mliska@suse.cz>
12152
12153 * common.opt: Introduce -completion option.
12154 * gcc.c (driver_handle_option): Handle it.
12155 (driver::main): Print completions if completion
12156 is set.
12157 * opt-suggestions.c (option_proposer::get_completions):
12158 New function.
12159 (option_proposer::suggest_completion): Likewise.
12160 (option_proposer::find_param_completions): Likewise.
12161 (verify_autocompletions): Likewise.
12162 (test_completion_valid_options): Likewise.
12163 (test_completion_valid_params): Likewise.
12164 (in_completion_p): Likewise.
12165 (empty_completion_p): Likewise.
12166 (test_completion_partial_match): Likewise.
12167 (test_completion_garbage): Likewise.
12168 (opt_proposer_c_tests): Likewise.
12169 * opt-suggestions.h: Declare new functions.
12170 * opts.c (common_handle_option): Handle OPT__completion_.
12171 * selftest-run-tests.c (selftest::run_tests): Add
12172 opt_proposer_c_tests.
12173 * selftest.c (assert_str_startswith): New.
12174 * selftest.h (assert_str_startswith): Likewise.
12175 (opt_proposer_c_tests): New.
12176 (ASSERT_STR_STARTSWITH): Likewise.
12177
12178 2018-06-28 Martin Liska <mliska@suse.cz>
12179
12180 * Makefile.in: Add opt-suggestions.o.
12181 * gcc-main.c: Include opt-suggestions.h.
12182 * gcc.c (driver::driver): Likewise.
12183 (driver::~driver): Remove m_option_suggestions.
12184 (driver::build_option_suggestions): Moved to option_proposer.
12185 (driver::suggest_option): Likewise.
12186 (driver::handle_unrecognized_options): Use option_proposer.
12187 * gcc.h (class driver): Add new memver m_option_proposer.
12188 * opt-suggestions.c: New file.
12189 * opt-suggestions.h: New file.
12190
12191 2018-06-28 Martin Liska <mliska@suse.cz>
12192
12193 * vec.h (class auto_string_vec): New (moved from auto_argvec).
12194 (auto_string_vec::~auto_string_vec): Likewise.
12195
12196 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12197
12198 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
12199 prevent_decl_creation_for_types fields up and add reset_location field.
12200 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
12201 statement if id->reset_location is true.
12202 (copy_edges_for_bb): Do not set goto_locus on the new edges if
12203 id->reset_location is true.
12204 (copy_phis_for_bb): Force input_location on the arguments if
12205 id->reset_location is true.
12206 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
12207 is set on the function to be inlined.
12208
12209 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
12210
12211 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
12212
12213 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
12214
12215 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
12216 registers for Pmode.
12217 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
12218 hard registers for the clobbered pseudo.
12219
12220 2018-06-27 Paul Koning <ni1d@arrl.net>
12221
12222 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12223 mutually exclusive options.
12224 * config/pdp11/constraints.md (h): New constraint.
12225 (O): Update definition to match shift code generation.
12226 (D): New constraint.
12227 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
12228 (CCFP): Remove.
12229 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
12230 function.
12231 (output_jump): Change arguments.
12232 (pdp11_fixed_cc_regs): New function.
12233 (pdp11_cc_mode): Ditto.
12234 (pdp11_expand_shift): Ditto.
12235 (pdp11_assemble_shift): Ditto.
12236 (pdp11_small_shift): Ditto.
12237 (pdp11_branch_cost): Remove.
12238 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
12239 from output.
12240 (pdp11_register_move_cost): Update for CC registers.
12241 (pdp11_rtx_costs): Add case for LSHIFTRT.
12242 (pdp11_output_jump): Add CCNZ mode conditional branches.
12243 (notice_update_cc_on_set): Remove.
12244 (pdp11_cc_mode): New function.
12245 (simple_memory_operand): Correct pre/post decrement case.
12246 (no_side_effect_operand): New function.
12247 (pdp11_regno_reg_class): Add CC_REGS class.
12248 (pdp11_fixed_cc_regs): New function.
12249 (pdp11_small_shift): New function.
12250 (pdp11_expand_shift): New function to expand shift insns.
12251 (pdp11_assemble_shift): New function to output shifts.
12252 (pdp11_branch_cost): Remove.
12253 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12254 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12255 (WCHAR_TYPE): Ditto.
12256 (PTRDIFF_TYPE): Ditto.
12257 (ADJUST_INSN_LENGTH): New macro.
12258 (FIXED_REGISTERS): Add CC registers.
12259 (CALL_USED_REGISTERS): Ditto.
12260 (reg_class): Ditto.
12261 (REG_CLASS_NAMES): Ditto.
12262 (REG_CLASS_CONTENTS): Ditto.
12263 (SELECT_CC_MODE): Use new function.
12264 (TARGET_FLAGS_REGNUM): New macro.
12265 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12266 (cc0_reg_rtx): Remove.
12267 (CC_STATUS_MDEP): Remove.
12268 (CC_STATUS_MDEFP_INIT): Remove.
12269 (CC_IN_FPU): Remove.
12270 (NOTICE_UPDATE_CC): Remove.
12271 (REGISTER_NAMES): Add CC registers.
12272 (BRANCH_COST): Change to constant 1.
12273 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12274 handling.
12275 * config/pdp11/pdp11.opt (mbcopy): Remove.
12276 (mbcopy-builtin): Remove.
12277 (mbranch-cheap): Remove.
12278 (mbranch-expensive): Remove.
12279 * config/pdp11/predicates.md (expand_shift_operand): Update to
12280 match shift code generation.
12281 (ccnz_operator): New predicate.
12282 * doc/invoke.texi (PDP-11 Options): Remove deleted options
12283 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12284 Remove non-existent option -mabshi, -mno-abshi. Document mutually
12285 exclusive options.
12286 * doc/md.texi (PDP-11): Document new D and h constraints. Update
12287 description of O constraint.
12288
12289 2018-06-27 Jeff Law <law@redhat.com>
12290 Austin Law <austinklaw@gmail.com>
12291
12292 * config/v850/v850.md (addsi3_set_flags): New pattern.
12293 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12294 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12295 (zero_extendhisi2_v850_set_flags): Likewise.
12296 (zero_extendqisi2_v850_set_flags): Likewise.
12297 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12298 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12299 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12300
12301 * config/v850/v850-protos.h (notice_update_cc): Remove.
12302 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12303 (v850_print_operand): Handle 'D' and "d".
12304 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12305 Add handling of arithmetic/logical operations compared against zero.
12306 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12307 Do not look at v850_compare_op, instead get mode from last argument.
12308 (v850_gen_compare): Remove
12309 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12310 after reload for prologue insns.
12311 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12312 patterns.
12313 (construct_save_jarl): Likewise.
12314 (TARGET_FLAGS_REGNUM): Define.
12315 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12316 (NOTICE_UPDATE_CC): Remove.
12317 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12318 than cc0. Conditionalize on reload_completed.
12319 (cmpsi_insn, setfcc_insn): Likewise.
12320 (tst1 splitter): Turn into define_and_split which sets the flags
12321 after reload.
12322 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12323 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12324 (cstoresf4, cstoredf4): Clobber the flags.
12325 (cmpsi, cmpsf, cmpdf): Remove expanders.
12326 (setf_insn): Remove pattern.
12327 (addsi3): Turn into define_and_split which clobbers the flags after
12328 reload and a suitable pattern (addsi3_clobber_flags) for use after
12329 reload.
12330 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12331 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12332 (ashrsi3, ashrsi3_v850e2): Likewise.
12333 (bins): Clobber the flags.
12334 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12335 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12336 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12337 (call_value_internal_short, call_value_internal_long): Likewise.
12338 (callt_save_interrupt, callt_return_interrupt): Likewise.
12339 (save_interrupt, return_interrupt): Likewise.
12340 (callt_save_all_interrupt, save_all_interrupt): Likewise.
12341 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12342 (restore_all_interrupt, _restore_all_interrupt): Likewise.
12343 (All FP comparisons): Only allow after reload has completed.
12344 (trfsr): Likewise.
12345 (divh, divhu): Tweak output template.
12346 (branch_z_normal, branch_z_invert): Remove
12347 (branch_nz_normal, branch_nz_invert): Likewise.
12348 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12349
12350 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12351 * config/v850/v850.c (notice_update_cc): Remove.
12352 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
12353 (CC_NO_CARRY): Likewise.
12354 (NOTICE_UPDATE_CC): Define to nothing.
12355 * config/v850/v850.md: Remove block comment on cc0 handling
12356 Remove "cc" attribute from all patterns. Remove cc_status handling
12357 from all patterns. Minor formatting fixes.
12358
12359 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12360
12361 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12362 (cortex-a76.cortex-a55): Likewise.
12363 * config/aarch64/aarch64-tune.md: Regenerate.
12364 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12365 cortex-a76.cortex-a55.
12366
12367 2018-06-27 Jeff Law <law@redhat.com>
12368
12369 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12370 (MULTILIB_DIRNAMES): Similarly.
12371
12372 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
12373
12374 * gimple.h (gimple_return_retbnd): Delete.
12375 (gimple_return_set_retbnd): Likewise.
12376 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12377 gimple_return_set_retbnd.
12378 * gimple-pretty-print.c (dump_gimple_return): Remove call to
12379 gimple_return_retbnd and adjust.
12380 * tree-inline.h (struct copy_body_data): Remove retbnd field.
12381 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12382 Explicitly return NULL in a couple more cases. Move assertion
12383 on debug statements and remove unreachable code.
12384 (reset_debug_binding): Do not test id->retbnd.
12385 (expand_call_inline): Do not set it.
12386
12387 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12388
12389 * configure.ac: Add --disable-gcov option.
12390 * configure: Regenerate.
12391 * Makefile.in: Honour @enable_gcov@.
12392 * doc/install.texi: Document --disable-gcov.
12393
12394 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12395
12396 * config/arm/arm-cpus.in (cortex-a76): New entry.
12397 (cortex-a76.cortex-a55): Likewise.
12398 * config/arm/arm-tables.opt: Regenerate.
12399 * config/arm/arm-tune.md: Likewise.
12400 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12401 * doc/invoke.texi (ARM Options): Document cortex-a76 and
12402 cortex-a76.cortex-a55.
12403
12404 2018-06-27 Tamar Christina <tamar.christina@arm.com>
12405
12406 PR target/85769
12407 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12408
12409 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
12410
12411 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12412 comment.
12413 (EPILOGUE_USES): Likewise.
12414
12415 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
12416
12417 * tree-inline.c (remap_location): New function extracted from...
12418 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
12419 (copy_phis_for_bb): ...here. Call remap_location.
12420 (copy_cfg_body): Adjust call to copy_edges_for_bb.
12421
12422 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
12423
12424 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12425 unaligned vsx for 16B memset.
12426
12427 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
12428
12429 PR target/86285
12430 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12431 ieee128_float_type_node to long_double_type_node unless
12432 TARGET_LONG_DOUBLE_128 is set.
12433
12434 2018-06-26 David Malcolm <dmalcolm@redhat.com>
12435
12436 * cfgloop.c (get_loop_location): Convert return type from
12437 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12438 by implicit construction from rtx_insn *, and using
12439 dump_user_location_t::from_function_decl for the fallback case.
12440 * cfgloop.h (get_loop_location): Convert return type from
12441 location_t to dump_user_location_t.
12442 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12443 dump_printf_loc to pass in a dump_location_t rather than a
12444 location_t, via the gimple stmt.
12445 * coverage.c (get_coverage_counts): Update calls to
12446 dump_printf_loc to pass in dump_location_t rather than a
12447 location_t.
12448 * doc/optinfo.texi (Dump types): Convert example of
12449 dump_printf_loc from taking "locus" to taking "insn". Update
12450 description of the "_loc" calls to cover dump_location_t.
12451 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12452 "selftest.h".
12453 (dump_user_location_t::dump_user_location_t): New constructors,
12454 from gimple *stmt and rtx_insn *.
12455 (dump_user_location_t::from_function_decl): New function.
12456 (dump_loc): Make static.
12457 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12458 const dump_location_t &.
12459 (dump_generic_expr_loc): Delete.
12460 (dump_printf_loc): Convert param "loc" from location_t to
12461 const dump_location_t &.
12462 (selftest::test_impl_location): New function.
12463 (selftest::dumpfile_c_tests): New function.
12464 * dumpfile.h: Include "profile-count.h".
12465 (class dump_user_location_t): New class.
12466 (struct dump_impl_location_t): New struct.
12467 (class dump_location_t): New class.
12468 (dump_printf_loc): Convert 2nd param from source_location to
12469 const dump_location_t &.
12470 (dump_generic_expr_loc): Delete.
12471 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12472 const dump_location_t &.
12473 * gimple-fold.c (fold_gimple_assign): Update call to
12474 dump_printf_loc to pass in a dump_location_t rather than a
12475 location_t, via the gimple stmt.
12476 (gimple_fold_call): Likewise.
12477 * gimple-loop-interchange.cc
12478 (loop_cand::analyze_iloop_reduction_var): Update for change to
12479 check_reduction_path.
12480 (tree_loop_interchange::interchange): Update for change to
12481 find_loop_location.
12482 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12483 change in return-type of find_loop_location.
12484 (graphite_regenerate_ast_isl): Likewise.
12485 * graphite-optimize-isl.c (optimize_isl): Likewise.
12486 * graphite.c (graphite_transform_loops): Likewise.
12487 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12488 pass in a dump_location_t rather than a location_t, via the
12489 gimple stmt.
12490 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12491 * ipa.c (walk_polymorphic_call_targets): Likewise.
12492 * loop-unroll.c (report_unroll): Convert "locus" param from
12493 location_t to dump_location_t.
12494 (decide_unrolling): Update for change to get_loop_location's
12495 return type.
12496 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12497 location_t to dump_user_location_t.
12498 (grid_find_single_omp_among_assignments_1): Updates calls to
12499 dump_printf_loc to pass in a dump_location_t rather than a
12500 location_t, via the gimple stmt.
12501 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12502 location_t to dump_location_t. Updates calls to dump_printf_loc
12503 to pass in a dump_location_t rather than a location_t, via the
12504 gimple stmt.
12505 (grid_inner_loop_gridifiable_p): Likewise.
12506 (grid_dist_follows_simple_pattern): Likewise.
12507 (grid_gfor_follows_tiling_pattern): Likewise.
12508 (grid_target_follows_gridifiable_pattern): Likewise.
12509 (grid_attempt_target_gridification): Convert initialization
12510 of local "grid" from memset to zero-initialization; FIXME: does
12511 this require C++11? Update call to dump_printf_loc to pass in a
12512 optinfo_location rather than a location_t, via the gimple stmt.
12513 * profile.c (read_profile_edge_counts): Updates call to
12514 dump_printf_loc to pass in a dump_location_t rather than a
12515 location_t
12516 (compute_branch_probabilities): Likewise.
12517 * selftest-run-tests.c (selftest::run_tests): Call
12518 dumpfile_c_tests.
12519 * selftest.h (dumpfile_c_tests): New decl.
12520 * tree-loop-distribution.c (pass_loop_distribution::execute):
12521 Update for change in return type of find_loop_location.
12522 * tree-parloops.c (parallelize_loops): Likewise.
12523 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12524 "locus" from location_t to dump_user_location_t.
12525 (canonicalize_loop_induction_variables): Likewise.
12526 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12527 for change in return type of find_loop_location.
12528 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12529 to dump_printf_loc to pass in a dump_location_t rather than a
12530 location_t, via the stmt.
12531 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12532 Likewise.
12533 * tree-vect-loop-manip.c (find_loop_location): Convert return
12534 type from source_location to dump_user_location_t.
12535 (vect_do_peeling): Update for above change.
12536 (vect_loop_versioning): Update for change in type of
12537 vect_location.
12538 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12539 from location_t to dump_user_location_t.
12540 (vect_estimate_min_profitable_iters): Update for change in type
12541 of vect_location.
12542 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12543 location_t to dump_location_t.
12544 (vect_slp_bb): Update for change in type of vect_location.
12545 * tree-vectorizer.c (vect_location): Convert from source_location
12546 to dump_user_location_t.
12547 (try_vectorize_loop_1): Update for change in vect_location's type.
12548 (vectorize_loops): Likewise.
12549 (increase_alignment): Likewise.
12550 * tree-vectorizer.h (vect_location): Convert from source_location
12551 to dump_user_location_t.
12552 (find_loop_location): Convert return type from source_location to
12553 dump_user_location_t.
12554 (check_reduction_path): Convert 1st param from location_t to
12555 dump_user_location_t.
12556 * value-prof.c (check_counter): Update call to dump_printf_loc to
12557 pass in a dump_user_location_t rather than a location_t; update
12558 call to error_at for change in type of "locus".
12559 (check_ic_target): Update call to dump_printf_loc to
12560 pass in a dump_user_location_t rather than a location_t, via the
12561 call_stmt.
12562
12563 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12564
12565 * config/s390/s390.h (enum processor_flags): Do not use
12566 default tune parameter when -march was specified.
12567
12568 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12569
12570 PR target/86314
12571 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12572 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12573 operands.
12574
12575 2018-06-26 Richard Biener <rguenther@suse.de>
12576
12577 PR tree-optimization/86287
12578 PR bootstrap/86316
12579 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12580 (vect_analyze_loop): Initialize n_stmts.
12581
12582 2018-06-26 Richard Biener <rguenther@suse.de>
12583
12584 PR middle-end/86271
12585 * fold-const.c (fold_convertible_p): Pointer extension
12586 isn't valid.
12587
12588 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12589
12590 PR debug/86064
12591 * dwarf2out.c (loc_list_has_views): Adjust comments.
12592 (dw_loc_list): Split single cross-partition range with
12593 nonzero locview.
12594
12595 2018-06-25 Jeff Law <law@redhat.com>
12596
12597 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12598 on -mbig-switch by default.
12599
12600 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12601 test.
12602 (const_float_0_operand): Remove unused predicate.
12603 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12604 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12605 (recipsf2): New expander. Original pattern now called
12606 (recipsf2_insn).
12607 (recipdf2, recipdf2_insn): Similarly.
12608 (rsqrtsf2, rsqrtsf2_insn): Similarly
12609 (rsqrtdf2, rsqrtdf2_insn): Similarly
12610
12611 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12612
12613 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12614 Simplify logic for FreeBSD (twice).
12615
12616 2018-06-25 Martin Sebor <msebor@redhat.com>
12617
12618 PR tree-optimization/86204
12619 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12620 a strnlen result if it's less than the length of the string.
12621
12622 2018-06-25 Martin Sebor <msebor@redhat.com>
12623
12624 PR tree-optimization/85700
12625 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12626 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12627 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12628
12629 2018-06-25 Martin Sebor <msebor@redhat.com>
12630
12631 * doc/extend.texi (Zero-length arrays): Update and clarify.
12632
12633 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12634
12635 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12636 added IEEE/IBM long double multilib support on PowerPC little
12637 endian Linux systems.
12638 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12639 (MULTILIB_DEFAULTS): Likewise.
12640 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12641 Likewise.
12642 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12643 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12644 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12645
12646 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12647
12648 PR middle-end/86311
12649 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12650 (REORDER_45): Likewise.
12651
12652 2018-06-25 Jeff Law <law@redhat.com>
12653
12654 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12655 dividend to 32 bits. Adjust length.
12656 (udivmodhi4): Cleanup output template. Fix length.
12657
12658 2018-06-25 Carl Love <cel@us.ibm.com>
12659
12660 * config/rs6000/vsx.md: Change word selector to prefered location.
12661
12662 2018-06-25 Richard Biener <rguenther@suse.de>
12663
12664 PR tree-optimization/86304
12665 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12666 epilogue-if-converted loops as well.
12667
12668 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12669
12670 * lto-section-out.c (lto_begin_section): Do not print section
12671 name for noaddr and unnumbered dumps.
12672
12673 2018-06-25 Richard Biener <rguenther@suse.de>
12674
12675 * tree-vectorizer.h (struct vec_info_shared): New structure
12676 with parts split out from struct vec_info and loop_nest from
12677 struct _loop_vec_info.
12678 (struct vec_info): Adjust accordingly.
12679 (struct _loop_vec_info): Likewise.
12680 (LOOP_VINFO_LOOP_NEST): Adjust.
12681 (LOOP_VINFO_DATAREFS): Likewise.
12682 (LOOP_VINFO_DDRS): Likewise.
12683 (struct _bb_vec_info): Likewise.
12684 (BB_VINFO_DATAREFS): Likewise.
12685 (BB_VINFO_DDRS): Likewise.
12686 (struct _stmt_vec_info): Add dr_aux member.
12687 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12688 (DR_MISALIGNMENT_UNINITIALIZED): New.
12689 (set_dr_misalignment): Adjust.
12690 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12691 (vect_analyze_loop): Adjust prototype.
12692 (vect_analyze_loop_form): Likewise.
12693 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12694 Compute dependences lazily.
12695 (vect_record_base_alignments): Use shared datarefs/ddrs.
12696 (vect_verify_datarefs_alignment): Likewise.
12697 (vect_analyze_data_refs_alignment): Likewise.
12698 (vect_analyze_data_ref_accesses): Likewise.
12699 (vect_analyze_data_refs): Likewise.
12700 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12701 constructor parameter for shared part.
12702 (vect_analyze_loop_form): Pass in shared part and adjust.
12703 (vect_analyze_loop_2): Pass in storage for the number of
12704 stmts. Move loop nest finding to the caller. Compute
12705 datarefs lazily.
12706 (vect_analyze_loop): Pass in shared part.
12707 (vect_transform_loop): Verify shared datarefs are unchanged.
12708 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12709 constructor parameter for shared part.
12710 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12711 (vect_slp_bb): Verify shared datarefs are unchanged before
12712 transform.
12713 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12714 change.
12715 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12716 DR_MISALIGNMENT_UNINITIALIZED.
12717 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12718 parameter for shared part.
12719 (vec_info::~vec_info): Adjust.
12720 (vec_info_shared::vec_info_shared): New.
12721 (vec_info_shared::~vec_info_shared): Likewise.
12722 (vec_info_shared::save_datarefs): Likewise.
12723 (vec_info_shared::check_datarefs): Likewise.
12724 (try_vectorize_loop_1): Construct shared part live for analyses
12725 of a single loop for multiple vector sizes.
12726 * tree-parloops.c (gather_scalar_reductions): Adjust.
12727
12728 2018-06-25 Richard Biener <rguenther@suse.de>
12729
12730 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12731 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12732 (vect_analyze_data_refs): Remove similar code from here and
12733 simplify accordingly.
12734
12735 2018-06-25 Richard Biener <rguenther@suse.de>
12736
12737 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12738 for reverse storage order accesses rather than asserting
12739 they cannot happen here.
12740
12741 2018-06-25 Tom de Vries <tdevries@suse.de>
12742
12743 PR debug/86257
12744 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12745 Use data16 instead of .byte for insn prefix.
12746
12747 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12748
12749 PR C++/86082
12750 * parser.c (make_char_string_pack): Pass this literal chars
12751 through cpp_interpret_string.
12752 (cp_parser_userdef_numeric_literal): Check the result of
12753 make_char_string_pack.
12754
12755 2018-06-24 Maya Rashish <coypu@sdf.org>
12756
12757 * ginclude/stddef.h: Simplify conditions around avoiding
12758 re-definition of __size_t.
12759
12760 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12761
12762 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12763 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12764
12765 2018-06-22 Maya Rashish <coypu@sdf.org>
12766
12767 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12768 made to OpenBSD and NetBSD through the years.
12769
12770 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12771
12772 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12773 behavior of vec_pack (vector double, vector double) to match
12774 behavior of vec_float2 (vector double, vector double).
12775
12776 2018-06-22 Olivier Hainque <hainque@adacore.com>
12777
12778 * gimplify.c (gimplify_function_tree): Prevent creation
12779 of a trampoline for the address of the current function
12780 passed to entry/exit instrumentation hooks.
12781
12782 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12783
12784 PR target/86222
12785 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12786 correctly.
12787
12788 2018-06-22 Martin Liska <mliska@suse.cz>
12789
12790 PR tree-optimization/86263
12791 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12792 Bail out if is_enabled is false.
12793 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12794 New declaration.
12795 (jump_table_cluster::is_enabled): New function.
12796
12797 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12798
12799 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12800 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12801 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12802 (lto_input_ts_binfo_tree_pointers): Likewise.
12803 * tree-streamer-out.c (streamer_write_tree_bitfields,
12804 write_ts_binfo_tree_pointers): Likewise.
12805 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12806
12807 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12808
12809 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12810
12811 2018-06-22 Martin Liska <mliska@suse.cz>
12812
12813 * symbol-summary.h (get): Make it pure and inline move
12814 functionality from ::get function.
12815 (get): Remove and inline into ::get and ::get_create.
12816 (get_create): Move code from ::get function.
12817
12818 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12819
12820 PR target/85994
12821 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12822 -x assembler-with-cpp.
12823
12824 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12825
12826 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12827 _FILE_OFFSET_BITS=64 for C++.
12828
12829 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12830
12831 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12832 conversion insn that shows up when pr85657-3.c is compiled using
12833 IEEE 128-bit long double.
12834 (neg<mode>2_internal): Use the correct mode to check whether the
12835 mode is IBM extended.
12836 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12837 multiply and divide external functions from being created more
12838 than once.
12839
12840 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12841
12842 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12843 functions.
12844 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12845 the edge can be forwarded.
12846 (cfg_layout_merge_blocks): Likewise.
12847
12848 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12849
12850 * except.c (finish_eh_generation): Commit edge insertions only after
12851 the EH edges have been redirected from post-landing to landing pads.
12852
12853 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12854
12855 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12856 create_tmp_var_for to create the FRAME decl.
12857 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12858
12859 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12860
12861 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12862 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12863 debug statement when resetting its value.
12864 (expand_call_inline): Copy the locus of the call onto the assignment
12865 of the return value, if any. Use local variable in more cases.
12866
12867 2018-06-21 Martin Liska <mliska@suse.cz>
12868
12869 * ipa-pure-const.c (propagate_nothrow): Use
12870 funct_state_summaries->get.
12871 (dump_malloc_lattice): Likewise.
12872 (propagate_malloc): Likewise.
12873
12874 2018-06-21 Richard Biener <rguenther@suse.de>
12875
12876 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12877 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12878 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12879 comment.
12880 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12881 BLOCK_ABSTRACT_ORIGIN unconditionally.
12882
12883 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12884
12885 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12886 deleting it.
12887 * ipa-reference.c (ipa_reference_c_finalize): Delete
12888 ipa_ref_opt_sum_summaries and set it to NULL.
12889
12890 2018-06-21 Tom de Vries <tdevries@suse.de>
12891
12892 PR tree-optimization/85859
12893 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12894 test with comment from bb_no_side_effects_p.
12895
12896 2018-06-21 Richard Biener <rguenther@suse.de>
12897
12898 PR tree-optimization/86232
12899 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12900 max for constant niter.
12901
12902 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12903
12904 * config/aarch64/aarch64-simd.md
12905 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12906
12907 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12908
12909 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12910 Make opernads of the unspec commutative.
12911
12912 2018-06-21 Richard Biener <rguenther@suse.de>
12913
12914 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12915 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12916 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12917 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12918 NULL DR_STEP.
12919 (vect_record_base_alignments): Do not record base alignment
12920 for gathers or scatters.
12921 (vect_compute_data_ref_alignment): Drop return value that is always
12922 true. Bail out early for gathers or scatters.
12923 (vect_enhance_data_refs_alignment): Bail out early for gathers
12924 or scatters.
12925 (vect_find_same_alignment_drs): Likewise.
12926 (vect_analyze_data_refs_alignment): Remove dead code.
12927 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12928 (vect_analyze_data_refs): For possible gathers or scatters do
12929 not create an alternate DR, just check their possible validity
12930 and mark them. Adjust DECL_NONALIASED handling to not rely
12931 on DR_BASE_ADDRESS.
12932 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12933 update inits of gathers or scatters.
12934 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12935 Also copy gather/scatter flag to pattern vinfo.
12936
12937 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12938
12939 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12940 behavior of vec_packsu (vector unsigned long long, vector unsigned
12941 long long) to match behavior of vec_packs with same signature.
12942
12943 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12944 Thomas Schwinge <thomas@codesourcery.com>
12945 Cesar Philippidis <cesar@codesourcery.com>
12946
12947 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12948 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12949 (gimplify_adjust_omp_clauses): Likewise.
12950 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12951 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12952 (gimplify_omp_target_update): Update handling of acc update and
12953 enter/exit data.
12954 * omp-low.c (install_var_field): Remove unused parameter
12955 base_pointers_restrict.
12956 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12957 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12958 FINALIZE}
12959 (omp_target_base_pointers_restrict_p): Delete.
12960 (scan_omp_target): Update call to scan_sharing_clauses.
12961 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12962 FINALIZE}.
12963 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12964 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12965 (convert_local_omp_clauses): Likewise.
12966 * tree-pretty-print.c (dump_omp_clause): Likewise.
12967 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12968 FINALIZE}.
12969 (omp_clause_code_name): Likewise.
12970
12971 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12972
12973 PR debug/86194
12974 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12975 be narrowed.
12976
12977 PR tree-optimization/86231
12978 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12979 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12980
12981 2018-06-20 Tom de Vries <tdevries@suse.de>
12982
12983 PR tree-optimization/86097
12984 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12985 iv type if signedness of iv type is not the same as that of *nit.
12986
12987 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12988
12989 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12990 EDGE_EH edges, verify they are all EDGE_EH.
12991
12992 2018-06-20 Maya Rashish <coypu@sdf.org>
12993
12994 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12995
12996 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12997
12998 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12999 * config/aarch64/aarch64.c (xgene1_tunings): Add
13000 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
13001 (aarch64_mode_valid_for_sched_fusion_p):
13002 Allow 16-byte modes.
13003 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
13004 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
13005 128-bit modes.
13006 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
13007 New pattern.
13008 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
13009 * config/aarch64/iterators.md (VQ2): New mode iterator.
13010
13011 2018-06-20 Martin Liska <mliska@suse.cz>
13012
13013 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13014 Change default ratio from 10 to 8.
13015
13016 2018-06-20 Martin Liska <mliska@suse.cz>
13017
13018 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13019 New.
13020 (bit_test_cluster::find_bit_tests): Likewise.
13021 (switch_decision_tree::analyze_switch_statement): Find clusters.
13022 * tree-switch-conversion.h (struct jump_table_cluster): Document
13023 hierarchy.
13024
13025 2018-06-20 Martin Liska <mliska@suse.cz>
13026
13027 * tree-switch-conversion.c (switch_conversion::collect):
13028 Record m_uniq property.
13029 (switch_conversion::expand): Bail out for special conditions.
13030 (group_cluster::~group_cluster): New.
13031 (group_cluster::group_cluster): Likewise.
13032 (group_cluster::dump): Likewise.
13033 (jump_table_cluster::emit): New.
13034 (switch_decision_tree::fix_phi_operands_for_edges): New.
13035 (struct case_node): Remove struct.
13036 (jump_table_cluster::can_be_handled): New.
13037 (case_values_threshold): Moved to header.
13038 (reset_out_edges_aux): Likewise.
13039 (jump_table_cluster::is_beneficial): New.
13040 (bit_test_cluster::can_be_handled): Likewise.
13041 (add_case_node): Remove.
13042 (bit_test_cluster::is_beneficial): New.
13043 (case_bit_test::cmp): New.
13044 (bit_test_cluster::emit): New.
13045 (expand_switch_as_decision_tree_p): Remove.
13046 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
13047 (fix_phi_operands_for_edge): Likewise.
13048 (switch_decision_tree::analyze_switch_statement): New.
13049 (compute_cases_per_edge): Move ...
13050 (switch_decision_tree::compute_cases_per_edge): ... here.
13051 (try_switch_expansion): Likewise.
13052 (switch_decision_tree::try_switch_expansion): Likewise.
13053 (record_phi_operand_mapping): Likewise.
13054 (switch_decision_tree::record_phi_operand_mapping): Likewise.
13055 (emit_case_decision_tree): Likewise.
13056 (switch_decision_tree::emit): Likewise.
13057 (balance_case_nodes): Likewise.
13058 (switch_decision_tree::balance_case_nodes): Likewise.
13059 (dump_case_nodes): Likewise.
13060 (switch_decision_tree::dump_case_nodes): Likewise.
13061 (emit_jump): Likewise.
13062 (switch_decision_tree::emit_jump): Likewise.
13063 (emit_cmp_and_jump_insns): Likewise.
13064 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
13065 (emit_case_nodes): Likewise.
13066 (switch_decision_tree::emit_case_nodes): Likewise.
13067 (conditional_probability): Remove.
13068 * tree-switch-conversion.h (enum cluster_type): New.
13069 (PRINT_CASE): New.
13070 (struct cluster): Likewise.
13071 (cluster::cluster): Likewise.
13072 (struct simple_cluster): Likewise.
13073 (simple_cluster::simple_cluster): Likewise.
13074 (struct group_cluster): Likewise.
13075 (struct jump_table_cluster): Likewise.
13076 (struct bit_test_cluster): Likewise.
13077 (struct min_cluster_item): Likewise.
13078 (struct case_tree_node): Likewise.
13079 (case_tree_node::case_tree_node): Likewise.
13080 (jump_table_cluster::case_values_threshold): Likewise.
13081 (struct case_bit_test): Likewise.
13082 (struct switch_decision_tree): Likewise.
13083 (struct switch_conversion): Likewise.
13084 (switch_decision_tree::reset_out_edges_aux): Likewise.
13085
13086 2018-06-20 Martin Liska <mliska@suse.cz>
13087
13088 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
13089 (hoist_edge_and_branch_if_true): Likewise.
13090 (expand_switch_using_bit_tests_p): Likewise.
13091 (struct case_bit_test): Likewise.
13092 (case_bit_test_cmp): Likewise.
13093 (emit_case_bit_tests): Likewise.
13094 (switch_conversion::switch_conversion): New class.
13095 (struct switch_conv_info): Remove old struct.
13096 (collect_switch_conv_info): More to ...
13097 (switch_conversion::collect): ... this.
13098 (check_range): Likewise.
13099 (switch_conversion::check_range): Likewise.
13100 (check_all_empty_except_final): Likewise.
13101 (switch_conversion::check_all_empty_except_final): Likewise.
13102 (check_final_bb): Likewise.
13103 (switch_conversion::check_final_bb): Likewise.
13104 (create_temp_arrays): Likewise.
13105 (switch_conversion::create_temp_arrays): Likewise.
13106 (free_temp_arrays): Likewise.
13107 (gather_default_values): Likewise.
13108 (switch_conversion::gather_default_values): Likewise.
13109 (build_constructors): Likewise.
13110 (switch_conversion::build_constructors): Likewise.
13111 (constructor_contains_same_values_p): Likewise.
13112 (switch_conversion::contains_same_values_p): Likewise.
13113 (array_value_type): Likewise.
13114 (switch_conversion::array_value_type): Likewise.
13115 (build_one_array): Likewise.
13116 (switch_conversion::build_one_array): Likewise.
13117 (build_arrays): Likewise.
13118 (switch_conversion::build_arrays): Likewise.
13119 (gen_def_assigns): Likewise.
13120 (switch_conversion::gen_def_assigns): Likewise.
13121 (prune_bbs): Likewise.
13122 (switch_conversion::prune_bbs): Likewise.
13123 (fix_phi_nodes): Likewise.
13124 (switch_conversion::fix_phi_nodes): Likewise.
13125 (gen_inbound_check): Likewise.
13126 (switch_conversion::gen_inbound_check): Likewise.
13127 (process_switch): Use the newly created class.
13128 (switch_conversion::expand): New.
13129 (switch_conversion::~switch_conversion): New.
13130 * tree-switch-conversion.h: New file.
13131
13132 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13133
13134 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
13135 tree-vect-patterns.c.
13136 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
13137 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
13138 (vect_recog_sad_pattern): Likewise.
13139 (vect_recog_widen_sum_pattern): Likewise.
13140 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
13141 (vect_recog_widen_shift_pattern): Remove the type_in argument.
13142 (vect_recog_rotate_pattern): Likewise.
13143 (vect_recog_mult_pattern): Likewise.
13144 (vect_recog_vector_vector_shift_pattern): Likewise.
13145 (vect_recog_divmod_pattern): Likewise.
13146 (vect_recog_mixed_size_cond_pattern): Likewise.
13147 (vect_recog_bool_pattern): Likewise.
13148 (vect_recog_mask_conversion_pattern): Likewise.
13149 (vect_try_gather_scatter_pattern): Likewise.
13150 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
13151 (vect_recog_over_widening_pattern): Likewise.
13152 (vect_recog_gather_scatter_pattern): Likewise.
13153 (vect_recog_func_ptr): Move from tree-vectorizer.h
13154 (vect_vect_recog_func_ptrs): Move further down the file.
13155 (vect_recog_func): Likewise. Remove the third argument.
13156 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
13157 (vect_pattern_recog_1): Expect the pattern function to do any
13158 necessary target tests. Also expect it to provide a vector type.
13159 Remove the type_in handling.
13160
13161 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13162
13163 * tree-vect-patterns.c (vect_pattern_detected): New function.
13164 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
13165 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
13166 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
13167 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
13168 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13169 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13170 (vect_recog_mask_conversion_pattern)
13171 (vect_try_gather_scatter_pattern): Likewise.
13172
13173 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13174
13175 * tree-vect-patterns.c (vect_get_internal_def): New function.
13176 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13177 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
13178 (search_type_for_mask_1): Use it.
13179
13180 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13181
13182 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13183 redundant WIDEN_SUM_EXPR handling.
13184 (vect_recog_sad_pattern): Likewise.
13185
13186 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13187
13188 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13189 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
13190 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
13191 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13192 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
13193
13194 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13195
13196 * tree-vect-stmts.c (vectorizable_call): Make sure that we
13197 use the stmt_vec_info of the original bb statement for the
13198 new zero assignment, even if the call is part of a pattern.
13199
13200 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13201
13202 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
13203 that the sequence is attached to the original statement rather
13204 than the pattern statement.
13205 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
13206 PATTERN_DEF_SEQ from the original statement rather than
13207 the main pattern statement.
13208 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
13209 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
13210 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
13211
13212 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13213
13214 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
13215 definition statements before the early exit for statements that aren't
13216 live or relevant.
13217 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
13218 split out from...
13219 (vect_transform_loop): ...here. Process pattern definition
13220 statements without first checking whether the main pattern
13221 statement is live or relevant.
13222
13223 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13224
13225 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
13226 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
13227
13228 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
13229
13230 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
13231 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
13232 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
13233 (expand_block_compare): Change select_block_compare_mode call.
13234 (expand_strncmp_align_check): Use new functions, fix comment.
13235 (emit_final_str_compare_gpr): New function.
13236 (expand_strn_compare): Refactor and clean up code.
13237 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
13238
13239 2018-06-19 Tony Reix <tony.reix@atos.com>
13240 Damien Bergamini <damien.bergamini@atos.com>
13241 David Edelsohn <dje.gcc@gmail.com>
13242
13243 * collect2.c (static_obj): New variable.
13244 (static_libs): New variable.
13245 (is_in_list): Uncomment declaration.
13246 (main): Track AIX libraries linked statically.
13247 (is_in_list): Uncomment definition.
13248 (scan_prog_file): Don't add AIX shared libraries initializer
13249 to constructor list if linking statically.
13250
13251 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
13252
13253 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13254 constant.
13255 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13256
13257 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
13258
13259 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13260 blocks.
13261
13262 2018-06-19 Martin Liska <mliska@suse.cz>
13263
13264 * config/i386/i386.c (ix86_can_inline_p): Do not use
13265 ipa_fn_summaries::get_create.
13266 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13267 get.
13268 (devirtualization_time_bonus): Likewise.
13269 (ipcp_propagate_stage): Likewise.
13270 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13271 (edge_set_predicate): Likewise.
13272 (evaluate_conditions_for_known_args): Likewise.
13273 (evaluate_properties_for_edge): Likewise.
13274 (ipa_call_summary::reset): Tranform to ...
13275 (ipa_call_summary::~ipa_call_summary): ... this.
13276 (ipa_fn_summary::reset): Transform to ...
13277 (ipa_fn_summary::~ipa_fn_summary): ... this.
13278 (ipa_fn_summary_t::remove): Rename to ...
13279 (ipa_fn_summary_t::remove_callees): ... this.
13280 (ipa_fn_summary_t::duplicate): Use placement new
13281 instead of memory copy.
13282 (ipa_call_summary_t::duplicate): Likewise.
13283 (ipa_call_summary_t::remove): Remove.
13284 (dump_ipa_call_summary): Change get_create to get.
13285 (ipa_dump_fn_summary): Dump only when summary exists.
13286 (analyze_function_body): Use symbol_summary::get instead
13287 of get_create.
13288 (compute_fn_summary): Likewise.
13289 (estimate_edge_devirt_benefit): Likewise.
13290 (estimate_edge_size_and_time): Likewise.
13291 (inline_update_callee_summaries): Likewise.
13292 (remap_edge_change_prob): Likewise.
13293 (remap_edge_summaries): Likewise.
13294 (ipa_merge_fn_summary_after_inlining): Likewise.
13295 (write_ipa_call_summary): Likewise.
13296 (ipa_fn_summary_write): Likewise.
13297 (ipa_free_fn_summary): Likewise.
13298 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13299 (struct ipa_call_summary): Likewise.
13300 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13301 of get_create.
13302 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13303 (estimate_size_after_inlining): Likewise.
13304 (estimate_growth): Likewise.
13305 (growth_likely_positive): Likewise.
13306 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13307 (inline_call): Likewise.
13308 * ipa-inline.c (caller_growth_limits): Likewise.
13309 (can_inline_edge_p): Likewise.
13310 (can_inline_edge_by_limits_p): Likewise.
13311 (compute_uninlined_call_time): Likewise.
13312 (compute_inlined_call_time): Likewise.
13313 (want_inline_small_function_p): Likewise.
13314 (edge_badness): Likewise.
13315 (update_caller_keys): Likewise.
13316 (update_callee_keys): Likewise.
13317 (inline_small_functions): Likewise.
13318 (inline_to_all_callers_1): Likewise.
13319 (dump_overall_stats): Likewise.
13320 (early_inline_small_functions): Likewise.
13321 (early_inliner): Likewise.
13322 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13323 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13324 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13325 * ipa-split.c (execute_split_functions): Likewise.
13326 * symbol-summary.h: Likewise.
13327 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13328
13329 2018-06-19 Richard Biener <rguenther@suse.de>
13330
13331 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13332 (vectorize_loops): ... here. Fix dbgcnt handling.
13333 (try_vectorize_loop): Wrap try_vectorize_loop_1.
13334
13335 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
13336
13337 PR target/86197
13338 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13339 ieee128 argument takes up only one (vector) register, not two (floating
13340 point) registers.
13341
13342 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13343
13344 * gimplify.c (gimplify_init_constructor): Really never clear for an
13345 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13346
13347 2018-06-19 Richard Biener <rguenther@suse.de>
13348
13349 PR tree-optimization/86179
13350 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13351 after failed recognition.
13352
13353 2018-06-18 Martin Sebor <msebor@redhat.com>
13354
13355 PR middle-end/85602
13356 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13357 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13358 Handle integer subtraction.
13359 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13360 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13361
13362 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13363
13364 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13365 param from rtx to rtx_insn *.
13366 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13367 param.
13368 (frv_ifcvt_modify_insn): Likwise.
13369 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13370 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
13371 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13372 as_a <rtx_insn *> cast to local "unprotected_region" once
13373 it's been established that it's not NULL or pc_rtx.
13374 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13375 param "sethi" from rtx to rtx_insn *.
13376 (nds32_group_float_insns): Likewise for param "insn".
13377 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13378 param.
13379 (vax_output_int_subtract): Likewise.
13380 * config/vax/vax.c (vax_output_int_add): Likewise for param
13381 "insn".
13382 (vax_output_int_subtract): Likewise.
13383 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13384 (emit_pattern_after): Likewise for param "after".
13385 (emit_insn_after): Likewise.
13386 (emit_jump_insn_after): Likewise.
13387 (emit_call_insn_after): Likewise.
13388 (emit_debug_insn_after): Likewise.
13389 (emit_pattern_before): Likewise for param "before".
13390 (emit_insn_before): Likewise.
13391 (emit_jump_insn_before): Likewise.
13392 * final.c (get_insn_template): Likewise for param "insn", removing
13393 a cast.
13394 * output.h (get_insn_template): Likewise for 2nd param.
13395 * rtl.h (emit_insn_before): Likewise.
13396 (emit_jump_insn_before): Likewise.
13397 (emit_debug_insn_before_noloc): Likewise.
13398 (emit_insn_after): Likewise.
13399 (emit_jump_insn_after): Likewise.
13400 (emit_call_insn_after): Likewise.
13401 (emit_debug_insn_after): Likewise.
13402 (set_insn_deleted): Likewise for param.
13403
13404 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
13405
13406 PR target/85358
13407 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13408 floating point modes, so that IFmode is numerically greater than
13409 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13410 to declare the ordering. This prevents IFmode from being
13411 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13412 machine. Include rs6000-modes.h to share the fractional values
13413 between genmodes* and the rest of the compiler.
13414 (IFmode): Likewise.
13415 (KFmode): Likewise.
13416 (TFmode): Likewise.
13417 * config/rs6000/rs6000-modes.h: New file.
13418 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13419 meaning of rs6000_long_double_size so that 126..128 selects an
13420 appropriate 128-bit floating point type.
13421 (rs6000_option_override_internal): Likewise.
13422 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13423 (TARGET_LONG_DOUBLE_128): Change the meaning of
13424 rs6000_long_double_size so that 126..128 selects an appropriate
13425 128-bit floating point type.
13426 (LONG_DOUBLE_TYPE_SIZE): Update comment.
13427 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13428 source and destination to match the standard usage.
13429 (truncifkf2): Likewise.
13430 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13431 ISA 2.07 to use an explicit clobber, instead of passing in a
13432 temporary.
13433 (copysign<mode>3_soft): Likewise.
13434
13435 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13436
13437 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13438 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13439 (vect_slp_analyze_instance_dependence): Likewise.
13440 (vect_enhance_data_refs_alignment): Likewise.
13441 (vect_analyze_data_refs_alignment): Likewise.
13442 (vect_slp_analyze_and_verify_instance_alignment
13443 (vect_analyze_data_ref_accesses): Likewise.
13444 (vect_prune_runtime_alias_test_list): Likewise.
13445 (vect_analyze_data_refs): Likewise.
13446 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13447 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13448 (vect_analyze_scalar_cycles_1): Likewise.
13449 (vect_get_loop_niters): Likewise.
13450 (vect_analyze_loop_form_1): Likewise.
13451 (vect_update_vf_for_slp): Likewise.
13452 (vect_analyze_loop_operations): Likewise.
13453 (vect_analyze_loop): Likewise.
13454 (vectorizable_induction): Likewise.
13455 (vect_transform_loop): Likewise.
13456 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13457 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13458 (vect_make_slp_decision): Likewise.
13459 (vect_detect_hybrid_slp): Likewise.
13460 (vect_slp_analyze_operations): Likewise.
13461 (vect_slp_bb): Likewise.
13462 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13463 (vectorizable_bswap): Likewise.
13464 (vectorizable_call): Likewise.
13465 (vectorizable_simd_clone_call): Likewise.
13466 (vectorizable_conversion): Likewise.
13467 (vectorizable_assignment): Likewise.
13468 (vectorizable_shift): Likewise.
13469 (vectorizable_operation): Likewise.
13470 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13471
13472 2018-06-18 Martin Sebor <msebor@redhat.com>
13473
13474 PR tree-optimization/81384
13475 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13476 * builtins.c (expand_builtin_strnlen): New function.
13477 (expand_builtin): Call it.
13478 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13479 * builtins.def (BUILT_IN_STRNLEN): New.
13480 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13481 Warn for bounds in excess of maximum object size.
13482 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13483 single-value ranges. Handle strnlen.
13484 (handle_builtin_strlen): Handle strnlen.
13485 (strlen_check_and_optimize_stmt): Same.
13486 * doc/extend.texi (Other Builtins): Document strnlen.
13487
13488 2018-06-18 Maya Rashish <coypu@sdf.org>
13489
13490 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13491 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13492 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13493
13494 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13495 here to ...
13496 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13497
13498 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13499
13500 * tree.c (escaped_string::escape): Replace cast to char * by
13501 const_cast<char *> (unescaped).
13502
13503 2018-06-18 Nick Clifton <nickc@redhat.com>
13504
13505 PR 84195
13506 * tree.c (escaped_string): New class. Converts an unescaped
13507 string into its escaped equivalent.
13508 (warn_deprecated_use): Use the new class to convert the
13509 deprecation message, if present.
13510 (test_escaped_strings): New self test.
13511 (test_c_tests): Add test_escaped_strings.
13512 * doc/extend.texi (deprecated): Add a note that the
13513 deprecation message is affected by the -fmessage-length
13514 option, and that control characters will be escaped.
13515 (#pragma GCC error): Document this pragma.
13516 (#pragma GCC warning): Likewise.
13517 * doc/invoke.texi (-fmessage-length): Document this option's
13518 effect on the #warning and #error preprocessor directives and
13519 the deprecated attribute.
13520
13521 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13522
13523 * tree.c (decl_value_expr_lookup): Revert latest change.
13524 (decl_value_expr_insert): Likewise.
13525
13526 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13527
13528 * gimplify.c (nonlocal_vlas): Delete.
13529 (nonlocal_vla_vars): Likewise.
13530 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13531 referenced VLAs.
13532 (gimplify_body): Do not create and destroy nonlocal_vlas.
13533 * tree-nested.c: Include diagnostic.h.
13534 (use_pointer_in_frame): Tweak.
13535 (lookup_field_for_decl): Add assertion and declare the transformation.
13536 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13537 internal error when the reference is in a wrong context. Do not
13538 create a debug decl by default.
13539 (note_nonlocal_block_vlas): Delete.
13540 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13541 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13542 create a debug decl by default.
13543 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13544 call is in a wrong context.
13545 (fixup_vla_decls): New function.
13546 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13547 debug variables were created.
13548 * tree.c (decl_value_expr_lookup): Add checking assertion.
13549 (decl_value_expr_insert): Likewise.
13550
13551 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13552
13553 PR middle-end/82479
13554 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13555 * tree-scalar-evolution.c (interpret_expr): Likewise.
13556 (expression_expensive_p): Likewise.
13557 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13558 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13559 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13560 (ssa_defined_by_minus_one_stmt_p): New.
13561
13562 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13563
13564 PR middle-end/64946
13565 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13566 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13567 * dojump.c (do_jump): Likewise.
13568 * expr.c (expand_expr_real_2): Check operand type's sign.
13569 * fold-const.c (const_unop): Handle ABSU_EXPR.
13570 (fold_abs_const): Likewise.
13571 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13572 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13573 (strip_sign_op_1): Likesise.
13574 * match.pd: Add new pattern to generate ABSU_EXPR.
13575 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13576 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13577 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13578 * tree-inline.c (estimate_operator_cost): Likewise.
13579 * tree-pretty-print.c (dump_generic_node): Likewise.
13580 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13581 * tree.def (ABSU_EXPR): New.
13582
13583 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13584
13585 PR middle-end/86095
13586 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13587 documented as preserved for backward compatibility only.
13588 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13589
13590 PR rtl-optimization/86108
13591 * bb-reorder.c (create_forwarder_block): Renamed to ...
13592 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13593 jump from new landing pad to the second part.
13594 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13595 Adjust callers.
13596
13597 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13598
13599 PR middle-end/85878
13600 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13601 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13602 Only call store_expr for halves if the mode is the same.
13603
13604 PR middle-end/86123
13605 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13606 Fix up comment formatting.
13607
13608 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13609
13610 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13611 (typed_splay_tree::closure,
13612 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13613 (typed_splay_tree::typed_splay_tree,
13614 typed_splay_tree::operator =): Declared private.
13615 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13616 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13617 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13618 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13619 typed_splay_tree::splay_tree_splay,
13620 typed_splay_tree::splay_tree_foreach_helper,
13621 typed_splay_tree::splay_tree_insert,
13622 typed_splay_tree::splay_tree_remove,
13623 typed_splay_tree::splay_tree_lookup,
13624 typed_splay_tree::splay_tree_predecessor,
13625 typed_splay_tree::splay_tree_successor,
13626 typed_splay_tree::splay_tree_min,
13627 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13628 (typed_splay_tree::root, typed_splay_tree::comp,
13629 typed_splay_tree::delete_key,
13630 typed_splay_tree::delete_value): New data members.
13631 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13632 typed_splay_tree::remove.
13633
13634 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13635
13636 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13637 -mginv and -mno-ginv to the assembler.
13638 * config/mips/mips.opt (-mcrc): New option.
13639 (-mginv): Likewise.
13640 * doc/invoke.text (-mcrc): Document.
13641 (-mginv): Likewise.
13642
13643 2018-06-15 Nick Clifton <nickc@redhat.com>
13644
13645 PR 84195
13646 * tree.c (escaped_string): New class. Converts an unescaped
13647 string into its escaped equivalent.
13648 (warn_deprecated_use): Use the new class to convert the
13649 deprecation message, if present.
13650 (test_escaped_strings): New self test.
13651 (test_c_tests): Add test_escaped_strings.
13652 * doc/extend.texi (deprecated): Add a note that the
13653 deprecation message is affected by the -fmessage-length
13654 option, and that control characters will be escaped.
13655 (#pragma GCC error): Document this pragma.
13656 (#pragma GCC warning): Likewise.
13657 * doc/invoke.texi (-fmessage-length): Document this option's
13658 effect on the #warning and #error preprocessor directives and
13659 the deprecated attribute.
13660
13661 2018-06-15 Richard Biener <rguenther@suse.de>
13662
13663 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13664 here, also noting vector size used.
13665 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13666 size used in MSG_OPTIMIZED_LOCATIONS dump.
13667 (pass_slp_vectorize::execute): Adjust.
13668
13669 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13670
13671 PR target/85968
13672 * config/arc/arc.c (arc_return_address_register): Fix
13673 if-condition.
13674
13675 2018-06-15 Richard Biener <rguenther@suse.de>
13676
13677 PR middle-end/86159
13678 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13679 leave useless conversion stripping to force_gimple_operand_gsi.
13680 (gimplify_build2): Likewise.
13681 (gimplify_build1): Likewise.
13682
13683 2018-06-15 Richard Biener <rguenther@suse.de>
13684
13685 PR middle-end/86076
13686 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13687 before adjusting their block.
13688
13689 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13690
13691 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13692 multilibs for *-*-rtems*.
13693 * config/riscv/t-rtems: New file.
13694
13695 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13696
13697 PR middle-end/86122
13698 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13699 unsigned_type_for returns NULL.
13700
13701 PR target/85945
13702 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13703 subregs of multi-word pseudos unless the float mode has word size.
13704
13705 2018-06-14 Richard Biener <rguenther@suse.de>
13706
13707 PR middle-end/86139
13708 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13709 duplicate and harmful type_hash_canon.
13710 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13711
13712 2018-06-14 Richard Biener <rguenther@suse.de>
13713
13714 PR ipa/86124
13715 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13716 NULL cgraph_node.
13717
13718 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13719
13720 * config/rtems.h (STDINT_LONG32): Define.
13721
13722 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13723 Prachi Godbole <prachi.godbole@imgtec.com>
13724
13725 * config/mips/mips-cpus.def: Define P6600.
13726 * config/mips/mips-tables.opt: Regenerate.
13727 * config/mips/mips.c (mips_ucbranch_type): New enum.
13728 (mips_rtx_cost_data): Add support for P6600.
13729 (mips_issue_rate): Likewise.
13730 (mips_multipass_dfa_lookahead): Likewise.
13731 (mips_avoid_hazard): Likewise.
13732 (mips_reorg_process_insns): Likewise.
13733 (mips_classify_branch_p6600): New function.
13734 * config/mips/mips.h (TUNE_P6600): New define.
13735 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13736 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13737 * config/mips/mips.md: Include p6600.md.
13738 (processor): Add p6600.
13739 * config/mips/p6600.md: New file.
13740 * doc/invoke.texi: Add p6600 to supported architectures.
13741
13742 2018-06-13 Martin Sebor <msebor@redhat.com>
13743
13744 PR tree-optimization/86114
13745 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13746 of integer types.
13747 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13748
13749 2018-06-13 Richard Biener <rguenther@suse.de>
13750
13751 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13752 Properly set vector type of the intermediate stmt.
13753 * tree-vect-stmts.c (vectorizable_operation): The destination
13754 var always has vectype_out type.
13755
13756 2018-06-13 Jeff Law <law@redhat.com>
13757
13758 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13759 integer 0 for argument to print_rtl_with_bb.
13760 (rl78_reorg): Likewise.
13761
13762 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13763
13764 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13765 from rtx to rtx_insn *.
13766 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13767 "label".
13768 (add_sched_insns_for_speculation): Likewise for local "target",
13769 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13770 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13771 from rtx_insn ** to rtx_code_label **.
13772 (reorg_emit_nops): Likewise.
13773 (c6x_reorg): Likewise for local "call_labels".
13774 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13775 rtx to rtx_insn *.
13776 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13777 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13778 the loops over LABEL_REFS.
13779 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13780 braf_label.
13781 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13782 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13783 (split_branches): Strengthen local "olabel" from rtx to
13784 rtx_insn *, adding a safe_as_a cast.
13785 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13786 to "rtx_insn *".
13787 (add_insn_after): Likewise for first two params.
13788 (add_insn_before): Likewise.
13789 (remove_insn): Likewise for param.
13790 (emit_pattern_before_noloc): Likewise for second and third params.
13791 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13792 (emit_call_insn_before_noloc): Likewise.
13793 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13794 to "rtx_insn *".
13795 (emit_barrier_before): Likewise.
13796 (emit_label_before): Strengthen "label" param from "rtx" to
13797 "rtx_code_label *". Strengthen "before" param from "rtx" to
13798 "rtx_insn *".
13799 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13800 "rtx_insn *".
13801 (emit_pattern_after_noloc): Likewise.
13802 (emit_insn_after_noloc): Likewise.
13803 (emit_jump_insn_after_noloc): Likewise.
13804 (emit_call_insn_after_noloc): Likewise.
13805 (emit_debug_insn_after_noloc): Likewise.
13806 (emit_barrier_after): Likewise.
13807 (emit_label_after): Likewise for both params.
13808 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13809 "loc" param from "int" to "location_t".
13810 (emit_insn_after_setloc): Likewise.
13811 (emit_jump_insn_after_setloc): Likewise.
13812 (emit_call_insn_after_setloc): Likewise.
13813 (emit_debug_insn_after_setloc): Likewise.
13814 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13815 "loc" param from "int" to "location_t".
13816 (emit_pattern_before): Convert NULL_RTX to NULL.
13817 (emit_insn_before_setloc): Convert "loc" param from "int" to
13818 "location_t".
13819 (emit_jump_insn_before_setloc): Likewise.
13820 (emit_call_insn_before_setloc): Likewise.
13821 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13822 rtx_insn *. Convert "loc" param from "int" to "location_t".
13823 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13824 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13825 Convert 3rd param from "int" to "location_t".
13826 (emit_barrier_before, emit_barrier_after, next_real_insn):
13827 Strengthen param from rtx to rtx_insn *.
13828 (emit_label_before): Strengthen 1st param from "rtx" to
13829 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13830 "rtx_insn *".
13831 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13832 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13833 Strengthen 2nd param from "rtx" to "rtx_insn *".
13834 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13835 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13836 Likewise. Convert 3rd param from "int" to "location_t".
13837 (emit_label_after): Strengthen 1st param from "rtx" to
13838 "rtx_code_label *".
13839 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13840 "rtx_insn *".
13841 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13842 from "rtx" to "rtx_insn *".
13843
13844 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13845
13846 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13847 bodies streamed in with -Q.
13848 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13849 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13850 * gimple-streamer-out.c: Include gimple-pretty-print.h
13851 (output_bb): Dump stmts streamed.
13852 * lto-section-out.c: Include print-tree.h
13853 (lto_begin_section): Dump sections created.
13854 (lto_output_decl_index): Dump decl encoded.
13855 * lto-streamer-out.c: Include print-tree.h
13856 (create_output_block): Dump output block created.
13857 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13858 (output_function): Dump function output.
13859 (output_constructor): Dump constructor streamed.
13860 (write_global_stream): Output indexes encoded.
13861 (produce_asm_for_decls): Dump streams encoded.
13862 * lto-streamer.c (streamer_dump_file): New global var.
13863 * lto-streamer.h (streamer_dump_file): Declare.
13864 * passes.c (ipa_write_summaries): Initialize streamer dump.
13865 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13866 in.
13867
13868 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13869
13870 PR target/86048
13871 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13872 offsets for register save directives. Emit a second batch of save
13873 directives, if need be, when the function accesses prior frames.
13874
13875 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13876
13877 * config/arc/fpu.md (fmasf4): Force operand to register.
13878 (fnmasf4): Likewise.
13879
13880 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13881
13882 * config/arc/arc-protos.h (arc_pad_return): Remove.
13883 * config/arc/arc.c (machine_function): Remove force_short_suffix
13884 and size_reason.
13885 (arc_print_operand): Adjust printing of '&'.
13886 (arc_verify_short): Remove conditional printing of short suffix.
13887 (arc_final_prescan_insn): Remove reference to size_reason.
13888 (pad_return): New function.
13889 (arc_reorg): Call pad_return.
13890 (arc_pad_return): Remove.
13891 (arc_init_machine_status): Remove reference to force_short_suffix.
13892 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13893 (attr length): When attribute iscompact is true force to 2
13894 regardless; in the case of maybe check if we want to force the
13895 instruction to have 4 bytes length.
13896 (nopv): Change it to generate 4 byte long nop as well.
13897 (blockage): New pattern.
13898 (simple_return): Remove call to arc_pad_return.
13899 (p_return_i): Likewise.
13900
13901 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13902
13903 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13904
13905 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13906
13907 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13908 ARC cores.
13909
13910 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13911
13912 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13913 for ARC700 and ARCv2.
13914
13915 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13916
13917 PR target/86076
13918 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13919 operands[2] instead of operands[1].
13920
13921
13922 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13923
13924 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13925 case, check whether the outer register overlaps an unallocatable
13926 register, not just whether it fits the required class.
13927
13928 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13929
13930 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13931 are poly_ints.
13932 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13933 (memrefs_conflict_p): Likewise.
13934 (init_alias_analysis): Likewise.
13935 * cfgexpand.c (expand_debug_expr): Likewise.
13936 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13937 * cse.c (fold_rtx): Likewise.
13938 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13939 * expr.c (emit_block_move_hints): Likewise.
13940 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13941 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13942 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13943 (emit_group_store): Likewise.
13944 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13945 to read the PRE/POST_MODIFY increment.
13946 * calls.c (store_one_arg): Use strip_offset.
13947 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13948 poly_int_rtx_p.
13949 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13950 by a VEC_SELECT.
13951 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13952 (simplify_binary_operation_1): Extend CONST_INT handling to
13953 poly_int_rtx_p.
13954 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13955 than a HOST_WIDE_INT.
13956 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13957 poly_int64.
13958 (adjust_mems, add_stores): Update accodingly.
13959 (vt_canonicalize_addr): Track polynomial offsets.
13960 (emit_note_insn_var_location): Likewise.
13961 (vt_add_function_parameter): Likewise.
13962 (vt_initialize): Likewise.
13963
13964 2018-06-12 Jeff Law <law@redhat.com>
13965
13966 * config.gcc (alpha*-*-freebsd*): Remove.
13967 * config/alpha/freebsd.h: Remove.
13968
13969 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13970
13971 PR other/69968
13972 * spellcheck-tree.c (levenshtein_distance): Rename to...
13973 (get_edit_distance): ...this, and update for underlying renaming.
13974 * spellcheck-tree.h (levenshtein_distance): Rename to...
13975 (get_edit_distance): ...this.
13976 * spellcheck.c (levenshtein_distance): Rename to...
13977 (get_edit_distance): ...this. Convert from Levenshtein distance
13978 to Damerau-Levenshtein distance by supporting transpositions of
13979 adjacent characters. Rename "v1" to "v_next" and "v0" to
13980 "v_one_ago".
13981 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13982 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13983 update for underlying renaming.
13984 (selftest::levenshtein_distance_unit_test): Rename to...
13985 (selftest::test_get_edit_distance_unit): ...this, and update for
13986 underlying renaming.
13987 (selftest::test_find_closest_string): Add example from PR 69968
13988 where transposition helps
13989 (selftest::test_metric_conditions): Update for renaming.
13990 (selftest::test_metric_conditions): Likewise.
13991 (selftest::spellcheck_c_tests): Likewise.
13992 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13993 (get_edit_distance): ...this.
13994 (best_match::consider): Update for renaming.
13995
13996 2018-06-12 Martin Sebor <msebor@redhat.com>
13997
13998 PR tree-optimization/85259
13999 * builtins.c (compute_objsize): Handle constant offsets.
14000 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
14001 true iff a warning has been issued.
14002 * gimple.h (gimple_nonartificial_location): New function.
14003 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
14004 gimple_nonartificial_location and handle -Wno-system-headers.
14005 (handle_builtin_stxncpy): Same.
14006
14007 2018-06-12 Martin Sebor <msebor@redhat.com>
14008
14009 PR c/85931
14010 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
14011
14012 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
14013
14014 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14015 BUILTIN_VEC_XST entries for pointer to double and long long.
14016
14017 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
14018
14019 PR target/85990
14020 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14021 Update comments.
14022 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14023 Likewise.
14024
14025 2018-06-12 Martin Liska <mliska@suse.cz>
14026
14027 * doc/options.texi: Document IntegerRange.
14028
14029 2018-06-12 Martin Liska <mliska@suse.cz>
14030
14031 * config/i386/i386.opt: Make MPX-related options as Deprecated.
14032 * opt-functions.awk: Handle Deprecated flag.
14033 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
14034 and report error.
14035 (read_cmdline_option): Report warning for a deprecated option.
14036 * opts.h (struct cl_option): Add new field cl_deprecated.
14037 (CL_ERR_DEPRECATED): New.
14038
14039 2018-06-12 Martin Liska <mliska@suse.cz>
14040
14041 * doc/options.texi: Document Deprecated option flag.
14042
14043 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14044
14045 * config/arc/arc-arch.h (arc_extras): New enum.
14046 (arc_cpu_t):Add field extra.
14047 (arc_cpu_types): Consider the extras.
14048 * config/arc/arc-cpus.def: Add extras info.
14049 * config/arc/arc-opts.h (processor_type): Consider extra field.
14050 * config/arc/arc.c (arc_override_options): Handle extra field.
14051
14052 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14053
14054 * config/arc/arc-arch.h: Update ARC_OPTX macro.
14055 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
14056 field.
14057 * config/arc/arc.c (arc_init): Update pic warning.
14058 (irq_range): Update irq range parsing warnings.
14059 (arc_override_options): Update various warning messages.
14060 (arc_handle_aux_attribute): Likewise.
14061
14062 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
14063
14064 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
14065
14066 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14067
14068 * doc/sourcebuild.texi: Document usage of line number 0 in verify
14069 compiler messages directives.
14070
14071 2018-06-12 Matthew Fortune <mfortune@gmail.com>
14072
14073 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
14074 * config/mips/mips-tables.opt: Regenerate.
14075 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
14076 mips64r6.
14077 * doc/invoke.texi: Document -march=i6500.
14078
14079 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
14080
14081 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
14082 (i6400_gpmul): Add cpu_unit.
14083 (i6400_gpdiv): Likewise.
14084 (i6400_msa_add_d): Update reservations.
14085 (i6400_msa_int_add) Likewise.
14086 (i6400_msa_short_logic3) Likewise.
14087 (i6400_msa_short_logic2) Likewise.
14088 (i6400_msa_short_logic) Likewise.
14089 (i6400_msa_move) Likewise.
14090 (i6400_msa_cmp) Likewise.
14091 (i6400_msa_short_float2) Likewise.
14092 (i6400_msa_div_d) Likewise.
14093 (i6400_msa_long_logic1) Likewise.
14094 (i6400_msa_long_logic2) Likewise.
14095 (i6400_msa_mult) Likewise.
14096 (i6400_msa_long_float2) Likewise.
14097 (i6400_msa_long_float4) Likewise.
14098 (i6400_msa_long_float5) Likewise.
14099 (i6400_msa_long_float8) Likewise.
14100 (i6400_fpu_fadd): Include frint type.
14101 (i6400_fpu_store): New define_insn_reservation.
14102 (i6400_fpu_load): Likewise.
14103 (i6400_fpu_move): Likewise.
14104 (i6400_fpu_fcmp): Likewise.
14105 (i6400_fpu_fmadd): Likewise.
14106 (i6400_int_mult): Include imul3nc type and update reservation.
14107 (i6400_int_div): Include idiv3 type and update reservation.
14108 (i6400_int_load): Update to check type not move_type.
14109 (i6400_int_store): Likewise.
14110 (i6400_int_prefetch): Set zero latency.
14111
14112 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
14113
14114 * gcc.c: Document new %@{...} sequence.
14115 (LINK_COMMAND_SPEC): Use it for the -L switches.
14116 (cpp_unique_options): Use it for the -I switches.
14117 (at_file_argbuf): New global variable.
14118 (in_at_file): Likewise.
14119 (alloc_args): Create at_file_argbuf.
14120 (clear_args): Truncate at_file_argbuf.
14121 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
14122 (open_at_file): New function.
14123 (close_at_file): Likewise.
14124 (create_at_file): Delete.
14125 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
14126 <'o'>: Likewise.
14127 <'@'>: New case.
14128 (validate_switches_from_spec): Deal with %@{...} sequence.
14129 (validate_switches): Likewise.
14130 (driver::finalize): Call clear_args.
14131
14132 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
14133
14134 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
14135
14136 2018-06-11 Martin Sebor <msebor@redhat.com>
14137
14138 * doc/invoke.texi (-Wall): List -Wc++17-compat.
14139 (Wno-class-memaccess): Add @opindex.
14140 (Wno-templates, Wno-multiple-inheritance): Same.
14141 (Wno-virtual-inheritance, Wno-namespaces): Same.
14142 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
14143 (Wno-format-overflow, Wno-format-truncation): Same.
14144 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
14145 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
14146 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
14147 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
14148 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
14149 (Wno-misspelled-isr): Same.
14150
14151 2018-06-11 Martin Sebor <msebor@redhat.com>
14152
14153 * PR tree-optimization/86083
14154 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
14155
14156 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
14157
14158 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
14159
14160 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
14161
14162 PR target/85755
14163 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
14164 on the correct operand.
14165 (*movdi_internal64): Ditto.
14166
14167 2018-06-11 Martin Liska <mliska@suse.cz>
14168
14169 PR tree-optimization/86089
14170 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
14171
14172 2018-06-11 Julia Koval <julia.koval@intel.com>
14173
14174 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
14175 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
14176 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
14177
14178 2018-06-11 Olivier Hainque <hainque@adacore.com>
14179
14180 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
14181 for Ada with strict dwarf2.
14182
14183 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
14184
14185 PR target/85755
14186 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
14187 addresses.
14188
14189 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
14190
14191 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
14192
14193 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
14194
14195 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
14196 TARGET_ELF.
14197
14198 2018-06-08 Martin Liska <mliska@suse.cz>
14199
14200 * tree-cfg.h (debug_function): Fix argument type to match
14201 implementation.
14202
14203 2018-06-08 Martin Liska <mliska@suse.cz>
14204
14205 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
14206 Remove usage of MPX-related (and removed) fields.
14207 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
14208
14209 2018-06-08 David Malcolm <dmalcolm@redhat.com>
14210
14211 * cfg.c (debug): Use TDF_NONE rather than 0.
14212 * cfghooks.c (debug): Likewise.
14213 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
14214 (struct dump_option_value_info): Convert to...
14215 (struct kv_pair): ...this template type.
14216 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
14217 rather than 0.
14218 (optinfo_verbosity_options): Likewise.
14219 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
14220 OPTGROUP_NONE.
14221 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
14222 than int for "optgroup_flags" param.
14223 (dump_generic_expr_loc): Use dump_flags_t rather than int for
14224 "dump_kind" param.
14225 (dump_dec): Likewise.
14226 (dump_finish): Use TDF_NONE rather than 0.
14227 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
14228 rather than int for "optgroup_flags" param. Use TDF_NONE rather
14229 than 0. Update for change to option_ptr.
14230 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
14231 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
14232 0. Update for changes to optinfo_verbosity_options and
14233 optgroup_options.
14234 (opt_info_switch_p): Convert optgroup_flags from int to
14235 optgroup_flags_t.
14236 (dump_basic_block): Use dump_flags_t rather than int
14237 for "dump_kind" param.
14238 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
14239 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
14240 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
14241 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14242 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14243 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14244 TDF_NONE): Convert from macros to...
14245 (enum dump_flag): ...this new enum.
14246 (dump_flags_t): Update to use enum.
14247 (operator|, operator&, operator~, operator|=, operator&=):
14248 Implement for dump_flags_t.
14249 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14250 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14251 Convert from macros to...
14252 (enum optgroup_flag): ...this new enum.
14253 (optgroup_flags_t): New typedef.
14254 (operator|, operator|=): Implement for optgroup_flags_t.
14255 (struct dump_file_info): Convert field "alt_flags" to
14256 dump_flags_t. Convert field "optgroup_flags" to
14257 optgroup_flags_t.
14258 (dump_basic_block): Use dump_flags_t rather than int for param.
14259 (dump_generic_expr_loc): Likewise.
14260 (dump_dec): Likewise.
14261 (dump_register): Convert param "optgroup_flags" to
14262 optgroup_flags_t.
14263 (opt_info_enable_passes): Likewise.
14264 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14265 than 0.
14266 * gimple-pretty-print.c (debug): Likewise.
14267 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14268 (merged_store_group::apply_stores): Likewise.
14269 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14270 * gimple.c (verify_gimple_pp): Likewise.
14271 * graphite-poly.c (print_pbb_body): Likewise.
14272 * passes.c (pass_manager::register_one_dump_file): Convert
14273 local "optgroup_flags" to optgroup_flags_t.
14274 * print-tree.c (print_node): Use TDF_NONE rather than 0.
14275 (debug): Likewise.
14276 (debug_body): Likewise.
14277 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14278 to optgroup_flags_t.
14279 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14280 than 0.
14281 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14282 (convert_mult_to_fma): Likewise.
14283 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14284 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14285 * tree-vect-data-refs.c (dump_lower_bound): Convert param
14286 "dump_kind" to dump_flags_t.
14287
14288 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14289
14290 * config/rs6000/rs6000.c (min, max): Delete.
14291
14292 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14293
14294 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14295 -mabi=spe and -mabi=no-spe.
14296
14297 2018-06-08 Martin Liska <mliska@suse.cz>
14298
14299 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14300 where we expect an existing summary.
14301
14302 2018-06-08 Martin Liska <mliska@suse.cz>
14303
14304 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14305 * ipa-inline.h (estimate_edge_growth): Likewise.
14306
14307 2018-06-08 Martin Liska <mliska@suse.cz>
14308
14309 * cgraph.c (function_version_hasher::hash): Use
14310 cgraph_node::get_uid ().
14311 (function_version_hasher::equal):
14312 * cgraph.h (cgraph_node::get_uid): New method.
14313 * ipa-inline.c (update_caller_keys): Use
14314 cgraph_node::get_uid ().
14315 (update_callee_keys): Likewise.
14316 * ipa-utils.c (searchc): Likewise.
14317 (ipa_reduced_postorder): Likewise.
14318 * lto-cgraph.c (input_node): Likewise.
14319 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14320 * symbol-summary.h (symtab_insertion): Likewise.
14321 (symtab_removal): Likewise.
14322 (symtab_duplication): Likewise.
14323 * tree-pretty-print.c (dump_function_header): Likewise.
14324 * tree-sra.c (convert_callers_for_node): Likewise.
14325
14326 2018-06-08 Martin Liska <mliska@suse.cz>
14327
14328 * cgraph.c (symbol_table::create_edge): Always assign a new
14329 unique number.
14330 (symbol_table::free_edge): Do not recycle numbers.
14331 * cgraph.h (cgraph_edge::get): New method.
14332 * symbol-summary.h (symtab_removal): Use it.
14333 (symtab_duplication): Likewise.
14334 (call_summary::hashable_uid): Remove.
14335
14336 2018-06-08 Martin Liska <mliska@suse.cz>
14337
14338 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14339 (initialize_growth_caches): Remove.
14340 (free_growth_caches): Likewise.
14341 (do_estimate_edge_time): Use edge_growth_cache.
14342 (do_estimate_edge_size): Likewise.
14343 (do_estimate_edge_hints): Likewise.
14344 * ipa-inline.c (reset_edge_caches): Likewise.
14345 (recursive_inlining): Likewise.
14346 (inline_small_functions): Likewise.
14347 * ipa-inline.h (initialize_growth_caches): Remove.
14348 (estimate_edge_size): Likewise.
14349 (estimate_edge_time): Likewise.
14350 (estimate_edge_hints): Likewise.
14351 (reset_edge_growth_cache): Likewise.
14352 * symbol-summary.h (call_summary::remove): New method.
14353
14354 2018-06-08 Martin Liska <mliska@suse.cz>
14355
14356 * ipa-cp.c (class edge_clone_summary): New summary.
14357 (grow_edge_clone_vectors): Remove.
14358 (ipcp_edge_duplication_hook): Remove.
14359 (class edge_clone_summary_t): New call_summary class.
14360 (ipcp_edge_removal_hook): Remove.
14361 (edge_clone_summary_t::duplicate): New function.
14362 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14363 (create_specialized_node): Likewise.
14364 (ipcp_driver): Initialize edge_clone_summaries and do not
14365 register hooks.
14366
14367 2018-06-08 Martin Liska <mliska@suse.cz>
14368
14369 * symbol-summary.h (get): New function.
14370 (call_summary::m_initialize_when_cloning): New class member.
14371
14372 2018-06-08 Martin Liska <mliska@suse.cz>
14373
14374 * cgraph.c (cgraph_node::remove): Do not recycle uid.
14375 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14376 (symbol_table::allocate_cgraph_symbol): Do not set uid.
14377 * passes.c (uid_hash_t): Record removed_nodes by their uids.
14378 (remove_cgraph_node_from_order): Use the removed_nodes set.
14379 (do_per_function_toporder): Likwise.
14380 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14381 instead of summary_uid.
14382 (symtab_removal): Likewise.
14383 (symtab_duplication): Likewise.
14384
14385 2018-06-08 Martin Liska <mliska@suse.cz>
14386
14387 * ipa-cp.c (ipcp_store_bits_results): Use
14388 ipcp_transformation_sum.
14389 (ipcp_store_vr_results): Likewise.
14390 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14391 to ...
14392 (ipcp_transformation_initialize): ... this.
14393 (ipa_set_node_agg_value_chain):
14394 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14395 (write_ipcp_transformation_info): Likewise.
14396 (read_ipcp_transformation_info): Likewise.
14397 (ipcp_update_bits): Likewise.
14398 (ipcp_update_vr): Likewise.
14399 (ipcp_transform_function): Likewise.
14400 * ipa-prop.h: Rename ipcp_transformation_summary to
14401 ipcp_transformation.
14402 (class ipcp_transformation_t): New function summary.
14403 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14404 (ipa_get_agg_replacements_for_node): Likewise.
14405
14406 2018-06-08 Martin Liska <mliska@suse.cz>
14407
14408 * ipa-pure-const.c (struct funct_state_d): Do it class instead
14409 of struct.
14410 (class funct_state_summary_t): New function_summary class.
14411 (has_function_state): Remove.
14412 (get_function_state): Likewise.
14413 (set_function_state): Likewise.
14414 (add_new_function): Likewise.
14415 (funct_state_summary_t::insert): New function.
14416 (duplicate_node_data): Remove.
14417 (remove_node_data): Remove.
14418 (funct_state_summary_t::duplicate): New function.
14419 (register_hooks): Create new funct_state_summaries.
14420 (pure_const_generate_summary): Use it.
14421 (pure_const_write_summary): Likewise.
14422 (pure_const_read_summary): Likewise.
14423 (propagate_pure_const): Likewise.
14424 (propagate_nothrow): Likewise.
14425 (dump_malloc_lattice): Likewise.
14426 (propagate_malloc): Likewise.
14427 (execute): Do not register hooks, just remove summary
14428 instead.
14429 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14430 constructor.
14431
14432 2018-06-08 Martin Liska <mliska@suse.cz>
14433
14434 * ipa-reference.c (remove_node_data): Remove.
14435 (duplicate_node_data): Likewise.
14436 (class ipa_ref_var_info_summary_t): New class.
14437 (class ipa_ref_opt_summary_t): Likewise.
14438 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14439 (get_reference_optimization_summary): Use
14440 ipa_ref_opt_sum_summaries.
14441 (set_reference_vars_info): Remove.
14442 (set_reference_optimization_summary): Likewise.
14443 (ipa_init): Create summaries.
14444 (init_function_info): Use function summary.
14445 (ipa_ref_opt_summary_t::duplicate): New function.
14446 (ipa_ref_opt_summary_t::remove): New function.
14447 (get_read_write_all_from_node): Fix GNU coding style.
14448 (propagate): Use function summary.
14449 (write_node_summary_p): Fix GNU coding style.
14450 (stream_out_bitmap): Likewise.
14451 (ipa_reference_read_optimization_summary): Use function summary.
14452 (ipa_reference_c_finalize): Do not release hooks.
14453
14454 2018-06-08 Martin Liska <mliska@suse.cz>
14455
14456 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14457 (analyze_function_body): Extract multiple calls of get_create.
14458 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14459 * ipa-inline.c (recursive_inlining): Use ::get method.
14460 * ipa-inline.h (estimate_edge_growth): Likewise.
14461
14462 2018-06-08 Martin Liska <mliska@suse.cz>
14463
14464 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14465 HSA_INVALID.
14466 (hsa_function_summary::hsa_function_summary): Use the new enum
14467 value.
14468 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14469 * hsa-gen.c (hsa_get_host_function): Likewise.
14470 (get_brig_function_name): Likewise.
14471 * ipa-hsa.c (process_hsa_functions): Likewise.
14472 (ipa_hsa_write_summary): Likewise.
14473 * symbol-summary.h (symtab_duplication): Use ::get function/
14474 (get): New function.
14475
14476 2018-06-08 Martin Liska <mliska@suse.cz>
14477
14478 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14479 of get.
14480 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14481 (hsa_register_kernel): Likewise.
14482 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14483 * hsa-gen.c (hsa_get_host_function): Likewise.
14484 (get_brig_function_name): Likewise.
14485 (generate_hsa): Likewise.
14486 (pass_gen_hsail::execute): Likewise.
14487 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14488 (devirtualization_time_bonus): Likewise.
14489 (ipcp_propagate_stage): Likewise.
14490 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14491 (edge_set_predicate): Likewise.
14492 (evaluate_conditions_for_known_args): Likewise.
14493 (evaluate_properties_for_edge): Likewise.
14494 (ipa_fn_summary::reset): Likewise.
14495 (ipa_fn_summary_t::duplicate): Likewise.
14496 (dump_ipa_call_summary): Likewise.
14497 (ipa_dump_fn_summary): Likewise.
14498 (analyze_function_body): Likewise.
14499 (compute_fn_summary): Likewise.
14500 (estimate_edge_devirt_benefit): Likewise.
14501 (estimate_edge_size_and_time): Likewise.
14502 (estimate_calls_size_and_time): Likewise.
14503 (estimate_node_size_and_time): Likewise.
14504 (inline_update_callee_summaries): Likewise.
14505 (remap_edge_change_prob): Likewise.
14506 (remap_edge_summaries): Likewise.
14507 (ipa_merge_fn_summary_after_inlining): Likewise.
14508 (ipa_update_overall_fn_summary): Likewise.
14509 (read_ipa_call_summary): Likewise.
14510 (inline_read_section): Likewise.
14511 (write_ipa_call_summary): Likewise.
14512 (ipa_fn_summary_write): Likewise.
14513 (ipa_free_fn_summary): Likewise.
14514 * ipa-hsa.c (process_hsa_functions): Likewise.
14515 (ipa_hsa_write_summary): Likewise.
14516 (ipa_hsa_read_section): Likewise.
14517 * ipa-icf.c (sem_function::merge): Likewise.
14518 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14519 (do_estimate_edge_time): Likewise.
14520 (estimate_size_after_inlining): Likewise.
14521 (estimate_growth): Likewise.
14522 (growth_likely_positive): Likewise.
14523 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14524 (inline_call): Likewise.
14525 * ipa-inline.c (caller_growth_limits): Likewise.
14526 (can_inline_edge_p): Likewise.
14527 (can_inline_edge_by_limits_p): Likewise.
14528 (compute_uninlined_call_time): Likewise.
14529 (compute_inlined_call_time): Likewise.
14530 (want_inline_small_function_p): Likewise.
14531 (edge_badness): Likewise.
14532 (update_caller_keys): Likewise.
14533 (update_callee_keys): Likewise.
14534 (recursive_inlining): Likewise.
14535 (inline_small_functions): Likewise.
14536 (inline_to_all_callers_1): Likewise.
14537 (dump_overall_stats): Likewise.
14538 (early_inline_small_functions): Likewise.
14539 (early_inliner): Likewise.
14540 * ipa-inline.h (estimate_edge_growth): Likewise.
14541 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14542 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14543 * ipa-prop.h (IPA_NODE_REF): Likewise.
14544 (IPA_EDGE_REF): Likewise.
14545 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14546 (propagate_malloc): Likewise.
14547 * ipa-split.c (execute_split_functions): Likewise.
14548 * symbol-summary.h: Rename get to get_create.
14549 (get): Likewise.
14550 (get_create): Likewise.
14551 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14552
14553 2018-06-08 Martin Liska <mliska@suse.cz>
14554
14555 * symbol-summary.h (release): Move definition out of class
14556 declaration.
14557 (symtab_removal): Likewise.
14558 (symtab_duplication): Likewise.
14559
14560 2018-06-08 Martin Liska <mliska@suse.cz>
14561
14562 * symbol-summary.h (function_summary): Move constructor
14563 implementation out of class declaration.
14564 (release): Likewise.
14565 (symtab_insertion): Likewise.
14566 (symtab_removal): Likewise.
14567 (symtab_duplication): Likewise.
14568 (get): Likewise.
14569
14570 2018-06-08 Martin Liska <mliska@suse.cz>
14571
14572 * Makefile.in: Remove support for MPX (macros, related functions,
14573 fields in cgraph_node, ...).
14574 * builtin-types.def (BT_BND): Likewise.
14575 (BT_FN_BND_CONST_PTR): Likewise.
14576 (BT_FN_CONST_PTR_BND): Likewise.
14577 (BT_FN_VOID_PTR_BND): Likewise.
14578 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14579 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14580 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14581 (expand_builtin_mempcpy_with_bounds): Likewise.
14582 (expand_builtin_memset_with_bounds): Likewise.
14583 (expand_builtin_memset_args): Likewise.
14584 (std_expand_builtin_va_start): Likewise.
14585 (expand_builtin): Likewise.
14586 (expand_builtin_with_bounds): Likewise.
14587 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14588 (DEF_LIB_BUILTIN_CHKP): Likewise.
14589 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14590 (DEF_CHKP_BUILTIN): Likewise.
14591 (BUILT_IN_MEMCPY): Likewise.
14592 (BUILT_IN_MEMMOVE): Likewise.
14593 (BUILT_IN_MEMPCPY): Likewise.
14594 (BUILT_IN_MEMSET): Likewise.
14595 (BUILT_IN_STPCPY): Likewise.
14596 (BUILT_IN_STRCAT): Likewise.
14597 (BUILT_IN_STRCHR): Likewise.
14598 (BUILT_IN_STRCPY): Likewise.
14599 (BUILT_IN_STRLEN): Likewise.
14600 (BUILT_IN_MEMCPY_CHK): Likewise.
14601 (BUILT_IN_MEMMOVE_CHK): Likewise.
14602 (BUILT_IN_MEMPCPY_CHK): Likewise.
14603 (BUILT_IN_MEMSET_CHK): Likewise.
14604 (BUILT_IN_STPCPY_CHK): Likewise.
14605 (BUILT_IN_STRCAT_CHK): Likewise.
14606 (BUILT_IN_STRCPY_CHK): Likewise.
14607 * calls.c (store_bounds): Likewise.
14608 (emit_call_1): Likewise.
14609 (special_function_p): Likewise.
14610 (maybe_warn_nonstring_arg): Likewise.
14611 (initialize_argument_information): Likewise.
14612 (finalize_must_preallocate): Likewise.
14613 (compute_argument_addresses): Likewise.
14614 (expand_call): Likewise.
14615 * cfgexpand.c (expand_call_stmt): Likewise.
14616 (expand_return): Likewise.
14617 (expand_gimple_stmt_1): Likewise.
14618 (pass_expand::execute): Likewise.
14619 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14620 (cgraph_node::remove): Likewise.
14621 (cgraph_node::dump): Likewise.
14622 (cgraph_node::verify_node): Likewise.
14623 * cgraph.h (chkp_function_instrumented_p): Likewise.
14624 (symtab_node::get_alias_target): Likewise.
14625 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14626 (cgraph_local_p): Likewise.
14627 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14628 (cgraph_edge::rebuild_references): Likewise.
14629 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14630 (walk_polymorphic_call_targets): Likewise.
14631 (cgraph_node::expand_thunk): Likewise.
14632 (symbol_table::output_weakrefs): Likewise.
14633 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14634 (ix86_handle_option): Likewise.
14635 * config/i386/constraints.md: Likewise.
14636 * config/i386/i386-builtin-types.def (BND): Likewise.
14637 (VOID): Likewise.
14638 (PVOID): Likewise.
14639 (ULONG): Likewise.
14640 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14641 (BDESC_FIRST): Likewise.
14642 (BDESC): Likewise.
14643 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14644 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14645 * config/i386/i386.c (enum reg_class): Likewise.
14646 (ix86_target_string): Likewise.
14647 (ix86_option_override_internal): Likewise.
14648 (ix86_conditional_register_usage): Likewise.
14649 (ix86_valid_target_attribute_inner_p): Likewise.
14650 (ix86_set_indirect_branch_type): Likewise.
14651 (ix86_set_current_function): Likewise.
14652 (ix86_function_arg_regno_p): Likewise.
14653 (init_cumulative_args): Likewise.
14654 (ix86_function_arg_advance): Likewise.
14655 (ix86_function_arg): Likewise.
14656 (ix86_pass_by_reference): Likewise.
14657 (ix86_function_value_regno_p): Likewise.
14658 (ix86_function_value_1): Likewise.
14659 (ix86_function_value_bounds): Likewise.
14660 (ix86_return_in_memory): Likewise.
14661 (ix86_setup_incoming_vararg_bounds): Likewise.
14662 (ix86_va_start): Likewise.
14663 (indirect_thunk_need_prefix): Likewise.
14664 (print_reg): Likewise.
14665 (ix86_print_operand): Likewise.
14666 (ix86_expand_call): Likewise.
14667 (ix86_output_function_return): Likewise.
14668 (reg_encoded_number): Likewise.
14669 (BDESC_VERIFYS): Likewise.
14670 (ix86_init_mpx_builtins): Likewise.
14671 (ix86_init_builtins): Likewise.
14672 (ix86_emit_cmove): Likewise.
14673 (ix86_emit_move_max): Likewise.
14674 (ix86_expand_builtin): Likewise.
14675 (ix86_builtin_mpx_function): Likewise.
14676 (ix86_get_arg_address_for_bt): Likewise.
14677 (ix86_load_bounds): Likewise.
14678 (ix86_store_bounds): Likewise.
14679 (ix86_load_returned_bounds): Likewise.
14680 (ix86_store_returned_bounds): Likewise.
14681 (ix86_class_likely_spilled_p): Likewise.
14682 (ix86_hard_regno_mode_ok): Likewise.
14683 (x86_order_regs_for_local_alloc): Likewise.
14684 (ix86_mitigate_rop): Likewise.
14685 (ix86_bnd_prefixed_insn_p): Likewise.
14686 (ix86_mpx_bound_mode): Likewise.
14687 (ix86_make_bounds_constant): Likewise.
14688 (ix86_initialize_bounds): Likewise.
14689 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14690 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14691 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14692 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14693 (TARGET_CHKP_BOUND_MODE): Likewise.
14694 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14695 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14696 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14697 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14698 * config/i386/i386.h (TARGET_MPX): Likewise.
14699 (TARGET_MPX_P): Likewise.
14700 (VALID_BND_REG_MODE): Likewise.
14701 (FIRST_BND_REG): Likewise.
14702 (LAST_BND_REG): Likewise.
14703 (enum reg_class): Likewise.
14704 (BND_REG_P): Likewise.
14705 (BND_REGNO_P): Likewise.
14706 (BNDmode): Likewise.
14707 (ADJUST_INSN_LENGTH): Likewise.
14708 * config/i386/i386.md: Likewise.
14709 * config/i386/i386.opt: Likewise.
14710 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14711 (defined): Likewise.
14712 (LINK_MPX): Likewise.
14713 (MPX_SPEC): Likewise.
14714 (LIBMPX_SPEC): Likewise.
14715 (LIBMPXWRAPPERS_SPEC): Likewise.
14716 (CHKP_SPEC): Likewise.
14717 * config/i386/predicates.md: Likewise.
14718 * dbxout.c (dbxout_type): Likewise.
14719 * doc/extend.texi: Likewise.
14720 * doc/invoke.texi: Likewise.
14721 * doc/md.texi: Likewise.
14722 * doc/tm.texi: Likewise.
14723 * doc/tm.texi.in: Likewise.
14724 * dwarf2out.c (is_base_type): Likewise.
14725 (gen_formal_types_die): Likewise.
14726 (gen_subprogram_die): Likewise.
14727 (gen_type_die_with_usage): Likewise.
14728 (gen_decl_die): Likewise.
14729 (dwarf2out_late_global_decl): Likewise.
14730 * expr.c (expand_assignment): Likewise.
14731 (emit_storent_insn): Likewise.
14732 (store_expr_with_bounds): Likewise.
14733 (store_expr): Likewise.
14734 (expand_expr_real_1): Likewise.
14735 * expr.h (store_expr_with_bounds): Likewise.
14736 * function.c (use_register_for_decl): Likewise.
14737 (struct bounds_parm_data): Likewise.
14738 (assign_parms_augmented_arg_list): Likewise.
14739 (assign_parm_find_entry_rtl): Likewise.
14740 (assign_parm_is_stack_parm): Likewise.
14741 (assign_parm_load_bounds): Likewise.
14742 (assign_bounds): Likewise.
14743 (assign_parms): Likewise.
14744 (expand_function_start): Likewise.
14745 * gcc.c (CHKP_SPEC): Likewise.
14746 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14747 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14748 (wrestrict_dom_walker::check_call): Likewise.
14749 * gimple.c (gimple_build_call_from_tree): Likewise.
14750 * gimple.h (enum gf_mask): Likewise.
14751 (gimple_call_with_bounds_p): Likewise.
14752 (gimple_call_set_with_bounds): Likewise.
14753 * gimplify.c (gimplify_init_constructor): Likewise.
14754 * ipa-cp.c (initialize_node_lattices): Likewise.
14755 (propagate_constants_across_call): Likewise.
14756 (find_more_scalar_values_for_callers_subset): Likewise.
14757 * ipa-hsa.c (process_hsa_functions): Likewise.
14758 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14759 * ipa-icf.c (sem_function::merge): Likewise.
14760 * ipa-inline.c (early_inliner): Likewise.
14761 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14762 (warn_function_cold): Likewise.
14763 (propagate_pure_const): Likewise.
14764 * ipa-ref.h (enum GTY): Likewise.
14765 * ipa-split.c (find_retbnd): Likewise.
14766 (consider_split): Likewise.
14767 (split_function): Likewise.
14768 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14769 * ipa.c (walk_polymorphic_call_targets): Likewise.
14770 (symbol_table::remove_unreachable_nodes): Likewise.
14771 (process_references): Likewise.
14772 (cgraph_build_static_cdtor_1): Likewise.
14773 * lto-cgraph.c (lto_output_node): Likewise.
14774 (output_refs): Likewise.
14775 (compute_ltrans_boundary): Likewise.
14776 (input_overwrite_node): Likewise.
14777 (input_node): Likewise.
14778 (input_cgraph_1): Likewise.
14779 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14780 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14781 (class pass_chkp_instrumentation_passes): Likewise.
14782 (make_pass_chkp_instrumentation_passes): Likewise.
14783 * passes.def: Likewise.
14784 * rtl.h (struct GTY): Likewise.
14785 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14786 * stor-layout.c (layout_type): Likewise.
14787 * symtab.c: Likewise.
14788 * target.def: Likewise.
14789 * targhooks.c (default_chkp_bound_type): Likewise.
14790 (default_chkp_bound_mode): Likewise.
14791 (default_builtin_chkp_function): Likewise.
14792 (default_chkp_function_value_bounds): Likewise.
14793 (default_chkp_make_bounds_constant): Likewise.
14794 (default_chkp_initialize_bounds): Likewise.
14795 * targhooks.h (default_chkp_bound_type): Likewise.
14796 (default_chkp_bound_mode): Likewise.
14797 (default_builtin_chkp_function): Likewise.
14798 (default_chkp_function_value_bounds): Likewise.
14799 (default_chkp_make_bounds_constant): Likewise.
14800 (default_chkp_initialize_bounds): Likewise.
14801 * toplev.c (compile_file): Likewise.
14802 (process_options): Likewise.
14803 * tree-core.h (DEF_BUILTIN): Likewise.
14804 (DEF_BUILTIN_CHKP): Likewise.
14805 * tree-inline.c (declare_return_variable): Likewise.
14806 (remap_gimple_stmt): Likewise.
14807 (copy_bb): Likewise.
14808 (initialize_inlined_parameters): Likewise.
14809 (expand_call_inline): Likewise.
14810 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14811 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14812 (make_pass_ipa_chkp_produce_thunks): Likewise.
14813 (make_pass_chkp): Likewise.
14814 (make_pass_chkp_opt): Likewise.
14815 (make_pass_chkp_instrumentation_passes): Likewise.
14816 * tree-pretty-print.c (dump_generic_node): Likewise.
14817 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14818 * tree-ssa-dce.c (propagate_necessity): Likewise.
14819 (eliminate_unnecessary_stmts): Likewise.
14820 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14821 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14822 * tree-ssa-sccvn.h: Likewise.
14823 * tree-ssa-strlen.c (get_string_length): Likewise.
14824 (valid_builtin_call): Likewise.
14825 (adjust_last_stmt): Likewise.
14826 (handle_builtin_strchr): Likewise.
14827 (handle_builtin_strcpy): Likewise.
14828 (handle_builtin_stxncpy): Likewise.
14829 (handle_builtin_memcpy): Likewise.
14830 (handle_builtin_strcat): Likewise.
14831 (strlen_check_and_optimize_stmt): Likewise.
14832 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14833 * tree-streamer-in.c: Likewise.
14834 * tree-streamer.c (record_common_node): Likewise.
14835 * tree.c (tree_code_size): Likewise.
14836 (wide_int_to_tree_1): Likewise.
14837 (type_contains_placeholder_1): Likewise.
14838 (build_common_tree_nodes): Likewise.
14839 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14840 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14841 (POINTER_BOUNDS_P): Likewise.
14842 (BOUNDED_TYPE_P): Likewise.
14843 (BOUNDED_P): Likewise.
14844 (CALL_WITH_BOUNDS_P): Likewise.
14845 (pointer_bounds_type_node): Likewise.
14846 * value-prof.c (gimple_ic): Likewise.
14847 * var-tracking.c (vt_add_function_parameters): Likewise.
14848 * varasm.c (make_decl_rtl): Likewise.
14849 (assemble_start_function): Likewise.
14850 (output_constant): Likewise.
14851 (maybe_assemble_visibility): Likewise.
14852 * varpool.c (ctor_for_folding): Likewise.
14853 * chkp-builtins.def: Remove.
14854 * ipa-chkp.c: Remove.
14855 * ipa-chkp.h: Remove.
14856 * rtl-chkp.c: Remove.
14857 * rtl-chkp.h: Remove.
14858 * tree-chkp-opt.c: Remove.
14859 * tree-chkp.c: Remove.
14860 * tree-chkp.h: Remove.
14861
14862 2018-06-07 Carl Love <cel@us.ibm.com>
14863
14864 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14865 vextract_fp_from_shortl): Add BE support.
14866
14867 2018-06-07 Paul Koning <ni1d@arrl.net>
14868
14869 * compare-elim.c (try_merge_compare): Don't merge compare if
14870 address contains a side effect.
14871 (try_eliminate_compare): Likewise.
14872
14873 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14874
14875 * config.gcc: Support "tremont".
14876 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14877 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14878 PROCESSOR_TREMONT.
14879 * config/i386/i386.c (m_TREMONT): Define.
14880 (processor_target_table): Add "tremont".
14881 (PTA_TREMONT): Define.
14882 (ix86_lea_outperforms): Add TARGET_TREMONT.
14883 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14884 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14885 and M_INTEL_GOLDMONT_PLUS.
14886 (fold_builtin_cpu): Add "tremont".
14887 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14888 (ix86_option_override_internal): Add "tremont".
14889 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14890 (processor_type): Add PROCESSOR_TREMONT.
14891 * config/i386/x86-tune.def: Add m_TREMONT.
14892 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14893
14894 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14895
14896 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14897 symbol defined for msp430i* devices to be lower case.
14898
14899 2018-06-07 Richard Biener <rguenther@suse.de>
14900
14901 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14902 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14903 Properly wrap signed arithmetic if overflow wraps.
14904
14905 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14906
14907 PR tree-optimization/69615
14908 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14909 of a cast from a same precision integral SSA_NAME in a bb dominated
14910 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14911 cast to utype if rhs2 has already a compatible type.
14912
14913 2018-06-07 Richard Biener <rguenther@suse.de>
14914
14915 PR tree-optimization/85935
14916 * graphite-scop-detection.c (find_params_in_bb): Analyze
14917 condition operands with respect to the correct loop. Assert
14918 the analysis doesn't fail.
14919
14920 2018-06-04 Carl Love <cel@us.ibm.com>
14921
14922 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14923 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14924 as it is slightly cheaper.
14925 (first_match_or_eos_index_<mode>):
14926 Calculate index using natural element order.
14927 (first_match_index_<mode>):
14928 Calculate index using natural element order.
14929 (first_match_or_eos_index_<mode>):
14930 Calculate index using natural order.
14931 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14932 for BE and LE modes.
14933 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14934 P9V_BUILTIN_VCLZLSBB_V16QI.
14935 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14936 specific.
14937
14938 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14939
14940 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14941 indentation and line wrap for many prototypes. Add missing
14942 @smallexample directives around block of prototypes for vec_xl and
14943 vec_xst.
14944
14945 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14946
14947 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14948 track if we pass or return IEEE 128-bit floating point.
14949 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14950 C++ mangling that is compatible with GCC 8.1.
14951 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14952 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14953 floating point types.
14954 (rs6000_function_arg_advance_1): Likewise.
14955 (rs6000_mangle_type): Optionally generate mangled names that match
14956 what GCC 8.1 generated for IEEE 128-bit floating point types.
14957 (rs6000_globalize_decl_name): If we have an external function that
14958 passes or returns IEEE 128-bit types, generate a weak reference
14959 from the mangled name used in GCC 8.1 to the current mangled
14960 name.
14961 (rs6000_init_builtins): Make __ibm128 use the long double type if
14962 long double is IBM extended double. Make __float128 use the long
14963 double type if long double is IEEE 128-bit.
14964
14965 PR target/85657
14966 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14967 macro for __ibm128 built-in functions.
14968 (PACK_IF): Add __ibm128 pack/unpack functions.
14969 (UNPACK_IF): Likewise.
14970 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14971 enable long double built-in functions if long double is IEEE
14972 128-bit floating point.
14973 (rs6000_invalid_builtin): Update long double built-in function
14974 error message.
14975 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14976 functions, adjust the built-in function to use the long double
14977 built-in function if __ibm128 and long double are the same type.
14978 * doc/extend.texi (PowerPC builtins): Update documention for
14979 __builtin_{,un}pack_longdouble. Add documentation for
14980 __builtin_{,un}pack_ibm128.
14981
14982 2018-06-06 Jim Wilson <jimw@sifive.com>
14983
14984 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14985 (struct machine_function): New field interrupt_mode.
14986 (riscv_handle_type_attribute): New function. Add forward declaration.
14987 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14988 (riscv_expand_epilogue): Check interrupt_mode field.
14989 (riscv_set_current_function): Check interrupt attribute args and
14990 set interrupt_mode field.
14991 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14992 (riscv_sret, riscv_uret): New.
14993 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14994 new arguments to interrupt attribute.
14995
14996 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14997
14998 PR target/63177
14999 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
15000 Don't handle -mcpu=power8 if -mpower9-vector is also used.
15001
15002 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15003
15004 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
15005 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
15006 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15007 several redundant entries.
15008
15009 2018-06-06 David Malcolm <dmalcolm@redhat.com>
15010
15011 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
15012 type from "rtx" to "rtx_insn *".
15013 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
15014 for local "call_insn", removing cast.
15015 (ix86_expand_call): Likewise, introducing a "call_insn" local.
15016
15017 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
15018
15019 PR tree-optimization/86066
15020 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
15021 for BIT_INSERT_EXPR stores.
15022
15023 2018-06-06 Richard Biener <rguenther@suse.de>
15024
15025 PR tree-optimization/86062
15026 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15027 component refs ontop
15028 of to be offsetted base.
15029
15030 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15031
15032 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
15033 to be static and remove check on interrupt attribute name.
15034
15035 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
15036
15037 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15038 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
15039
15040 2018-06-05 Steve Ellcey <sellcey@cavium.com>
15041
15042 PR target/79924
15043 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
15044 second argument.
15045 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
15046 Remove second argument, change how error is called.
15047 (aarch64_layout_arg): Remove second argument from
15048 aarch64_err_no_fpadvsimd call.
15049 (aarch64_init_cumulative_args): Ditto.
15050 (aarch64_gimplify_va_arg_expr): Ditto.
15051 * config/aarch64/aarch64.md (mov<mode>): Ditto.
15052
15053 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
15054
15055 * config/i386/i386.md (simple_return_indirect_internal): New expander.
15056 (*simple_return_indirect_internal<mode>): Rename from
15057 simple_return_indirect_internal. Use W mode iterator.
15058 (rstorssp): New expander.
15059 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
15060 (clrssbsy): New expander.
15061 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
15062
15063 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
15064
15065 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
15066 __typeof__.
15067 (cmse_check_pointed_object): Likewise.
15068
15069 2018-06-05 Martin Liska <mliska@suse.cz>
15070
15071 PR gcov-profile/47618
15072 * doc/invoke.texi: Document how -fprofile-dir format
15073 is extended.
15074
15075 2018-06-05 Richard Biener <rguenther@suse.de>
15076
15077 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
15078 removal pretend DOM info isn't available so we do not update
15079 it and only remove edges, not dominated blocks. Actually free
15080 DOM info in case we removed something. Remove unreachable blocks.
15081 (mfb_keep_latches): Work with either DOM info or marked backedges.
15082 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
15083 first. Mark backedges if DOM info isn't available.
15084 (Re-)compute DOM info after cleanup_control_flow_pre.
15085
15086 2018-06-05 Richard Biener <rguenther@suse.de>
15087
15088 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
15089 (locus_discrim_hasher::hash): Adjust.
15090 (locus_discrim_hasher::equal): Likewise.
15091 (next_discriminator_for_locus): Work on line directly.
15092 (same_line_p): Pass in expanded locus1 as well.
15093 (assign_discriminators): Avoid redundant location expansions.
15094
15095 2018-06-05 Richard Biener <rguenther@suse.de>
15096
15097 PR tree-optimization/86046
15098 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
15099 if required after clearing TREE_ADDRESSABLE.
15100
15101 2018-06-05 Richard Biener <rguenther@suse.de>
15102
15103 PR tree-optimization/86047
15104 * tree-ssa-loop.c (for_each_index): Glob handling of all
15105 decls and constants and really handle all of them.
15106
15107 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15108
15109 PR target/81497
15110 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
15111 qualifier_void_pointer and qualifier_const_void_pointer.
15112 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
15113 (arm_init_builtins): Handle the above.
15114 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
15115 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
15116 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
15117 void intrinsics.
15118
15119 2018-06-05 Martin Liska <mliska@suse.cz>
15120
15121 * auto-profile.c (read_autofdo_file): Do not use
15122 gcov_ctr_summary struct.
15123 (afdo_callsite_hot_enough_for_early_inline): Likewise.
15124 * coverage.c (struct counts_entry): Likewise.
15125 (read_counts_file): Read just single summary entry.
15126 (get_coverage_counts): Use gcov_summary struct.
15127 * coverage.h (get_coverage_counts): Likewise.
15128 * gcov-dump.c (dump_working_sets): Likewise.
15129 (tag_summary): Dump just single summary.
15130 * gcov-io.c (gcov_write_summary): Write just histogram
15131 summary.
15132 (gcov_read_summary): Read just single summary.
15133 (compute_working_sets): Use gcov_summary struct.
15134 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
15135 of GCOV_COUNTERS_SUMMABLE.
15136 (GCOV_COUNTERS_SUMMABLE): Remove.
15137 (GCOV_FIRST_VALUE_COUNTER): Replace with
15138 GCOV_COUNTER_V_INTERVAL.
15139 (struct gcov_ctr_summary): Remove.
15140 (struct gcov_summary): Directly use fields of former
15141 gcov_ctr_summary.
15142 (compute_working_sets): Use gcov_summary struct.
15143 * gcov.c (read_count_file): Do not use ctrs fields.
15144 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
15145 struct.
15146 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
15147 struct.
15148 * profile.c: Likewise.
15149 * profile.h: Likewise.
15150
15151 2018-06-05 Martin Liska <mliska@suse.cz>
15152
15153 PR gcov-profile/84846
15154 * gcov.c (output_lines): Print working directory only
15155 in intermediate format.
15156
15157 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
15158
15159 * config/s390/s390-builtin-types.def: Add void function type.
15160 * config/s390/s390-builtins.def: Use the function type for the
15161 tbeginc builtin.
15162
15163 2018-06-04 Jim Wilson <jimw@sifive.com>
15164
15165 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
15166 to int.
15167 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
15168 and maybe_eh_return. Change regno to unsigned int. Use new args to
15169 handle EH_RETURN_DATA_REGNO registers properly.
15170 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
15171 (riscv_expand_epilogue): Update comment. Change argument name and
15172 type. Update code to use new name and type. Pass new args to
15173 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
15174 EXCEPTION_RETURN.
15175 * config/riscv/riscv.md (NORMAL_RETURN): New.
15176 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
15177 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
15178 (eh_return): Call gen_eh_return_internal and emit barrier.
15179 (eh_return_internal): Call riscv_expand_epilogue.
15180
15181 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
15182
15183 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
15184 bit_insertion field and declare can_be_merged_into method.
15185 (merged_store_group::can_be_merged_into): New method.
15186 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
15187 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
15188 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
15189
15190 2018-06-04 Richard Biener <rguenther@suse.de>
15191
15192 PR tree-optimization/85955
15193 * builtins.c (fold_builtin_sincos): Convert pointers to
15194 destination to appropriate type before dereferencing.
15195
15196 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
15197
15198 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
15199
15200 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
15201
15202 * expr.c (expand_expr_real_1): Force the operand into memory if
15203 its TYPE_MODE is BLKmode and if there is no integer mode for
15204 the number of bits being extracted.
15205
15206 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15207
15208 PR target/85832
15209 PR target/86036
15210 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15211 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
15212
15213 2018-06-04 Richard Biener <rguenther@suse.de>
15214
15215 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
15216 (cleanup_tree_cfg_noloop): ... single caller. Do
15217 start_recording_case_labels later.
15218
15219 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
15220
15221 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
15222 to _IMMINTRIN_H_INCLUDED.
15223 * config/i386/pconfigintrin.h: Ditto.
15224 * config/i386/waitpkgintrin.h: Ditto.
15225 * config/i386/immintrin.h: Add includes for sgxintrin.h,
15226 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
15227 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
15228 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
15229 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
15230 waitpkgintrin.h and cldemoteintrin.h.
15231
15232 2018-06-04 Richard Biener <rguenther@suse.de>
15233
15234 PR tree-optimization/86038
15235 * tracer.c (find_best_successor): Check probability for
15236 being initialized, bail out if not.
15237
15238 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
15239
15240 PR target/86003
15241 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15242 of bits to ignore when comparing architectures.
15243
15244 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15245
15246 PR tree-optimization/69615
15247 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15248 maximum or minimum of the type, try to merge it also as if
15249 range1 is + [-, x - 1] or + [x + 1, -].
15250
15251 PR c++/86025
15252 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15253
15254 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
15255
15256 PR tree-optimization/86034
15257 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15258 the unsigned bitfield type in a bit insertion sequence if it does not
15259 have a larger precision than the bitfield size.
15260 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15261
15262 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
15263
15264 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15265
15266 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15267
15268 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15269 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15270 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15271 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15272
15273 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15274
15275 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15276 Disable -fdelete-null-pointer-checks for ELF toolchain.
15277
15278 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15279 Kito Cheng <kito.cheng@gmail.com>
15280
15281 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15282 (nds32le-*-*, nds32be-*-*): Integrate checking process.
15283 (nds32*-*-*): Add glibc and uclibc conditions.
15284 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15285 (TARGET_EXCEPT_UNWIND_INFO): Define.
15286 * config/nds32/elf.h: New file.
15287 * config/nds32/linux.h: New file.
15288 * config/nds32/nds32-elf.opt: New file.
15289 * config/nds32/nds32-linux.opt: New file.
15290 * config/nds32/nds32-fp-as-gp.c
15291 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15292 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15293 TARGET_LINUX_ABI.
15294 (nds32_asm_file_end): Ditto.
15295 (nds32_print_operand): Ditto.
15296 (nds32_insert_attributes): Ditto.
15297 (nds32_init_libfuncs): New function.
15298 (TARGET_HAVE_TLS): Define.
15299 (TARGET_INIT_LIBFUNCS): Define.
15300 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15301 spec content.
15302 (TARGET_ELF): Apply different mcmodel setting.
15303 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15304 been migrated into elf.h and linux.h files.
15305 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15306 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15307 (mcmodel): The content has been migrated into nds32-elf.opt and
15308 nds32-linux.opt files.
15309 * config/nds32/t-elf: New file.
15310 * config/nds32/t-linux: New file.
15311
15312 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15313 Shiva Chen <shiva0217@gmail.com>
15314
15315 * config/nds32/constants.md (unspec_volatile_element): Add
15316 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15317 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15318 optimization.
15319 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15320 (make_pass_nds32_fp_as_gp): Declare.
15321 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15322 optmization pass.
15323 (nds32_asm_function_end_prologue): Remove unused asm output.
15324 (nds32_asm_function_begin_epilogue): Remove unused asm output.
15325 (nds32_asm_file_start): Output necessary fp_as_gp information.
15326 (nds32_option_override): Adjust register usage.
15327 (nds32_expand_prologue): Consider fp_as_gp situation.
15328 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15329 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15330 (epilogue): Ditto.
15331 (return): Ditto.
15332 (simple_return): Ditto.
15333 (omit_fp_begin): Output special directive for fp_as_gp.
15334 (omit_fp_end): Output special directive for fp_as_gp.
15335 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15336 mforbid-fp-as-gp): New options.
15337
15338 2018-06-01 Mark Wielaard <mark@klomp.org>
15339
15340 * dwarf2out.c (dwarf2out_finish): Remove generation of
15341 DW_AT_loclists_base.
15342
15343 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
15344
15345 * gimple-ssa-store-merging.c: Include gimple-fold.h.
15346 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15347 (struct merged_store_group): Add bit_insertion field.
15348 (dump_char_array): Use standard hexadecimal format.
15349 (merged_store_group::merged_store_group): Set bit_insertion to false.
15350 (merged_store_group::apply_stores): Use optimal buffer size. Deal
15351 with BIT_INSERT_EXPR stores. Move up code updating the mask and
15352 also print the mask in the dump file.
15353 (pass_store_merging::gate): Minor tweak.
15354 (imm_store_chain_info::coalesce_immediate): Fix wrong association
15355 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
15356 stores with INTEGER_CST stores.
15357 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15358 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15359 and use it throughout. Generate bit insertion sequences if need be.
15360 (pass_store_merging::process_store): Remove redundant condition.
15361 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15362
15363 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
15364
15365 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15366 the 128-bit floating point types. Fix function comment.
15367
15368 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15369
15370 * config/aarch64/aarch64-simd.md
15371 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15372 mnemonics.
15373 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15374 mnemonics.
15375
15376 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15377
15378 PR tree-optimization/85989
15379 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15380 variable.
15381 (backprop::intersect_uses): Check it when deciding whether this
15382 is a backedge reference.
15383 (backprop::process_block): Add each phi to m_visited_phis
15384 after visiting it, then clear it at the end.
15385
15386 2018-06-01 Richard Biener <rguenther@suse.de>
15387
15388 * tree-vectorizer.h (vect_dr_stmt): New function.
15389 (vect_get_load_cost): Adjust.
15390 (vect_get_store_cost): Likewise.
15391 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15392 Use vect_dr_stmt instead of DR_SMTT.
15393 (vect_record_base_alignments): Likewise.
15394 (vect_calculate_target_alignment): Likewise.
15395 (vect_compute_data_ref_alignment): Likewise and make static.
15396 (vect_update_misalignment_for_peel): Likewise.
15397 (vect_verify_datarefs_alignment): Likewise.
15398 (vector_alignment_reachable_p): Likewise.
15399 (vect_get_data_access_cost): Likewise. Pass down
15400 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15401 (vect_get_peeling_costs_all_drs): Likewise.
15402 (vect_peeling_hash_get_lowest_cost): Likewise.
15403 (vect_enhance_data_refs_alignment): Likewise.
15404 (vect_find_same_alignment_drs): Likewise.
15405 (vect_analyze_data_refs_alignment): Likewise.
15406 (vect_analyze_group_access_1): Likewise.
15407 (vect_analyze_group_access): Likewise.
15408 (vect_analyze_data_ref_access): Likewise.
15409 (vect_analyze_data_ref_accesses): Likewise.
15410 (vect_vfa_segment_size): Likewise.
15411 (vect_small_gap_p): Likewise.
15412 (vectorizable_with_step_bound_p): Likewise.
15413 (vect_prune_runtime_alias_test_list): Likewise.
15414 (vect_analyze_data_refs): Likewise.
15415 (vect_supportable_dr_alignment): Likewise.
15416 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15417 (vect_gen_prolog_loop_niters): Likewise.
15418 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15419 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15420 modify DR_STMT.
15421 (vect_recog_mask_conversion_pattern): Likewise.
15422 (vect_try_gather_scatter_pattern): Likewise.
15423 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15424 to vect_get_store_cost.
15425 (vect_get_store_cost): Get stmt_info instead of DR.
15426 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15427 (vect_get_load_cost): Get stmt_info instead of DR.
15428
15429 2018-06-01 Richard Biener <rguenther@suse.de>
15430
15431 PR middle-end/86017
15432 * gimple-fold.c (var_decl_component_p): Also allow offsetted
15433 vars wrapped in MEM_REFs.
15434
15435 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15436
15437 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15438 Fix subreg tests so that we only return a choice between
15439 GENERAL_REGS and FP_REGS if the original classes included both.
15440
15441 2018-06-01 Richard Biener <rguenther@suse.de>
15442
15443 PR ipa/85960
15444 * tree-ssa-structalias.c (get_function_part_constraint):
15445 Handle NULL fi->decl.
15446 (find_func_aliases_for_call): Properly handle indirect
15447 fi from direct call.
15448 (find_func_clobbers): Likewise.
15449 (ipa_pta_execute): Likewise.
15450 (create_variable_info_for): For functions that are ifunc_resolver
15451 resolve to a varinfo that contains the result of the resolver call.
15452 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15453 aliases.
15454
15455 2018-05-31 Michael Collison <michael.collison@arm.com>
15456
15457 * config/aarch64/aarch64.md:
15458 (*fix_to_zero_extenddfdi2): New pattern.
15459 * gcc.target/aarch64/fix_extend1.c: New testcase.
15460
15461 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15462
15463 PR middle-end/78809
15464 PR middle-end/83026
15465 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15466 and BUILT_IN_STRNCMP_EQ.
15467 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15468 BUILT_IN_STRNCMP_EQ.
15469 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15470 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15471 (gimple_fold_builtin): Likewise.
15472 * tree-ssa-strlen.c (compute_string_length): New function.
15473 (determine_min_obsize): New function.
15474 (handle_builtin_string_cmp): New function to handle calls to
15475 string compare functions.
15476 (strlen_optimize_stmt): Add handling to builtin string compare
15477 calls.
15478 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15479 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15480 * tree.c (build_common_builtin_nodes): Add new defines of
15481 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15482
15483 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15484
15485 PR target/85984
15486 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15487 functions with naked attribute.
15488
15489 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15490
15491 * config/i386/sse.md (avx_vec_concat<mode>):
15492 Substitute concat_tg_mode mode attribute with xtg_mode.
15493 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15494 (concat_tg_mode): Remove mode attribute.
15495
15496 2018-05-31 Martin Sebor <msebor@redhat.com>
15497
15498 PR c/82063
15499 * calls.c (alloc_max_size): Correct a logic error/typo.
15500 Treat excessive arguments as infinite. Warn for invalid arguments.
15501 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15502
15503 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15504
15505 PR target/85829
15506 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15507 and movx for Haswell.
15508
15509 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15510 Cesar Philippidis <cesar@codesourcery.com>
15511
15512 PR middle-end/85879
15513 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15514 when emitting error on private/firstprivate reductions.
15515 * omp-low.c (lower_omp_target): Avoid reference-type processing
15516 on pointers for firstprivate clause.
15517
15518 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15519
15520 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15521 (st1x2): Likewise.
15522 (st1x3): Likewise.
15523 * config/aarch64/aarch64-simd.md
15524 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15525 (aarch64_ld1_x3_<mode>): Likewise
15526 (aarch64_st1x2<VALLDIF:mode>): Likewise
15527 (aarch64_st1_x2_<mode>): Likewise
15528 (aarch64_st1x3<VALLDIF:mode>): Likewise
15529 (aarch64_st1_x3_<mode>): Likewise
15530 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15531 (vld1_s8_x3): Likewise.
15532 (vld1_u16_x3): Likewise.
15533 (vld1_s16_x3): Likewise.
15534 (vld1_u32_x3): Likewise.
15535 (vld1_s32_x3): Likewise.
15536 (vld1_u64_x3): Likewise.
15537 (vld1_s64_x3): Likewise.
15538 (vld1_f16_x3): Likewise.
15539 (vld1_f32_x3): Likewise.
15540 (vld1_f64_x3): Likewise.
15541 (vld1_p8_x3): Likewise.
15542 (vld1_p16_x3): Likewise.
15543 (vld1_p64_x3): Likewise.
15544 (vld1q_u8_x3): Likewise.
15545 (vld1q_s8_x3): Likewise.
15546 (vld1q_u16_x3): Likewise.
15547 (vld1q_s16_x3): Likewise.
15548 (vld1q_u32_x3): Likewise.
15549 (vld1q_s32_x3): Likewise.
15550 (vld1q_u64_x3): Likewise.
15551 (vld1q_s64_x3): Likewise.
15552 (vld1q_f16_x3): Likewise.
15553 (vld1q_f32_x3): Likewise.
15554 (vld1q_f64_x3): Likewise.
15555 (vld1q_p8_x3): Likewise.
15556 (vld1q_p16_x3): Likewise.
15557 (vld1q_p64_x3): Likewise.
15558 (vst1_s64_x2): Likewise.
15559 (vst1_u64_x2): Likewise.
15560 (vst1_f64_x2): Likewise.
15561 (vst1_s8_x2): Likewise.
15562 (vst1_p8_x2): Likewise.
15563 (vst1_s16_x2): Likewise.
15564 (vst1_p16_x2): Likewise.
15565 (vst1_s32_x2): Likewise.
15566 (vst1_u8_x2): Likewise.
15567 (vst1_u16_x2): Likewise.
15568 (vst1_u32_x2): Likewise.
15569 (vst1_f16_x2): Likewise.
15570 (vst1_f32_x2): Likewise.
15571 (vst1_p64_x2): Likewise.
15572 (vst1q_s8_x2): Likewise.
15573 (vst1q_p8_x2): Likewise.
15574 (vst1q_s16_x2): Likewise.
15575 (vst1q_p16_x2): Likewise.
15576 (vst1q_s32_x2): Likewise.
15577 (vst1q_s64_x2): Likewise.
15578 (vst1q_u8_x2): Likewise.
15579 (vst1q_u16_x2): Likewise.
15580 (vst1q_u32_x2): Likewise.
15581 (vst1q_u64_x2): Likewise.
15582 (vst1q_f16_x2): Likewise.
15583 (vst1q_f32_x2): Likewise.
15584 (vst1q_f64_x2): Likewise.
15585 (vst1q_p64_x2): Likewise.
15586 (vst1_s64_x3): Likewise.
15587 (vst1_u64_x3): Likewise.
15588 (vst1_f64_x3): Likewise.
15589 (vst1_s8_x3): Likewise.
15590 (vst1_p8_x3): Likewise.
15591 (vst1_s16_x3): Likewise.
15592 (vst1_p16_x3): Likewise.
15593 (vst1_s32_x3): Likewise.
15594 (vst1_u8_x3): Likewise.
15595 (vst1_u16_x3): Likewise.
15596 (vst1_u32_x3): Likewise.
15597 (vst1_f16_x3): Likewise.
15598 (vst1_f32_x3): Likewise.
15599 (vst1_p64_x3): Likewise.
15600 (vst1q_s8_x3): Likewise.
15601 (vst1q_p8_x3): Likewise.
15602 (vst1q_s16_x3): Likewise.
15603 (vst1q_p16_x3): Likewise.
15604 (vst1q_s32_x3): Likewise.
15605 (vst1q_s64_x3): Likewise.
15606 (vst1q_u8_x3): Likewise.
15607 (vst1q_u16_x3): Likewise.
15608 (vst1q_u32_x3): Likewise.
15609 (vst1q_u64_x3): Likewise.
15610 (vst1q_f16_x3): Likewise.
15611 (vst1q_f32_x3): Likewise.
15612 (vst1q_f64_x3): Likewise.
15613 (vst1q_p64_x3): Likewise.
15614
15615 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15616
15617 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15618 user_label_prefix to name.
15619
15620 * tree-core.h: Update comment about the format of NAME string
15621 passed to handler in attribute_spec.
15622
15623 * config/msp430/msp430.md: Remove erroneous subreg expression from
15624 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15625 zero_extend{q,h}isi2.
15626
15627 2018-05-30 Borislav Petkov <bp@suse.de>
15628
15629 * doc/extend.texi: Document some architecture specific
15630 constraints and sort entries.
15631
15632 2018-05-30 Martin Sebor <msebor@redhat.com>
15633
15634 PR middle-end/85369
15635 * builtins.c (expand_builtin_stpcpy_1): New function.
15636 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15637 only if the former succeeds.
15638
15639 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15640
15641 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15642 in saphira.
15643
15644 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15645
15646 * doc/invoke.texi (-flinker-output): Document
15647
15648 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15649
15650 * passes.c (ipa_write_summaries): Only modify statements if body
15651 is in memory.
15652 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15653 incrementally linking.
15654 (ipa_passes): Likewise.
15655 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15656 pass down resolution info.
15657 * common.opt (flag_incremental_link): Update info.
15658 * gcc.c (plugin specs): Turn flinker-output=* to
15659 -plugin-opt=-linker-output-known
15660 * toplev.c (compile_file): Also cut compilation when doing incremental
15661 link.
15662 * flag-types. (enum lto_partition_model): Add
15663 LTO_LINKER_OUTPUT_NOLTOREL.
15664 (invoke.texi): Add -flinker-output docs.
15665 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15666 link same way as WPA; do not stream in dead initializers.
15667
15668 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15669 darf2out_register_external_decl): Support incremental link.
15670
15671 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15672
15673 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15674
15675 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15676
15677 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15678 it down to simple_object_copy_lto_debug_sections.
15679 (run_gcc): Determine incremental LTO link time and configure
15680 lto1 into non-wpa mode, disable renaming of debug sections.
15681
15682 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15683
15684 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15685 descriptions of various incorrectly documented functions.
15686
15687 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15688
15689 Revert:
15690 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15691 address check not strict.
15692
15693 2018-05-30 Richard Biener <rguenther@suse.de>
15694
15695 PR tree-optimization/85964
15696 * tracer.c (better_p): Drop initialized count check, we only
15697 call the function with initialized counts now.
15698 (find_best_successor): Do find a best edge if one
15699 has uninitialized count.
15700 (find_best_predecessor): Likewise. Do BB frequency check only
15701 if count is initialized.
15702
15703 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15704
15705 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15706 (aarch64_ldrstr_offset_compare): New.
15707 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15708 load/store orderings.
15709 (aarch64_gen_adjusted_ldpstp): Likewise.
15710
15711 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15712
15713 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15714 Check for subset of GENERAL_REGS and FP_REGS.
15715 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15716 r=w alternative.
15717
15718 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15719
15720 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15721 and wi::to_poly_offset. Add the current offset and then check
15722 whether the sum fits, rather than using an unchecked addition of
15723 a checked term. Check for a shwi rather than a uhwi.
15724 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15725 (store_constructor): Use poly_int_tree_p.
15726 (expand_expr_real_1): Likewise.
15727 * function.c (assign_temp): Likewise.
15728 * fold-const.c (const_binop): Use poly_int_tree_p and
15729 wi::to_poly_offset.
15730 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15731 division.
15732 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15733 to_poly_offset for MEM offsets.
15734 * ipa-icf.c (sem_variable::equals): Likewise.
15735 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15736 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15737 wi::to_poly_offset for BIT_FIELD_REF offsets.
15738 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15739 wi::to_poly_offset.
15740 * var-tracking.c (emit_note_insn_var_location): Use
15741 tree_to_poly_uint64.
15742
15743 2018-05-29 Jim Wilson <jimw@sifive.com>
15744
15745 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15746
15747 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15748
15749 PR target/85950
15750 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15751 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15752 sequence.
15753 (sse4_1_round<mode>2): Use nonimmediate_operand
15754 for operand 1 predicate.
15755
15756 2018-05-29 Martin Sebor <msebor@redhat.com>
15757 Richard Biener <rguenther@suse.de>
15758
15759 PR testsuite/85888
15760 * calls.c (get_size_range): Call determine_value_range instead
15761 of get_value_range..
15762 * tree-vrp.h (determine_value_range): Declared new function.
15763 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15764
15765 2018-05-29 Richard Biener <rguenther@suse.de>
15766
15767 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15768 sure to use non-pattern stmts for get_earlier_stmt arguments.
15769 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15770 called on pattern stmts.
15771 (get_later_stmt): Likewise.
15772
15773 2018-05-29 Martin Liska <mliska@suse.cz>
15774
15775 PR gcov-profile/85759
15776 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15777 env variables.
15778
15779 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15780
15781 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15782 VEC_UNPACK_*_EXPR.
15783 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15784 VEC_PACK_*_EXPR.
15785
15786 PR target/85918
15787 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15788 VEC_PACK_FLOAT_EXPR): New tree codes.
15789 * tree-pretty-print.c (op_code_prio): Handle
15790 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15791 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15792 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15793 * tree-inline.c (estimate_operator_cost): Likewise.
15794 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15795 * fold-const.c (const_binop): Likewise.
15796 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15797 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15798 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15799 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15800 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15801 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15802 * expr.c (expand_expr_real_2): Likewise.
15803 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15804 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15805 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15806 optabs.
15807 * optabs.c (expand_widen_pattern_expr): For
15808 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15809 sign from result type rather than operand's type.
15810 (expand_binop_directly): For vec_packu_float_optab and
15811 vec_packs_float_optab allow result type to be different from operand's
15812 type.
15813 * optabs-tree.c (optab_for_tree_code): Handle
15814 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15815 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15816 * tree-vect-generic.c (expand_vector_operations_1): Handle
15817 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15818 VEC_PACK_FLOAT_EXPR.
15819 * tree-vect-stmts.c (supportable_widening_operation): Handle
15820 FIX_TRUNC_EXPR.
15821 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15822 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15823 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15824 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15825 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15826 mode attributes.
15827 (vec_pack<floatprefix>_float_<mode>): New expander.
15828 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15829 attributes.
15830 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15831 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15832 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15833 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15834 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15835 Document.
15836 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15837 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15838 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15839 VEC_PACK_FLOAT_EXPR): Document.
15840
15841 2018-05-29 Richard Biener <rguenther@suse.de>
15842
15843 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15844 member.
15845 (stmt_vec_info_vec): Make pointer.
15846 (init_stmt_vec_info_vec): Remove.
15847 (free_stmt_vec_info_vec): Likewise.
15848 (set_stmt_vec_info_vec): New function.
15849 (free_stmt_vec_infos): Likewise.
15850 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15851 (set_vinfo_for_stmt): Likewise.
15852 (get_earlier_stmt): Likewise.
15853 (get_later_stmt): Likewise.
15854 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15855 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15856 (vec_info::~vec_info): Free stmt_vec_infos.
15857 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15858 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15859 (pass_slp_vectorize::execute): Likewise.
15860 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15861 (free_stmt_vec_info_vec): Likewise.
15862 (set_stmt_vec_info_vec): New function.
15863 (free_stmt_vec_infos): Likewise.
15864 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15865 the global stmt_vec_info_vec.
15866 * tree-parloops.c (gather_scalar_reductions): Use
15867 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15868 vector.
15869
15870 2018-05-29 Richard Biener <rguenther@suse.de>
15871
15872 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15873
15874 2018-05-29 Martin Liska <mliska@suse.cz>
15875 David Malcolm <dmalcolm@redhat.com>
15876
15877 * vec.c (test_reverse): New.
15878 (vec_c_tests): Add new test.
15879 * vec.h (vl_ptr>::reverse): New function.
15880
15881 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15882
15883 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15884
15885 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15886 and later.
15887
15888 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15889
15890 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15891
15892 2018-05-28 Richard Biener <rguenther@suse.de>
15893
15894 PR tree-optimization/85933
15895 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15896 look at stmts marked as vectorizable.
15897
15898 2018-05-28 Richard Biener <rguenther@suse.de>
15899
15900 PR tree-optimization/85934
15901 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15902 vector boolean check before scalar optimization.
15903
15904 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15905
15906 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15907 for armv5te.
15908
15909 2018-05-28 Mark Wielaard <mark@klomp.org>
15910
15911 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15912 if it is an expression containing a minus sign.
15913
15914 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15915
15916 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15917
15918 2018-05-27 Paul Koning <ni1d@arrl.net>
15919
15920 * config/pdp11/pdp11.md (truncsihi2): Remove.
15921
15922 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15923 Chung-Ju Wu <jasonwucj@gmail.com>
15924
15925 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15926 implementation.
15927 (unaligned_store_dw): Ditto.
15928 * config/nds32/nds32-memory-manipulation.c
15929 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15930 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15931 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15932 (emit_setmem_word_loop): Rename to ...
15933 (emit_setmem_doubleword_loop): ... this.
15934 (nds32_gen_dup_4_byte_to_word_value): New function.
15935 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15936 (nds32_expand_setmem_loop): Refine implementation.
15937 (nds32_expand_setmem_loop_v3m): Ditto.
15938 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15939 pattern.
15940
15941 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15942
15943 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15944
15945 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15946
15947 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15948 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15949 machine->attr_no_prologue_p.
15950 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15951 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15952 (nds32_expand_epilogue): Consider attr_naked_p.
15953 (nds32_expand_epilogue_v3pop): Likewise.
15954 (nds32_can_use_return_insn): Likewise.
15955 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15956 attr_no_prologue_p fields.
15957 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15958
15959 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15960
15961 PR target/85918
15962 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15963 attributes.
15964 * config/i386/sse.md
15965 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15966 Rename to ...
15967 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15968 ... this.
15969 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15970 Rename to ...
15971 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15972 ... this.
15973 (*<floatsuffix>floatv2div2sf2): Rename to ...
15974 (*float<floatunssuffix>v2div2sf2): ... this.
15975 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15976 (float<floatunssuffix>v2div2sf2_mask): ... this.
15977 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15978 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15979 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15980 to ...
15981 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15982 ... this.
15983 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15984 Rename to ...
15985 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15986 ... this.
15987 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15988 Rename to ...
15989 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15990 ... this.
15991 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15992 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15993 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15994 gen_ufix_truncv8dfv8si2.
15995 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15996 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15997 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15998 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15999 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
16000 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
16001 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
16002 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
16003
16004 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16005
16006 PR target/85900
16007 PR target/85345
16008 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
16009
16010 2018-05-25 Jim Wilson <jimw@sifive.com>
16011
16012 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
16013 * config/riscv/riscv.c (struct machine_function): Add
16014 interrupt_handler_p and attribute_checked_p fields.
16015 (riscv_attribute_table): Add interrupt.
16016 (riscv_interrupt_type_p): New.
16017 (riscv_save_reg_p): Save extra regs for interrupt handler.
16018 (riscv_use_save_libcall): Return false for interrupt handler.
16019 (riscv_first_stack_step): Add forward declaration.
16020 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
16021 for interrupt handler with large frame. Use it for saved reg list.
16022 (riscv_expand_prologue): Move flag_stack_usage_info support to
16023 eliminate duplication.
16024 (riscv_expand_epilogue): Generate mret for interrupt handler.
16025 (riscv_epilogue_uses): New.
16026 (riscv_can_use_return_insn): Return false for interrupt handler.
16027 (riscv_function_ok_for_sibcall): Likewise.
16028 (riscv_set_current_function): Add interrupt handler support.
16029 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
16030 * config/riscv/riscv.md (UNSPECV_MRET): New.
16031 (GP_REGNUM): New.
16032 (riscv_frflags, riscv_fsflags): Use tab after opcode.
16033 (riscv_mret): New.
16034 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
16035
16036 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
16037
16038 PR tree-optimization/85712
16039 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
16040 this candidate has already been replaced in-situ by a copy.
16041
16042 2018-05-25 Jason Merrill <jason@redhat.com>
16043
16044 PR c++/80485 - inline function non-zero address.
16045 * symtab.c (nonzero_address): Check DECL_COMDAT.
16046
16047 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
16048
16049 PR target/83628
16050 * config/alpha/alpha.md (ashlsi3): New insn pattern.
16051 (*ashlsi_se): Rename from *ashldi_se. Define as sign
16052 extension of SImode operation. Use const123_operand predicate.
16053 (*saddsi_1): Remove.
16054 (*saddl_se_1): Ditto.
16055 (*ssubsi_1): Ditto.
16056 (*ssubl_se_1): Ditto.
16057 * config/alpha/predicates.md (const123_operand): New predicate.
16058 * config/alpha/constraints.md (P): Use IN_RANGE.
16059
16060 2018-05-25 Richard Biener <rguenther@suse.de>
16061
16062 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
16063 defaulted to true.
16064 (ref_maybe_used_by_stmt_p): Likewise.
16065 (stmt_may_clobber_ref_p): Likewise.
16066 (stmt_may_clobber_ref_p_1): Likewise.
16067 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
16068 and pass it along.
16069 (ref_maybe_used_by_stmt_p): Likewise.
16070 (stmt_may_clobber_ref_p): Likewise.
16071 (stmt_may_clobber_ref_p_1): Likewise.
16072 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
16073 the alias oracle to disambiguate DRs with stmts DR analysis
16074 couldn't handle.
16075 (vect_analyze_data_refs): Do not give up on not analyzable
16076 DRs for BB vectorization. Remove code truncating the dataref
16077 vector.
16078
16079 2018-05-25 Jakub Jelinek <jakub@redhat.com>
16080
16081 PR target/85832
16082 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16083 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
16084 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
16085
16086 2018-05-25 Richard Biener <rguenther@suse.de>
16087
16088 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
16089 function, combining stmt data ref gathering and fatal analysis
16090 parts.
16091 (vect_analyze_data_refs): Remove now redudnant code and simplify.
16092 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
16093 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
16094 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
16095 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
16096
16097 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16098
16099 PR tree-optimization/85720
16100 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
16101 SCC if all partitions are builtins.
16102 (version_loop_by_alias_check): New parameter. Generate cancelable
16103 runtime alias check if all partitions are builtins.
16104 (distribute_loop): Update call to above function.
16105
16106 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16107
16108 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
16109 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
16110 (parm_default_def_partition_arg): Ditto.
16111 (set_parm_default_def_partition): Ditto.
16112 (get_parm_default_def_partitions): Ditto and make it static.
16113 (get_undefined_value_partitions): Ditto and make it static.
16114 (remove_ssa_form): Refactor call to init_var_map here.
16115 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
16116 computation for loop region.
16117 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
16118 (register_default_def): Delete.
16119 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
16120 (parm_default_def_partition_arg): Ditto.
16121 (set_parm_default_def_partition): Ditto.
16122 (get_parm_default_def_partitions): Ditto and make it static.
16123 (get_undefined_value_partitions): Ditto and make it static.
16124 (coalesce_with_default, coalesce_with_default): Update comment.
16125 (create_coalesce_list_for_region): New func factored out from
16126 create_outofssa_var_map.
16127 (populate_coalesce_list_for_outofssa): New func factored out from
16128 create_outofssa_var_map and coalesce_ssa_name.
16129 (create_outofssa_var_map): Delete.
16130 (coalesce_ssa_name): Refactor to support live range computation.
16131 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
16132 (get_parm_default_def_partitions): Delete.
16133 (get_undefined_value_partitions): Ditto.
16134 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
16135 computation for loop region.
16136 (new_tree_live_info, loe_visit_block): Ditto.
16137 (live_worklist, set_var_live_on_entry): Ditto.
16138 (calculate_live_on_exit, verify_live_on_entry): Ditto.
16139 * tree-ssa-live.h (struct _var_map): New fields.
16140 (init_var_map): Change decl.
16141 (region_contains_p): New.
16142
16143 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16144
16145 * tree-ssa-live.h (live_merge_and_clear): Delete.
16146
16147 2018-05-25 Richard Biener <rguenther@suse.de>
16148
16149 PR c++/85912
16150 * tree-dump.c (dequeue_and_dump): Remove access to removed
16151 operand 2 of a SWITCH_EXPR.
16152
16153 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16154
16155 * doc/sourcebuild.texi (vect_double_cond_arith): Include
16156 multiplication and division.
16157 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
16158 (cond_udiv@var{m}, cond_umod@var{m}): Document.
16159 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
16160 (cond_udiv_optab, cond_umod_optab): New optabs.
16161 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
16162 (IFN_COND_RDIV): New internal functions.
16163 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
16164 TRUNC_MOD_EXPR and RDIV_EXPR.
16165 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
16166 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
16167 New unspecs.
16168 (SVE_INT_BINARY): Include mult.
16169 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
16170 (optab, sve_int_op): Handle mult.
16171 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
16172 UNSPEC_COND_DIV.
16173 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
16174 for SVE_INT_BINARY_SD.
16175
16176 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16177
16178 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
16179 (optab, sve_int_op): Handle div and udiv.
16180 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
16181 for SVE_INT_BINARY_SD.
16182 (*<optab><mode>3): New insn for the same.
16183
16184 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16185
16186 * tree-vect-patterns.c: Include predict.h.
16187 (vect_recog_divmod_pattern): Restrict check for division support
16188 to when optimizing for size.
16189
16190 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16191
16192 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
16193 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
16194 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
16195 (gimple_match_op::set_op): Likewise.
16196 (gimple_resimplify4): Declare.
16197 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
16198 (expr::gen_transform): Likewise.
16199 (decision_tree::gen): Generate a simplification routine for 4 operands.
16200 * gimple-match-head.c (gimple_simplify): Add an overload for
16201 4 operands. In the top-level function, handle up to 4 call
16202 arguments and call gimple_resimplify4.
16203 (gimple_resimplify4): New function.
16204 (build_call_internal): Pass a fourth operand.
16205 (maybe_push_to_seq): Likewise.
16206 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
16207 Fold VEC_COND_EXPRs of an operation and a default value into
16208 an IFN_COND_* function if possible.
16209 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
16210 New unspecs.
16211 (SVE_COND_FP_BINARY): Include them.
16212 (optab, sve_fp_op): Handle them.
16213 (SVE_INT_BINARY_REV): New code iterator.
16214 (SVE_COND_FP_BINARY_REV): New int iterator.
16215 (commutative): New int attribute.
16216 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
16217 Declare.
16218 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
16219 function.
16220 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
16221 (*cond_<optab><mode>): New patterns for reversed operands.
16222
16223 2018-05-25 Richard Biener <rguenther@suse.de>
16224
16225 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
16226 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
16227 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
16228 (STMT_VINFO_GROUPED_ACCESS): Adjust.
16229 * tree-vect-data-refs.c (everywhere): Adjust users.
16230 * tree-vect-loop.c (everywhere): Likewise.
16231 * tree-vect-slp.c (everywhere): Likewise.
16232 * tree-vect-stmts.c (everywhere): Likewise.
16233 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
16234
16235 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16236
16237 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
16238 Rename to...
16239 (gcc_cv_as_section_exclude): ... this.
16240 Try Solaris as #exclude syntax.
16241 * configure: Regenerate.
16242 * config.in: Regenerate.
16243 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16244 SECTION_EXCLUDE.
16245 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16246 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16247
16248 * varasm.c (default_elf_asm_named_section): Don't check if
16249 HAVE_GAS_SECTION_EXCLUDE is defined.
16250
16251 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16252
16253 * doc/md.texi: Update the documentation of the cond_* optabs
16254 to mention the new final operand. Fix GET_MODE_NUNITS call.
16255 Describe the scalar case too.
16256 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16257 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16258 instead of 2.
16259 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16260 (get_conditional_internal_fn): Update comment.
16261 * tree-vect-loop.c (vectorizable_reduction): Pass the original
16262 accumulator value as a final argument to conditional functions.
16263 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16264 a define_expand and add an "else" operand. Assert for now that
16265 the else operand is equal to operand 2. Use SVE_INT_BINARY and
16266 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16267 (*cond_<optab><mode>): New patterns.
16268 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16269 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16270 (UNSPEC_COND_EOR): Delete.
16271 (optab): Remove associated mappings.
16272 (SVE_INT_BINARY): New code iterator.
16273 (sve_int_op): Remove int attribute and add "minus" to the code
16274 attribute.
16275 (SVE_COND_INT_OP): Delete.
16276 (SVE_COND_FP_OP): Rename to...
16277 (SVE_COND_FP_BINARY): ...this.
16278
16279 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16280
16281 * optabs.c (can_reuse_operands_p): New function.
16282 (maybe_legitimize_operands): Try to reuse the results for
16283 earlier operands.
16284
16285 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16286
16287 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16288 Add {q} suffix to insn mnemonic.
16289
16290 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16291
16292 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16293 (msp430_warn_func_return): New.
16294
16295 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
16296
16297 * fold-const.c (tree_nonzero_bits): New function.
16298 * fold-const.h (tree_nonzero_bits): Likewise.
16299 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16300 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16301
16302 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16303
16304 PR target/85900
16305 PR target/85345
16306 * varasm.c (assemble_alias): Check ifunc_resolver only on
16307 FUNCTION_DECL.
16308
16309 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16310
16311 PR target/85903
16312 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16313 when memory input operand is handled.
16314
16315 2018-05-24 Luis Machado <luis.machado@linaro.org>
16316
16317 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16318 global.
16319 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16320
16321 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16322
16323 * match.pd: Delay FMA folds until after vectorization.
16324
16325 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
16326
16327 PR target/83009
16328 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16329 address check not strict.
16330
16331 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16332
16333 * gimple-match.h (gimple_match_op): New class.
16334 (mprts_hook): Replace parameters with a gimple_match_op *.
16335 (maybe_build_generic_op): Likewise.
16336 (gimple_simplified_result_is_gimple_val): Replace parameters with
16337 a const gimple_match_op *.
16338 (gimple_simplify): Replace code_helper * and tree * parameters with
16339 a gimple_match_op * parameter.
16340 (gimple_resimplify1): Replace code_helper *, tree and tree *
16341 parameters with a gimple_match_op * parameter.
16342 (gimple_resimplify2): Likewise.
16343 (gimple_resimplify3): Likewise.
16344 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16345 parameters with a gimple_match_op * parameter.
16346 * gimple-match-head.c (gimple_simplify): Change prototypes of
16347 auto-generated functions to take a gimple_match_op * instead of
16348 separate code_helper * and tree * parameters. Make the same
16349 change in the top-level overload and update calls to the
16350 gimple_resimplify routines. Update calls to the auto-generated
16351 functions and to maybe_push_res_to_seq in the publicly-facing
16352 operation-specific gimple_simplify overloads.
16353 (gimple_match_op::MAX_NUM_OPS): Define.
16354 (gimple_resimplify1): Replace rcode and ops with a single res_op
16355 parameter. Update call to gimple_simplify.
16356 (gimple_resimplify2): Likewise.
16357 (gimple_resimplify3): Likewise.
16358 (mprts_hook): Replace parameters with a gimple_match_op *.
16359 (maybe_build_generic_op): Likewise.
16360 (build_call_internal): Replace type, nargs and ops with
16361 a gimple_match_op *.
16362 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16363 with a single gimple_match_op *. Update calls to mprts_hook,
16364 build_call_internal and gimple_simplified_result_is_gimple_val.
16365 Factor out code that is common to the tree_code and combined_fn cases.
16366 * genmatch.c (expr::gen_transform): Replace tem_code and
16367 tem_ops with a gimple_match_op called tem_op. Update calls
16368 to the gimple_resimplify functions and maybe_push_res_to_seq.
16369 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16370 res_ops. Update call to the gimple_resimplify functions.
16371 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16372 (decision_tree::gen): Make the functions take a gimple_match_op *
16373 called res_op instead of separate res_code and res_ops parameters.
16374 Update call accordingly.
16375 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16376 and ops with a single res_op parameter. Update calls to
16377 maybe_build_generic_op and maybe_push_res_to_seq.
16378 (fold_stmt_1): Update calls to gimple_simplify and
16379 replace_stmt_with_simplification.
16380 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16381 and gimple_simplified_result_is_gimple_val.
16382 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16383 gimple_simplify.
16384 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16385 with a gimple_match_op *.
16386 (vn_nary_build_or_lookup): Likewise. Update call to
16387 vn_nary_build_or_lookup_1.
16388 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16389 gimple_match_op *. Update calls to the gimple_resimplify routines
16390 and to gimple_simplified_result_is_gimple_val.
16391 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16392 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16393 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16394 (visit_nary_op): Likewise.
16395 (visit_reference_op_load): Likewise.
16396
16397 2018-05-23 Luis Machado <luis.machado@linaro.org>
16398
16399 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16400 modifier for printing the step amount.
16401
16402 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
16403
16404 PR target/78849
16405 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16406 types.
16407
16408 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
16409
16410 * doc/sourcebuild.texi (Endianness): New subsubsection.
16411
16412 2018-05-23 Luis Machado <luis.machado@linaro.org>
16413
16414 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16415 <prefetch_dynamic_strides>: New const bool field.
16416 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16417 prefetch_dynamic_strides.
16418 (exynosm1_prefetch_tune): Likewise.
16419 (thunderxt88_prefetch_tune): Likewise.
16420 (thunderx_prefetch_tune): Likewise.
16421 (thunderx2t99_prefetch_tune): Likewise.
16422 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16423 false.
16424 (aarch64_override_options_internal): Update to set
16425 PARAM_PREFETCH_DYNAMIC_STRIDES.
16426 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16427 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16428 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16429 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16430 prefetch-dynamic-strides setting.
16431
16432 2018-05-23 Luis Machado <luis.machado@linaro.org>
16433
16434 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16435 <minimum_stride>: New const int field.
16436 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16437 minimum_stride field defaulting to -1.
16438 (exynosm1_prefetch_tune): Likewise.
16439 (thunderxt88_prefetch_tune): Likewise.
16440 (thunderx_prefetch_tune): Likewise.
16441 (thunderx2t99_prefetch_tune): Likewise.
16442 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16443 <default_opt_level>: Set to 3.
16444 (aarch64_override_options_internal): Update to set
16445 PARAM_PREFETCH_MINIMUM_STRIDE.
16446 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16447 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16448 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16449 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16450 stride is constant and is below the minimum stride threshold.
16451
16452 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16453
16454 * config/arm/arm-cpus.in (mode26): Delete.
16455 (armv4): Delete mode26 reference.
16456 * config/arm/arm.c (arm_configure_build_target): Delete use of
16457 isa_bit_mode26.
16458
16459 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16460
16461 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16462 New insn pattern.
16463 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16464 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16465 for non-SSE modes.
16466 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16467 (floatunsdidf2): Ditto.
16468
16469 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16470
16471 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16472 (fixuns_trunc<mode>si2_avx512f): Ditto.
16473 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16474 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16475 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16476
16477 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16478
16479 PR rtl-optimization/79985
16480 * df-scan.c (df_insn_refs_collect): Remove special case for
16481 global registers and asm statements.
16482
16483 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16484
16485 * extend.texi (Global Register Variables): Rewrite the bullet list.
16486 Note that the register is available for allocation. Note that access
16487 via inline asm must use constraints. Add note about async-signal
16488 handlers. Remove paragraph about automagic register selection.
16489
16490 2018-05-23 Richard Biener <rguenther@suse.de>
16491
16492 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16493 of fixed offset from memset VN.
16494
16495 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16496
16497 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16498 first_interp field.
16499 (alloc_cand_and_find_basis): Initialize first_interp field.
16500 (slsr_process_mul): Modify first_interp field.
16501 (slsr_process_add): Likewise.
16502 (slsr_process_cast): Modify first_interp field for each new
16503 interpretation.
16504 (slsr_process_copy): Likewise.
16505 (dump_candidate): Dump first_interp field.
16506 (replace_mult_candidate): Process all interpretations, not just
16507 subsequent ones.
16508 (replace_rhs_if_not_dup): Likewise.
16509 (replace_one_candidate): Likewise.
16510
16511 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16512
16513 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16514 Add new boolean.
16515 (aarch64_needs_frame_chain): New function.
16516 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16517
16518 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16519
16520 PR target/84882
16521 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16522 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16523 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16524 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16525 as true for strict-align.
16526 (aarch64_can_inline_p): Perform checks even when callee has no
16527 attributes to check for strict alignment.
16528 * doc/extend.texi (AArch64 Function Attributes): Document
16529 no-strict-align.
16530 * doc/invoke.texi: (AArch64 Options): Likewise.
16531
16532 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16533
16534 PR tree-optimization/85853
16535 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16536 the handling of the root of the node to...
16537 (vect_slp_analyze_node_operations_1): ...this new function,
16538 and run the whole thing with the child nodes' def types
16539 set according to their SLP node's def type.
16540
16541 2018-05-23 Richard Biener <rguenther@suse.de>
16542
16543 PR middle-end/85874
16544 * tree-data-ref.c (create_runtime_alias_checks): Defer
16545 and ignore overflow warnings.
16546
16547 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16548
16549 PR tree-optimization/85822
16550 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16551 constants.
16552
16553 2018-05-23 Richard Biener <rguenther@suse.de>
16554
16555 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16556 memset constants via native_interpret_expr.
16557
16558 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16559
16560 PR target/85345
16561 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16562 attribute.
16563 (cgraph_node::create_alias): Likewise.
16564 (cgraph_node::get_availability): Check ifunc_resolver instead
16565 of looking up ifunc attribute.
16566 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16567 * varasm.c (do_assemble_alias): Likewise.
16568 (assemble_alias): Likewise.
16569 (default_binds_local_p_3): Likewise.
16570 * cgraph.h (cgraph_node): Add ifunc_resolver.
16571 (cgraph_node::only_called_directly_or_aliased_p): Return false
16572 for IFUNC resolver.
16573 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16574 attribute.
16575 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16576 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16577 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16578 instead of looking up ifunc attribute.
16579
16580 2018-05-22 Luis Machado <luis.machado@linaro.org>
16581
16582 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16583
16584 2018-05-22 Martin Sebor <msebor@redhat.com>
16585
16586 PR middle-end/85359
16587 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16588 only when expasion succeeds.
16589 (expand_builtin_strcmp): Same.
16590 (expand_builtin_strncmp): Same.
16591
16592 2018-05-22 Martin Sebor <msebor@redhat.com>
16593
16594 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16595
16596 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16597 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16598
16599 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16600 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16601 code.
16602 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16603 Add check for legitimate_address.
16604 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16605 (aarch64_swap_ldrstr_operands): New.
16606 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16607 Define prototype.
16608
16609 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16610 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16611
16612 * config/aarch64/aarch64.md: New patterns to generate stp
16613 and ldp.
16614 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16615 single words and double words.
16616 (load_pair_sw, load_pair_dw): Likewise.
16617 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16618 Delete.
16619 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16620 Delete.
16621 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16622 for different mode ldpstp and add peephole for merged zero stores.
16623 Likewise for loads.
16624 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16625 Add size check.
16626 (aarch64_gen_store_pair): Rename calls to match new patterns.
16627 (aarch64_gen_load_pair): Rename calls to match new patterns.
16628 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16629 (load_pair<DREG:mode><DREG2:mode>): ... This.
16630 (store_pair<mode>): Rename to...
16631 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16632 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16633 New mode iterators.
16634 (V_INT_EQUIV): Handle SImode.
16635 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16636 New predicate.
16637
16638 2018-05-22 Martin Sebor <msebor@redhat.com>
16639
16640 PR c/85623
16641 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16642 or ajust the presumed bound on an operation to avoid unnecessary
16643 warnings.
16644
16645 2018-05-22 Martin Sebor <msebor@redhat.com>
16646
16647 PR tree-optimization/85826
16648 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16649 assuming that a DECL necesarily has a constant size.
16650
16651 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16652
16653 PR middle-end/85862
16654 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16655
16656 2018-05-22 Richard Biener <rguenther@suse.de>
16657
16658 PR tree-optimization/85834
16659 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16660 non-constant and non-zero memset arguments.
16661
16662 2018-05-22 Martin Liska <mliska@suse.cz>
16663
16664 PR ipa/85607
16665 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16666
16667 2018-05-22 Richard Biener <rguenther@suse.de>
16668
16669 PR tree-optimization/85863
16670 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16671 comparisons when vectype is specified.
16672 (vectorizable_condition): Do not specify vectype for
16673 vect_is_simple_cond when SLP vectorizing.
16674
16675 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16676
16677 PR target/85657
16678 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16679 define __ibm128 as long double.
16680 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16681 as a distinct type when IEEE 128-bit support is enabled.
16682 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16683 128-bit types to use the correct functions.
16684 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16685 convert between 128-bit floating point types that have different
16686 modes but the same representation, instead of using gen_lowpart to
16687 makean alias.
16688 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16689 KFmode.
16690 (IFKF_reg): New attributes to give the register constraints for
16691 IFmode and KFmode.
16692 (extend<mode>tf2_internal): New insns to mark an explicit
16693 conversion between 128-bit floating point types that have a
16694 different mode but share the same representation.
16695
16696 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16697
16698 PR tree-optimization/85814
16699 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16700 a null return from get_strinfo when unsharing the next
16701 strinfo in the chain.
16702
16703 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16704
16705 PR gcc/84923
16706 * varasm.c (weak_finish): Clean up weak_decls.
16707
16708 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16709
16710 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16711 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16712 UNSPEC_UADALP values.
16713 * config/aarch64/iterators.md (ABAL): New int iterator.
16714 (ABDL2): Likewise.
16715 (ADALP): Likewise.
16716 (sur): Add mappings for the above.
16717 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16718 New define_insn.
16719 (aarch64_<sur>abal<mode>_4): Likewise.
16720 (aarch64_<sur>adalp<mode>_3): Likewise.
16721 (<sur>sadv16qi): New define_expand.
16722
16723 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16724
16725 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16726 (*movdf_internal): Ditto.
16727 (*rcpsf2_sse): Ditto.
16728 (*rsqrtsf2_sse): Ditto.
16729 (*sqrt<mode>2_sse): Ditto.
16730
16731 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16732
16733 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16734 eor3q<mode>4.
16735 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16736 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16737 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16738 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16739 vbcaxq_s64): New.
16740 * config/aarch64/arm_neon.h: Likewise.
16741 * config/aarch64/iterators.md (VQ_I): New.
16742
16743 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16744
16745 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16746 arc*-*-linux*.
16747 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16748 MULTILIB_DIRNAMES
16749
16750 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16751
16752 * config/nds32/constraints.md (S): New constraint.
16753 * config/nds32/nds32.md (call_internal): Use constraint S.
16754 (call_value_internal): Likewise.
16755 (sibcall_internal): Likewise.
16756 (sibcall_value_internal): Likewise.
16757
16758 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16759 Chung-Ju Wu <jasonwucj@gmail.com>
16760
16761 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16762 into consideration.
16763
16764 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16765 Chung-Ju Wu <jasonwucj@gmail.com>
16766
16767 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16768 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16769 (nds32_rtx_costs_impl): Simplify.
16770 (nds32_address_cost_impl): Simplify.
16771 (nds32_init_rtx_costs): New function.
16772 (nds32_rtx_costs_speed_prefer): Likewise.
16773 (nds32_rtx_costs_size_prefer): Likewise.
16774 (nds32_address_cost_speed_prefer): Likewise.
16775 (nds32_address_cost_speed_fwprop): Likewise.
16776 (nds32_address_cost_size_prefer): Likewise.
16777 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16778 * config/nds32/nds32.c (nds32_option_override): Use
16779 nds32_init_rtx_costs function.
16780
16781 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16782
16783 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16784 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16785 (TARGET_PIPELINE_N8): Likewise.
16786 (TARGET_PIPELINE_N10): Likewise.
16787 (TARGET_PIPELINE_N13): Likewise.
16788 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16789
16790 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16791
16792 * config/nds32/nds32-fpu.md: Update copyright year.
16793
16794 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16795
16796 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16797
16798 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16799
16800 * config/nds32/nds32.c
16801 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16802 * config/nds32/nds32.opt (minline-asm-r15): New option.
16803
16804 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16805
16806 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16807 MASK_HW_ABS.
16808 * config/nds32/nds32.md (abssi2): New pattern.
16809
16810 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16811
16812 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16813 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16814 Merge insn pattern from sse_cvtsi2ss<round_name> and
16815 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16816 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16817 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16818 using SWI48 mode iterator.
16819 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16820 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16821 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16822 pattern from sse_cvttss2si<round_saeonly_name>
16823 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16824 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16825 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16826 using SWI48 mode iterator.
16827 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16828 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16829 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16830 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16831 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16832 using SWI48 mode iterator.
16833 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16834 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16835 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16836 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16837 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16838 SWI48 mode iterator.
16839 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16840 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16841 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16842 pattern from sse_cvttsd2si<round_saeonly_name>
16843 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16844
16845 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16846
16847 * config/nds32/nds32-md-auxiliary.c
16848 (nds32_valid_smw_lwm_base_p): Refine.
16849 (nds32_output_smw_single_word): Refine.
16850 (nds32_output_smw_double_word): New.
16851 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16852
16853 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16854
16855 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16856 (nds32_output_stack_pop): Refine.
16857 (nds32_expand_unaligned_load): Refine.
16858 (nds32_expand_unaligned_store): Refine.
16859
16860 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16861 Chung-Ju Wu <jasonwucj@gmail.com>
16862
16863 * config/nds32/constants.md: Add TP_REGNUM constant.
16864 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16865 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16866 UNSPEC_ADD32.
16867 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16868 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16869 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16870 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16871 and PIC code generation.
16872 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16873 code generation.
16874 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16875 optimization.
16876 * config/nds32/nds32.md: Support TLS and PIC.
16877 * config/nds32/nds32.c: Support TLS and PIC.
16878 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16879 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16880 predicate.
16881
16882 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16883
16884 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16885 mode with E_ prefix.
16886
16887 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16888 Chung-Ju Wu <jasonwucj@gmail.com>
16889
16890 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16891 * config/nds32/nds32-md-auxiliary.c
16892 (symbolic_reference_mentioned_p): New.
16893 (nds32_legitimize_ict_address): New.
16894 (nds32_expand_ict_move): New.
16895 (nds32_indirect_call_referenced_p): New.
16896 (nds32_symbol_binds_local_p): Delete.
16897 (nds32_long_call_p): Modify.
16898 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16899 * config/nds32/nds32-protos.h
16900 (symbolic_reference_mentioned_p): Declare.
16901 (nds32_legitimize_ict_address): Declare.
16902 (nds32_expand_ict_move): Declare.
16903 (nds32_indirect_call_referenced_p): Declare.
16904 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16905 (nds32_relax_group): Use nds32_ict_const_p as condition.
16906 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16907 (nds32_asm_file_start): Output ict_model directive in asm code.
16908 (nds32_legitimate_address_p): Consider indirect call.
16909 (nds32_print_operand): Consider indirect call.
16910 (nds32_print_operand_address): Consider indirect call.
16911 (nds32_insert_attributes): Handle "indirect_call" attribute.
16912 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16913 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16914 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16915 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16916 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16917 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16918 (TARGET_ICT_MODEL_SMALL): Define.
16919 (TARGET_ICT_MODEL_LARGE): Define.
16920 * config/nds32/nds32.md (movsi): Consider ict model.
16921 (call, call_value): Consider ict model.
16922 (sibcall, sibcall_value): Consider ict model.
16923 * config/nds32/nds32.opt (mict-model): New option.
16924 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16925 model.
16926
16927 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16928 Monk Chiang <sh.chiang04@gmail.com>
16929 Jim Wilson <jimw@sifive.com>
16930
16931 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16932 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16933 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16934 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16935 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16936 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16937 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16938 compute save_libcall_adjustment properly.
16939 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16940 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16941 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16942 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16943 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16944 (ABI_SPEC): Handle mabi=ilp32e.
16945 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16946 (RVE): Add RVE mask.
16947 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16948 <-march>: Add rv32e as an example.
16949
16950 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16951
16952 PR c++/82899
16953 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16954 (intra_create_variable_infos): Handle C++ constructors.
16955
16956 2018-05-18 Martin Liska <mliska@suse.cz>
16957
16958 * passes.def: Remove a redundant pass.
16959
16960 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16961
16962 PR bootstrap/85838
16963 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16964
16965 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16966
16967 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16968 (ARMv4): Update.
16969 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16970 (ARMv6m): Update.
16971 (armv2, armv2a, armv3, armv3m): Delete architectures.
16972 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16973 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16974 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16975 Delete cpus.
16976 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16977 (*mulsidi3adddi): Likewise.
16978 (mulsidi3): Likewise.
16979 (*mulsidi3_nov6): Likewise.
16980 (umulsidi3): Likewise.
16981 (umulsidi3_nov6): Likewise.
16982 (umaddsidi4): Likewise.
16983 (*umulsidi3adddi): Likewise.
16984 (smulsi3_highpart): Likewise.
16985 (*smulsi3_highpart_nov6): Likewise.
16986 (umulsi3_highpart): Likewise.
16987 (*umulsi3_highpart_nov6): Likewise.
16988 * config/arm/arm.h (arm_arch3m): Delete.
16989 * config/arm/arm.c (arm_arch3m): Delete.
16990 (arm_option_override_internal): Update armv3-related comment.
16991 (arm_configure_build_target): Delete use of isa_bit_mode32.
16992 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16993 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16994 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16995 (mulsa3): Likewise.
16996 (mulusa3): Likewise.
16997 * config/arm/arm-protos.h (arm_arch3m): Delete.
16998 * config/arm/arm-tables.opt: Regenerate.
16999 * config/arm/arm-tune.md: Likewise.
17000 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
17001 deleted architectures.
17002
17003 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17004
17005 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
17006 (armv5t, armv5te): New features.
17007 (ARMv5, ARMv5e): Delete fgroups.
17008 (ARMv5t, ARMv5te): Adjust for above changes.
17009 (ARMv6m): Likewise.
17010 (armv5, armv5e): Delete arches.
17011 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
17012 arm_arch5.
17013 (*call_reg_arm): Likewise.
17014 (*call_value_reg_armv5): Likewise.
17015 (*call_value_reg_arm): Likewise.
17016 (*call_symbol): Likewise.
17017 (*call_value_symbol): Likewise.
17018 (*sibcall_insn): Likewise.
17019 (*sibcall_value_insn): Likewise.
17020 (clzsi2): Likewise.
17021 (prefetch): Likewise.
17022 (define_split and define_peephole2 dependent on arm_arch5):
17023 Likewise.
17024 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
17025 arm_arch5e.
17026 (TARGET_ARM_QBIT): Likewise.
17027 (TARGET_DSP_MULTIPLY): Likewise.
17028 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
17029 (arm_arch5, arm_arch5e): Delete.
17030 (arm_arch5t, arm_arch5te): Declare.
17031 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
17032 (arm_arch5t): Declare.
17033 (arm_option_reconfigure_globals): Update for the above.
17034 (arm_options_perform_arch_sanity_checks): Update comment, replace
17035 use of arm_arch5 with arm_arch5t.
17036 (use_return_insn): Likewise.
17037 (arm_emit_call_insn): Likewise.
17038 (output_return_instruction): Likewise.
17039 (arm_final_prescan_insn): Likewise.
17040 (arm_coproc_builtin_available): Likewise.
17041 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
17042 arm_arch5e with arm_arch5t and arm_arch5te.
17043 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
17044 (arm_arch5t, arm_arch5te): Declare.
17045 * config/arm/arm-tables.opt: Regenerate.
17046 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
17047 * config/arm/t-multilib: Likewise.
17048 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
17049 instead of arm_arch5.
17050 (*call_reg_thumb1): Likewise.
17051 (*call_value_reg_thumb1_v5): Likewise.
17052 (*call_value_reg_thumb1): Likewise.
17053 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
17054 unreachable path.
17055 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
17056
17057 2018-05-18 Martin Liska <mliska@suse.cz>
17058
17059 PR gcov-profile/84846
17060 * doc/gcov.texi: Document -t option of gcov tool.
17061
17062 2018-05-18 Martin Liska <mliska@suse.cz>
17063
17064 PR gcov-profile/84846
17065 * gcov.c (print_usage): Add new -t option.
17066 (process_args): Handle the option.
17067 (generate_results): Use stdout as output when requested by
17068 the option.
17069
17070 2018-05-18 Martin Liska <mliska@suse.cz>
17071
17072 PR gcov-profile/84846
17073 * coverage.c (coverage_init): Write PWD to .gcno file.
17074 * doc/gcov.texi: Document how working directory is printed.
17075 * gcov-dump.c (dump_gcov_file): Print PWD.
17076 * gcov.c (output_intermediate_file): Likewise.
17077 (read_graph_file): Read PWD string.
17078 (output_lines): Print PWD.
17079
17080 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17081
17082 PR middle-end/85817
17083 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
17084 for retval and return false if all args to phi are zero.
17085
17086 2018-05-18 Richard Biener <rguenther@suse.de>
17087
17088 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
17089 method.
17090 (evrp_dom_walker::before_dom_children): Call it.
17091
17092 2018-05-18 Richard Biener <rguenther@suse.de>
17093
17094 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
17095 results when processing array refs with variable index.
17096
17097 2018-05-18 Toon Moene <toon@moene.org>
17098
17099 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
17100 directly after that of -floop-interchange. Indicate that both
17101 options are enabled by default when specifying -O3.
17102
17103 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17104
17105 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
17106 iterator. Delete separate integer-mode vec_set<mode> expander.
17107 (aarch64_simd_vec_setv2di): Delete.
17108 (vec_setv2di): Delete.
17109 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
17110 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
17111 the "w, r" alternative.
17112
17113 2018-05-18 Martin Liska <mliska@suse.cz>
17114
17115 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
17116 * tree-pass.h (make_pass_lower_switch_O0): New function.
17117 * tree-switch-conversion.c (node_has_low_bound): Remove.
17118 (node_has_high_bound): Likewise.
17119 (node_is_bounded): Likewise.
17120 (class pass_lower_switch): Make it a template type and create
17121 two instances.
17122 (pass_lower_switch::execute): Add template argument.
17123 (make_pass_lower_switch): New function.
17124 (make_pass_lower_switch_O0): New function.
17125 (do_jump_if_equal): Remove.
17126 (emit_case_nodes): Simplify to just handle all 3 cases and leave
17127 all the hard work to tree optimization passes.
17128
17129 2018-05-18 Martin Liska <mliska@suse.cz>
17130
17131 * dbgcnt.c (limit_low): Renamed from limit.
17132 (limit_high): New variable.
17133 (dbg_cnt_is_enabled): Check for upper limit.
17134 (dbg_cnt): Adjust dumping.
17135 (dbg_cnt_set_limit_by_index): Add new argument for high
17136 value.
17137 (dbg_cnt_set_limit_by_name): Likewise.
17138 (dbg_cnt_process_single_pair): Parse new format.
17139 (dbg_cnt_process_opt): Use strtok.
17140 (dbg_cnt_list_all_counters): Remove 'value' and add
17141 'limit_high'.
17142 * doc/invoke.texi: Document changes.
17143
17144 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
17145
17146 * doc/sourcebuild.texi (scalar_all_fma): Document.
17147 * tree.def (FMA_EXPR): Delete.
17148 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
17149 * internal-fn.c (ternary_direct): New macro.
17150 (expand_ternary_optab_fn): Likewise.
17151 (direct_ternary_optab_supported_p): Likewise.
17152 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
17153 * builtins.c (fold_builtin_fma): Delete.
17154 (fold_builtin_3): Don't call it.
17155 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
17156 * expr.c (expand_expr_real_2): Likewise.
17157 * fold-const.c (operand_equal_p): Likewise.
17158 (fold_ternary_loc): Likewise.
17159 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
17160 * gimple.c (DEFTREECODE): Likewise.
17161 * gimplify.c (gimplify_expr): Likewise.
17162 * optabs-tree.c (optab_for_tree_code): Likewise.
17163 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17164 * tree-eh.c (operation_could_trap_p): Likewise.
17165 (stmt_could_throw_1_p): Likewise.
17166 * tree-inline.c (estimate_operator_cost): Likewise.
17167 * tree-pretty-print.c (dump_generic_node): Likewise.
17168 (op_code_prio): Likewise.
17169 * tree-ssa-loop-im.c (stmt_cost): Likewise.
17170 * tree-ssa-operands.c (get_expr_operands): Likewise.
17171 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
17172 * fold-const-call.h (fold_fma): Delete.
17173 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
17174 CFN_FNMA and CFN_FNMS.
17175 (fold_fma): Delete.
17176 * genmatch.c (combined_fn): New enum.
17177 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
17178 (commutative_op): New function.
17179 (commutate): Use it. Handle more than 2 operands.
17180 (dt_operand::gen_gimple_expr): Use commutative_op.
17181 (parser::parse_expr): Allow :c to be used with non-binary
17182 operators if the commutative operand is known.
17183 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
17184 CFN_FMS, CFN_FNMA and CFN_FNMS.
17185 (backprop::process_assign_use): Remove FMA_EXPR handling.
17186 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
17187 (gen_hsa_fma): New function.
17188 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
17189 IFN_FNMA and IFN_FNMS.
17190 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
17191 * gimple-fold.h (follow_all_ssa_edges): Declare.
17192 * gimple-fold.c (follow_all_ssa_edges): New function.
17193 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
17194 gimple_build interface and use follow_all_ssa_edges to fold the result.
17195 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
17196 instead of checking for optabs directly.
17197 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
17198 rather than FMA_EXPRs.
17199 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
17200 call to IFN_FMA instead of an FMA_EXPR.
17201
17202 2018-05-17 Jim Wilson <jimw@sifive.com>
17203
17204 * expr.c (do_tablejump): When converting index to Pmode, if we have a
17205 sign extended promoted subreg, and the range does not have the sign bit
17206 set, then do a sign extend.
17207
17208 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
17209 test, check for sign extended subreg and/or constant operands, and
17210 do a sign extend in that case.
17211
17212 2018-05-17 Steve Ellcey <sellcey@cavium.com>
17213
17214 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
17215 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
17216 Add untyped.
17217 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
17218 Change logics_shift_reg to logics_shift_imm.
17219 (thunderx2t99_fp_loadpair_basic): Delete.
17220 (thunderx2t99_fp_storepair_basic): Delete.
17221 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
17222 (thunderx2t99_asimd_polynomial): Delete.
17223 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
17224 and neon_fp_mul_d_scalar_q.
17225 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
17226 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
17227 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
17228 (thunderx2t99_asimd_lut): Add missing tbl types.
17229 (thunderx2t99_asimd_ext): Delete.
17230 (thunderx2t99_asimd_load1_1_mult): Delete.
17231 (thunderx2t99_asimd_load1_2_mult): Delete.
17232 (thunderx2t99_asimd_load1_ldp): New.
17233 (thunderx2t99_asimd_load1): New.
17234 (thunderx2t99_asimd_load2): Add missing *load2* types.
17235 (thunderx2t99_asimd_load3): New.
17236 (thunderx2t99_asimd_load4): New.
17237 (thunderx2t99_asimd_store1_1_mult): Delete.
17238 (thunderx2t99_asimd_store1_2_mult): Delete.
17239 (thunderx2t99_asimd_store2_mult): Delete.
17240 (thunderx2t99_asimd_store2_onelane): Delete.
17241 (thunderx2t99_asimd_store_stp): New.
17242 (thunderx2t99_asimd_store1): New.
17243 (thunderx2t99_asimd_store2): New.
17244 (thunderx2t99_asimd_store3): New.
17245 (thunderx2t99_asimd_store4): New.
17246
17247 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
17248
17249 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17250 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
17251
17252 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
17253 Segher Boessenkool <segher@kernel.crashing.org>
17254
17255 PR target/85698
17256 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17257 operand.
17258
17259 2018-05-17 Richard Biener <rguenther@suse.de>
17260
17261 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17262 for pruning loop and prune defs feeding only already visited PHIs.
17263
17264 2018-05-17 Richard Biener <rguenther@suse.de>
17265
17266 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17267
17268 2018-05-17 Bin Cheng <bin.cheng@arm.com>
17269 Richard Biener <rguenther@suse.de>
17270
17271 PR tree-optimization/85793
17272 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17273 for VMAT_ELEMENTWISE.
17274
17275 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17276
17277 * internal-fn.h (lookup_internal_fn): Declare
17278 * internal-fn.c (lookup_internal_fn): New function.
17279 * gimple.c (gimple_build_call_from_tree): Handle calls to
17280 internal functions.
17281 * gimple-pretty-print.c (dump_gimple_call): Print "." before
17282 internal function names.
17283 * tree-pretty-print.c (dump_generic_node): Likewise.
17284 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17285
17286 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17287
17288 * gimple-fold.h (gimple_build): Make the function forms take
17289 combined_fn rather than built_in_function.
17290 (gimple_simplify): Likewise.
17291 * gimple-match-head.c (gimple_simplify): Likewise.
17292 * gimple-fold.c (gimple_build): Likewise.
17293 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17294 rather than gimple_build_call_internal.
17295 (get_initial_defs_for_reduction): Likewise.
17296 (vect_create_epilog_for_reduction): Likewise.
17297 (vectorizable_live_operation): Likewise.
17298
17299 2018-05-17 Martin Liska <mliska@suse.cz>
17300
17301 * gimple-ssa-sprintf.c (format_directive): Do not use
17302 space in between 'G_' and '('.
17303
17304 2018-05-17 Jakub Jelinek <jakub@redhat.com>
17305
17306 PR target/85323
17307 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17308 even if the mask is not all ones.
17309
17310 PR target/85323
17311 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17312 vector.
17313 (ix86_gimple_fold_builtin): Likewise.
17314
17315 PR target/85323
17316 * config/i386/i386.c: Include tree-vector-builder.h.
17317 (ix86_vector_shift_count): New function.
17318 (ix86_fold_builtin): Fold shift builtins by scalar count.
17319 (ix86_gimple_fold_builtin): Likewise.
17320
17321 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17322 _mm512_setzero): New intrinsics.
17323
17324 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
17325 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17326
17327 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17328 code generation for cases where splatting a value is not useful.
17329 * simplify-rtx.c (simplify_ternary_operation): Simplify
17330 vec_merge across a vec_duplicate and a paradoxical subreg forming
17331 a vector mode to a vec_concat.
17332
17333 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
17334
17335 * config.gcc: Support "goldmont-plus".
17336 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17337 "goldmont-plus".
17338 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17339 PROCESSOR_GOLDMONT_PLUS.
17340 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17341 (processor_target_table): Add "goldmont-plus".
17342 (PTA_GOLDMONT_PLUS): Define.
17343 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17344 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17345 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17346 (fold_builtin_cpu): Add "goldmont-plus".
17347 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17348 (ix86_option_override_internal): Add "goldmont-plus".
17349 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17350 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17351 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17352 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17353
17354 2018-05-17 Richard Biener <rguenther@suse.de>
17355
17356 PR tree-optimization/85757
17357 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17358 remove defs that only feed that PHI from further processing.
17359
17360 2018-05-16 Jim Wilson <jimw@sifive.com>
17361
17362 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17363 asterisk to name.
17364 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17365
17366 2018-05-16 Mark Wielaard <mark@klomp.org>
17367
17368 * dwarf2out.c (count_index_strings): New function.
17369 (output_indirect_strings): Call count_index_strings and generate
17370 header for dwarf_version >= 5.
17371
17372 2018-05-16 Mark Wielaard <mark@klomp.org>
17373
17374 * dwarf2out.c (dwarf_FORM): New function.
17375 (set_indirect_string): Use dwarf_FORM.
17376 (reset_indirect_string): Likewise.
17377 (size_of_die): Likewise.
17378 (value_format): Likewise.
17379 (output_die): Likewise.
17380 (add_skeleton_AT_string): Likewise.
17381 (output_macinfo_op): Likewise.
17382 (index_string): Likewise.
17383 (output_index_string_offset): Likewise.
17384 (output_index_string): Likewise.
17385 (count_index_strings): Likewise.
17386
17387 2018-05-16 Carl Love <cel@us.ibm.com>
17388
17389 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17390 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17391
17392 2018-05-16 Martin Jambor <mjambor@suse.cz>
17393
17394 * ipa-prop.c (ipa_free_all_edge_args): Remove.
17395 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17396
17397 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
17398
17399 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17400 (fnma<mode>4): Likewise.
17401 (fms<mode>4): Likewise.
17402 (fnms<mode>4): Likewise.
17403 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17404 (aarch64_fnma<mode>4): Likewise.
17405 (aarch64_fms<mode>4): Likewise.
17406 (aarch64_fnms<mode>4): Likewise.
17407 (aarch64_fnmadd<mode>4): Likewise.
17408
17409 2018-05-16 Jason Merrill <jason@redhat.com>
17410
17411 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
17412
17413 2018-05-16 Richard Biener <rguenther@suse.de>
17414
17415 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17416 (dump_stmt_cost): Declare.
17417 (add_stmt_cost): Dump cost we add.
17418 (add_stmt_costs): New function.
17419 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17420 No longer exported.
17421 (vect_analyze_stmt): Adjust prototype.
17422 (vectorizable_condition): Likewise.
17423 (vectorizable_live_operation): Likewise.
17424 (vectorizable_reduction): Likewise.
17425 (vectorizable_induction): Likewise.
17426 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17427 cost vector to pass to vectorizable_ and record afterwards.
17428 (vect_model_reduction_cost): Take cost vector argument and adjust.
17429 (vect_model_induction_cost): Likewise.
17430 (vectorizable_reduction): Likewise.
17431 (vectorizable_induction): Likewise.
17432 (vectorizable_live_operation): Likewise.
17433 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17434 SLP_TREE_NUMBER_OF_VEC_STMTS.
17435 (vect_analyze_slp_cost_1): Remove.
17436 (vect_analyze_slp_cost): Likewise.
17437 (vect_slp_analyze_node_operations): Take visited args and
17438 a target cost vector. Avoid processing already visited stmt sets.
17439 (vect_slp_analyze_operations): Use a local cost vector to gather
17440 costs and register those of non-discarded instances.
17441 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17442 (vect_schedule_slp_instance): Remove copying of
17443 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
17444 zero.
17445 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17446 adding cost. Record cost entry location.
17447 (vect_prologue_cost_for_slp_op): Function to compute cost of
17448 a constant or invariant generated for SLP vect in the prologue,
17449 split out from vect_analyze_slp_cost_1.
17450 (vect_model_simple_cost): Make static. Adjust for SLP costing.
17451 (vect_model_promotion_demotion_cost): Likewise.
17452 (vect_model_store_cost): Likewise, make static.
17453 (vect_model_load_cost): Likewise.
17454 (vectorizable_bswap): Add cost vector arg and adjust.
17455 (vectorizable_call): Likewise.
17456 (vectorizable_simd_clone_call): Likewise.
17457 (vectorizable_conversion): Likewise.
17458 (vectorizable_assignment): Likewise.
17459 (vectorizable_shift): Likewise.
17460 (vectorizable_operation): Likewise.
17461 (vectorizable_store): Likewise.
17462 (vectorizable_load): Likewise.
17463 (vectorizable_condition): Likewise.
17464 (vectorizable_comparison): Likewise.
17465 (can_vectorize_live_stmts): Likewise.
17466 (vect_analyze_stmt): Likewise.
17467 (vect_transform_stmt): Adjust calls to vectorizable_*.
17468 * tree-vectorizer.c: Include gimple-pretty-print.h.
17469 (dump_stmt_cost): New function.
17470
17471 2018-05-16 Richard Biener <rguenther@suse.de>
17472
17473 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17474 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17475 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17476 (check_name): New callback.
17477 (dse_classify_store): Track cycles via a visited bitmap of PHI
17478 defs and simplify handling of in-loop and across loop dead stores
17479 and properly fail for loop-variant refs. Handle byte-tracking with
17480 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17481 limiting the walk.
17482
17483 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17484
17485 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17486 (vect_get_mask_type_for_stmt): Likewise.
17487 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17488 split out from...
17489 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17490 to determine the statement's vector type and the vector type that
17491 should be used for calculating nunits. Deal with cases in which
17492 the type has to be deferred.
17493 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17494 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17495 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17496 (vect_determine_vf_for_stmt): New functions, split out from...
17497 (vect_determine_vectorization_factor): ...here.
17498 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17499 (vect_get_mask_type_for_stmt): New functions, split out from
17500 vect_determine_vectorization_factor.
17501
17502 2018-05-16 Richard Biener <rguenther@suse.de>
17503
17504 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17505 verify the [VEC_]COND_EXPR embedded comparison.
17506
17507 2018-05-15 Martin Sebor <msebor@redhat.com>
17508
17509 PR tree-optimization/85753
17510 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17511 RECORD_TYPE in addition to ARRAY_TYPE.
17512
17513 2018-05-15 Martin Sebor <msebor@redhat.com>
17514
17515 PR middle-end/85643
17516 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17517
17518 2018-05-15 Richard Biener <rguenther@suse.de>
17519
17520 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17521 add by_clobber_p one. Change algorithm to collect all defs
17522 representing uses we need to walk and try reducing them to
17523 a single one before failing.
17524 (dse_dom_walker::dse_optimize_stmt): Adjust.
17525
17526 2018-05-13 Mark Wielaard <mark@klomp.org>
17527
17528 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17529 (size_of_loc_descr): Likewise.
17530 (output_loc_operands): Likewise.
17531 (output_loc_operands_raw): Likewise.
17532 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17533 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17534 (hash_loc_operands): Likewise.
17535 (compare_loc_operands): Likewise.
17536
17537 2018-05-14 Mark Wielaard <mark@klomp.org>
17538
17539 * dwarf2out.c (count_index_addrs): New function.
17540 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17541
17542 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17543
17544 PR tree-optimization/83648
17545 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17546 return value as malloc candidate.
17547
17548 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17549
17550 PR ipa/85734
17551 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17552 param as true in call to suggest_attribute.
17553
17554 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17555
17556 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17557 -mreadonly-in-sdata.
17558
17559 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17560
17561 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17562 New pattern.
17563 (aarch64_crypto_aesd_fused): Likewise.
17564
17565 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17566
17567 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17568 (movsi_aarch64): Likewise.
17569 (load_pairsi): Likewise.
17570 (load_pairdi): Likewise.
17571 (store_pairsi): Likewise.
17572 (store_pairdi): Likewise.
17573 (load_pairsf): Likewise.
17574 (load_pairdf): Likewise.
17575 (store_pairsf): Likewise.
17576 (store_pairdf): Likewise.
17577 (zero_extend): Likewise.
17578 (trunc): Swap alternatives.
17579 (fcvt_target): Add '?' to prefer w over r.
17580
17581 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17582
17583 PR target/85756
17584 * config/i386/i386.md: Disallow non-commutative arithmetics in
17585 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17586 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17587 in the peephole2 before it.
17588
17589 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17590
17591 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17592 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17593 (ix86_handle_option): Handle -mcldemote.
17594 * config.gcc: New header.
17595 * config/i386/cldemoteintrin.h: New file.
17596 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17597 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17598 -mcldemote.
17599 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17600 OPTION_MASK_ISA_CLDEMOTE.
17601 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17602 (ix86_valid_target_attribute_inner_p): Ditto.
17603 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17604 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17605 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17606 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17607 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17608 (cldemote): New.
17609 * config/i386/i386.opt: Add -mcldemote.
17610 * config/i386/x86intrin.h: New header.
17611 * doc/invoke.texi: Add -mcldemote.
17612
17613 2018-05-14 Richard Biener <rguenther@suse.de>
17614
17615 * doc/match-and-simplify.texi: Adjust :s documentation.
17616
17617 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17618
17619 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17620 intended memcpy size.
17621 (REORDER_45): Likewise.
17622
17623 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17624
17625 * sort.cc: New file.
17626 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17627 * vec.c (qsort_chk): Use gcc_qsort.
17628 * Makefile.in (OBJS-libcommon): Add sort.o.
17629 (build/sort.o): New target. Use it...
17630 (BUILD_RTL): ... here, and...
17631 (build/gencfn-macros): ... here, and...
17632 (build/genmatch): ... here.
17633
17634 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17635 Chung-Ju Wu <jasonwucj@gmail.com>
17636
17637 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17638 * config/nds32/nds32-graywolf.md: New file.
17639 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17640 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17641 pipeline.
17642 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17643 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17644 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17645 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17646 * config/nds32/pipelines.md: Include n15 settings.
17647
17648 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17649 Chung-Ju Wu <jasonwucj@gmail.com>
17650
17651 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17652 * config/nds32/nds32-n13.md: New file.
17653 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17654 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17655 pipeline.
17656 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17657 * config/nds32/nds32.md (pipeline_model): Add n13.
17658 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17659 * config/nds32/pipelines.md: Include n13 settings.
17660
17661 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17662 Chung-Ju Wu <jasonwucj@gmail.com>
17663
17664 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17665 * config/nds32/nds32-n10.md: New file.
17666 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17667 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17668 pipeline.
17669 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17670 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17671 * config/nds32/nds32.md (pipeline_model): Add n10.
17672 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17673 * config/nds32/pipelines.md: Include n10 settings.
17674
17675 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17676 Kito Cheng <kito.cheng@gmail.com>
17677 Chung-Ju Wu <jasonwucj@gmail.com>
17678
17679 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17680 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17681 Add enum values for DSP extension instructions.
17682 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17683 New constraints.
17684 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17685 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17686 New code iterators.
17687 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17688 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17689 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17690 * config/nds32/nds32-intrinsic.md: Likewise.
17691 * config/nds32/nds32_intrinsic.h: Likewise.
17692 * config/nds32/nds32-md-auxiliary.c: Likewise.
17693 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17694 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17695 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17696 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17697 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17698 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17699 TYPE_DMAC in switch statement.
17700 * config/nds32/nds32.c: New checking and implementation for DSP
17701 extension instructions.
17702 * config/nds32/nds32.h: Likewise.
17703 * config/nds32/nds32.md: Likewise.
17704 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17705 * config/nds32/predicates.md: Implement new predicates for DSP
17706 extension.
17707
17708 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17709
17710 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17711 Reformat alternatives and attributes so it is easier to identify
17712 which constraints/attributes go with which instruction.
17713 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17714 (mov<mode>_softfloat32, FMOVE64): Likewise.
17715 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17716 (mov<mode>_softfloat64, FMOVE64): Likewise.
17717
17718 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17719
17720 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17721 subsection.
17722 (Basic PowerPC Built-in Functions): The new name of the
17723 subsection previously known as "PowerPC Built-in Functions".
17724 (Basic PowerPC Built-in Functions Available on all Configurations):
17725 New subsubsection.
17726 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17727 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17728 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17729 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17730
17731 2018-05-11 Martin Jambor <mjambor@suse.cz>
17732
17733 PR ipa/85655
17734 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17735 single const.
17736
17737 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17738
17739 PR target/85733
17740 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17741
17742 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17743
17744 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17745 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17746 (ix86_handle_option): Handle -mwaitpkg.
17747 * config.gcc: New header.
17748 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17749 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17750 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17751 function type.
17752 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17753 OPTION_MASK_ISA_WAITPKG.
17754 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17755 (ix86_option_override_internal): Add PTA_WAITPKG.
17756 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17757 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17758 IX86_BUILTIN_TPAUSE.
17759 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17760 __builtin_ia32_umwait and __builtin_ia32_tpause.
17761 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17762 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17763 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17764 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17765 UNSPECV_TPAUSE): New.
17766 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17767 * config/i386/i386.opt: Add -mwaitpkg.
17768 * config/i386/waitpkgintrin.h: New file.
17769 * config/i386/x86intrin.h: New header.
17770 * doc/invoke.texi: Add -mwaitpkg.
17771
17772 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17773
17774 PR target/85606
17775 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17776 equivalent.
17777 (cortex-m0): Use armv6s-m isa.
17778 (cortex-m0plus): Likewise.
17779 (cortex-m1): Likewise.
17780 (cortex-m0.small-multiply): Likewise.
17781 (cortex-m0plus.small-multiply): Likewise.
17782 (cortex-m1.small-multiply): Likewise.
17783
17784 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17785 Jakub Jelinek <jakub@redhat.com>
17786
17787 PR tree-optimization/85692
17788 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17789 source permute as well.
17790
17791 2018-05-11 Martin Liska <mliska@suse.cz>
17792
17793 PR sanitizer/85556
17794 * doc/extend.texi: Document LLVM style format for no_sanitize
17795 attribute.
17796
17797 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17798
17799 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17800 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17801 (mode_supports_vsx_dform_quad): Likewise.
17802 (mode_supports_vmx_dform): Move these functions to be next to the
17803 other mode_supports functions.
17804 (mode_supports_dq_form): Likewise.
17805 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17806 mode_supports_dq_form.
17807 (reg_offset_addressing_ok_p): Likewise.
17808 (offsettable_ok_by_alignment): Likewise.
17809 (rs6000_legitimate_offset_address_p): Likewise.
17810 (legitimate_lo_sum_address_p): Likewise.
17811 (rs6000_legitimize_address): Likewise.
17812 (rs6000_legitimize_reload_address): Likewise.
17813 (rs6000_secondary_reload_inner): Likewise.
17814 (rs6000_preferred_reload_class): Likewise.
17815 (rs6000_output_move_128bit): Likewise.
17816
17817 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17818
17819 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17820 Generate SImode target register for null target.
17821 <case IX86_BUILTIN_XGETBV>: Ditto.
17822 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17823 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17824
17825 2018-05-10 Carl Love <cel@us.ibm.com>
17826
17827 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17828 dcbtt and dcbtstt if operands[2] is 0.
17829
17830 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17831
17832 PR target/85693
17833 * config/i386/sse.md (usadv64qi): New expander.
17834
17835 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17836
17837 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17838 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17839 -maltivec=be support.
17840 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17841 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17842 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17843 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17844 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17845 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17846 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17847 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17848 altivec_vsumsws): Adjust.
17849 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17850 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17851 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17852 support.
17853 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17854 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17855 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17856 (altivec_lve<VI_char>x): Delete expand.
17857 (*altivec_lve<VI_char>x_internal): Rename to...
17858 (altivec_lve<VI_char>x): ... this.
17859 (altivec_lvxl_<mode>): Delete expand.
17860 (*altivec_lvxl_<mode>_internal): Rename to ...
17861 (altivec_lvxl_<mode>): ... this.
17862 (altivec_stvxl_<mode>): Delete expand.
17863 (*altivec_stvxl_<mode>_internal): Rename to ...
17864 (altivec_stvxl_<mode>): ... this.
17865 (altivec_stve<VI_char>x): Delete expand.
17866 (*altivec_stve<VI_char>x_internal): Rename to ...
17867 (altivec_stve<VI_char>x): ... this.
17868 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17869 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17870 reduc_plus_scal_<mode>): Adjust.
17871 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17872 comment.
17873 (rs6000_cpu_cpp_builtins): Adjust.
17874 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17875 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17876 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17877 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17878 -maltivec=be support.
17879 (rs6000_split_vec_extract_var): Adjust.
17880 (rs6000_split_v4si_init): Adjust.
17881 (swap_selector_for_mode): Delete.
17882 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17883 altivec_expand_stvex_be): Delete.
17884 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17885 -maltivec=be support.
17886 (rs6000_gimple_fold_builtin): Ditto.
17887 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17888 Adjust.
17889 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17890 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17891 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17892 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17893 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17894 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17895 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17896 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17897 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17898 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17899 anonymous split): Adjust.
17900 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17901 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17902
17903 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17904
17905 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17906 when --with-gxx-include-dir is also specified.
17907 * configure: Regenerate.
17908
17909 2018-05-09 Jim Wilson <jimw@sifive.com>
17910
17911 PR target/84797
17912 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17913 * config/riscv/t-withmultilib: New.
17914 * config/riscv/withmultilib.h: New.
17915 * doc/install.texi: Document RISC-V --with-multilib-list support.
17916
17917 2018-05-09 Richard Biener <rguenther@suse.de>
17918
17919 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17920 vector.
17921 (vect_bb_vectorization_profitable_p): Adjust. Compute
17922 actual scalar cost using the cost vector and the add_stmt_cost
17923 machinery.
17924
17925 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17926
17927 PR rtl-optimization/85645
17928 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17929 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17930
17931 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17932
17933 PR rtl-optimization/85645
17934 * shrink-wrap.c (spread_components): Return a boolean saying if
17935 anything was changed.
17936 (try_shrink_wrapping_separate): Iterate spread_components until
17937 nothing changes anymore.
17938
17939 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17940
17941 PR rtl-optimization/85645
17942 * regrename.c (build_def_use): Also kill the chains that include the
17943 destination of a REG_CFA_REGISTER note.
17944
17945 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17946
17947 PR rtl-optimization/85645
17948 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17949 insn that has a REG_CFA_REGISTER note.
17950
17951 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17952
17953 * cfgexpand.c (expand_clobber): New function.
17954 (expand_gimple_stmt_1): Use it.
17955 * tree-vect-stmts.c (vect_clobber_variable): New function,
17956 split out from...
17957 (vectorizable_simd_clone_call): ...here.
17958 (vectorizable_store): Emit a clobber either side of an
17959 IFN_STORE_LANES sequence.
17960 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17961
17962 2018-05-09 Tom de Vries <tom@codesourcery.com>
17963
17964 PR target/85626
17965 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17966 (define_insn "trap_if_false"): Add exit after trap.
17967
17968 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17969
17970 PR rtl-optimization/85638
17971 * bb-reorder.c: Include common/common-target.h.
17972 (create_forwarder_block): New function extracted from...
17973 (fix_up_crossing_landing_pad): ...here. Rename into...
17974 (dw2_fix_up_crossing_landing_pad): ...this.
17975 (sjlj_fix_up_crossing_landing_pad): New function.
17976 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17977 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17978 from both partitions and exit the loop after one iteration.
17979
17980 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17981
17982 Revert:
17983 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17984 subsection.
17985 (Basic PowerPC Built-in Functions): The new name of the
17986 subsection previously known as "PowerPC Built-in Functions".
17987 (Basic PowerPC Built-in Functions Available on all Configurations):
17988 New subsubsection.
17989 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17990 subsubsection.
17991 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17992 subsubsection.
17993 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17994 subsubsection.
17995 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17996 subsubsection.
17997
17998 2018-05-08 Jim Wilson <jimw@sifive.com>
17999
18000 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
18001 (LD_EMUL_SUFFIX): New.
18002 (LINK_SPEC): Use it.
18003
18004 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18005
18006 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18007 subsection.
18008 (Basic PowerPC Built-in Functions): The new name of the
18009 subsection previously known as "PowerPC Built-in Functions".
18010 (Basic PowerPC Built-in Functions Available on all Configurations):
18011 New subsubsection.
18012 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18013 subsubsection.
18014 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18015 subsubsection.
18016 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18017 subsubsection.
18018 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18019 subsubsection.
18020
18021 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18022
18023 PR target/85683
18024 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
18025 after cmpelim optimization.
18026
18027 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
18028
18029 * config.gcc: Support "goldmont".
18030 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
18031 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18032 PROCESSOR_GOLDMONT.
18033 * config/i386/i386.c (m_GOLDMONT): Define.
18034 (processor_target_table): Add "goldmont".
18035 (PTA_GOLDMONT): Define.
18036 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
18037 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
18038 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
18039 (fold_builtin_cpu): Add "goldmont".
18040 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
18041 (ix86_option_override_internal): Add "goldmont".
18042 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
18043 (processor_type): Add PROCESSOR_GOLDMONT.
18044 * config/i386/i386.md: Add CPU "glm".
18045 * config/i386/glm.md: New file.
18046 * config/i386/x86-tune.def: Add m_GOLDMONT.
18047 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
18048
18049 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18050
18051 PR target/85572
18052 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
18053 E_V4DImode.
18054 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
18055 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
18056 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
18057
18058 PR target/85317
18059 * config/i386/i386.c (ix86_fold_builtin): Handle
18060 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
18061
18062 PR target/85480
18063 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
18064 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
18065
18066 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
18067
18068 PR target/85658
18069 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
18070 (check_arch): Likewise.
18071 (check_fpu): Return the result rather than printing it.
18072 (end arch): Fix operator precedence.
18073 (end cpu): Likewise.
18074 (END): Print the result from check_fpu.
18075
18076 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18077 Alan Hayward <alan.hayward@arm.com>
18078 David Sherwood <david.sherwood@arm.com>
18079
18080 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
18081 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
18082 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
18083 (*fcmuo<mode>_and): New patterns.
18084
18085 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18086
18087 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
18088 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
18089 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
18090 (cmp_op, sve_imm_con): New code attributes.
18091 (SVE_COND_INT_CMP, imm_con): Delete.
18092 (cmp_op): Remove above unspecs from int attribute.
18093 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
18094 to...
18095 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
18096 comparison-specific unspecs.
18097 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
18098 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
18099 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
18100 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
18101 (*vec_fcm<cmp_op><mode>): Rename to...
18102 (*fcm<cmp_op><mode>): ...this and adjust likewise.
18103 (*vec_fcmuo<mode>): Rename to...
18104 (*fcmuo<mode>): ...this and adjust likewise.
18105 (*pred_fcm<cmp_op><mode>): New pattern.
18106 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
18107 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
18108 functions.
18109 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
18110 and UNORDERED.
18111 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
18112 (aarch64_emit_sve_predicated_cond): New function.
18113 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
18114 (aarch64_emit_unspec_cond_or): Replace with...
18115 (aarch64_emit_sve_or_conds): ...this new function. Use
18116 aarch64_emit_sve_ptrue_op for the individual comparisons and
18117 aarch64_emit_binop to OR them together.
18118 (aarch64_emit_inverted_unspec_cond): Replace with...
18119 (aarch64_emit_sve_inverted_cond): ...this new function. Use
18120 aarch64_emit_sve_ptrue_op for the comparison and
18121 aarch64_emit_unop to invert the result.
18122 (aarch64_expand_sve_vec_cmp_float): Update after the above
18123 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
18124
18125 2018-05-07 Nathan Sidwell <nathan@acm.org>
18126
18127 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
18128 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
18129 (Backwards Compatibility): Likewise.
18130
18131 2018-05-07 Luis Machado <luis.machado@linaro.org>
18132
18133 PR bootstrap/85681
18134 Revert:
18135 2018-05-07 Luis Machado <luis.machado@linaro.org>
18136
18137 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18138 <prefetch_dynamic_strides>: New const bool field.
18139 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18140 prefetch_dynamic_strides.
18141 (exynosm1_prefetch_tune): Likewise.
18142 (thunderxt88_prefetch_tune): Likewise.
18143 (thunderx_prefetch_tune): Likewise.
18144 (thunderx2t99_prefetch_tune): Likewise.
18145 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18146 to false.
18147 (aarch64_override_options_internal): Update to set
18148 PARAM_PREFETCH_DYNAMIC_STRIDES.
18149 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18150 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18151 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18152 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18153 prefetch-dynamic-strides setting.
18154
18155 2018-05-07 Luis Machado <luis.machado@linaro.org>
18156
18157 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18158 <minimum_stride>: New const int field.
18159 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18160 minimum_stride field.
18161 (exynosm1_prefetch_tune): Likewise.
18162 (thunderxt88_prefetch_tune): Likewise.
18163 (thunderx_prefetch_tune): Likewise.
18164 (thunderx2t99_prefetch_tune): Likewise.
18165 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18166 (aarch64_override_options_internal): Update to set
18167 PARAM_PREFETCH_MINIMUM_STRIDE.
18168 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18169 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18170 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18171 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18172 stride is constant and is below the minimum stride threshold.
18173
18174 2018-05-07 Luis Machado <luis.machado@linaro.org>
18175
18176 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
18177 to 512.
18178
18179 2018-05-07 Luis Machado <luis.machado@linaro.org>
18180
18181 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18182 <prefetch_dynamic_strides>: New const bool field.
18183 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18184 prefetch_dynamic_strides.
18185 (exynosm1_prefetch_tune): Likewise.
18186 (thunderxt88_prefetch_tune): Likewise.
18187 (thunderx_prefetch_tune): Likewise.
18188 (thunderx2t99_prefetch_tune): Likewise.
18189 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18190 to false.
18191 (aarch64_override_options_internal): Update to set
18192 PARAM_PREFETCH_DYNAMIC_STRIDES.
18193 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18194 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18195 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18196 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18197 prefetch-dynamic-strides setting.
18198
18199 2018-05-07 Luis Machado <luis.machado@linaro.org>
18200
18201 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18202 <minimum_stride>: New const int field.
18203 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18204 minimum_stride field.
18205 (exynosm1_prefetch_tune): Likewise.
18206 (thunderxt88_prefetch_tune): Likewise.
18207 (thunderx_prefetch_tune): Likewise.
18208 (thunderx2t99_prefetch_tune): Likewise.
18209 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18210 (aarch64_override_options_internal): Update to set
18211 PARAM_PREFETCH_MINIMUM_STRIDE.
18212 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18213 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18214 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18215 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18216 stride is constant and is below the minimum stride threshold.
18217
18218 2018-05-06 Jakub Jelinek <jakub@redhat.com>
18219
18220 PR c++/85659
18221 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
18222 the type is addressable. Don't force op into register if it has
18223 BLKmode.
18224
18225 2018-05-05 Roland McGrath <mcgrathr@google.com>
18226
18227 PR other/77609
18228 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
18229 any section for which we don't know a specific type it should have,
18230 regardless of name. Previously this was done only for the exact
18231 names ".init_array", ".fini_array", and ".preinit_array".
18232 (default_elf_asm_named_section): Add comment about
18233 relationship with default_section_type_flags and SECTION_NOTYPE.
18234 (get_section): Don't consider it a type conflict if one side has
18235 SECTION_NOTYPE and the other doesn't, as long as neither has the
18236 SECTION_BSS et al used in the default_section_type_flags logic.
18237
18238 2018-05-05 Tom de Vries <tom@codesourcery.com>
18239
18240 PR target/85653
18241 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18242 (workaround_barsyncs): New function.
18243 (nvptx_reorg): Use workaround_barsyncs.
18244 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18245 (define_expand "nvptx_membar_cta"): New define_expand.
18246 (define_insn "*nvptx_membar_cta"): New insn.
18247
18248 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
18249
18250 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18251 To improve optimization opportunities.
18252 * builtin-types.def: The new needed builtin types for the above.
18253
18254 2018-05-04 Richard Biener <rguenther@suse.de>
18255
18256 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18257 * gimple-ssa-store-merging.c
18258 (imm_store_chain_info::output_merged_store): Remove redundant create,
18259 release split_store vector contents on failure.
18260 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18261 scalar stmt vector on cache hit.
18262
18263 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
18264
18265 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18266 Xilinx FP support.
18267 * config.gcc (powerpc-xilinx-eabi*): Remove.
18268 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18269 support.
18270 (fusion_addis_mem_combo_load): Ditto.
18271 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18272 FP support.
18273 (rs6000_cpu_cpp_builtins): Ditto.
18274 * config/rs6000/rs6000-linux.c
18275 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18276 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18277 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18278 support.
18279 (rs6000_setup_reg_addr_masks): Ditto.
18280 (rs6000_init_hard_regno_mode_ok): Ditto.
18281 (rs6000_option_override_internal): Ditto.
18282 (legitimate_lo_sum_address_p): Ditto.
18283 (rs6000_legitimize_address): Ditto.
18284 (rs6000_legitimize_reload_address): Ditto.
18285 (rs6000_legitimate_address_p): Ditto.
18286 (abi_v4_pass_in_fpr): Ditto.
18287 (setup_incoming_varargs): Ditto.
18288 (rs6000_gimplify_va_arg): Ditto.
18289 (rs6000_split_multireg_move): Ditto.
18290 (rs6000_savres_strategy): Ditto.
18291 (rs6000_emit_prologue_components): Ditto.
18292 (rs6000_emit_epilogue_components): Ditto.
18293 (rs6000_emit_prologue): Ditto.
18294 (rs6000_emit_epilogue): Ditto.
18295 (rs6000_elf_file_end): Ditto.
18296 (rs6000_function_value): Ditto.
18297 (rs6000_libcall_value): Ditto.
18298 * config/rs6000/rs6000.h: Ditto.
18299 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18300 (TARGET_MINMAX): ... this. New.
18301 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18302 * config/rs6000/rs6000.md: Remove Xilinx FP support.
18303 (*movsi_internal1_single): Delete.
18304 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18305 mfpu=, mxilinx-fpu): Delete.
18306 * config/rs6000/singlefp.h: Delete.
18307 * config/rs6000/sysv4.h: Remove Xilinx FP support.
18308 * config/rs6000/t-rs6000: Ditto.
18309 * config/rs6000/t-xilinx: Delete.
18310 * config/rs6000/titan.md: Adjust for fp_type removal.
18311 * config/rs6000/vsx.md: Remove Xilinx FP support.
18312 (VStype_simple): Delete.
18313 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18314 * config/rs6000/xfpu.h: Delete.
18315 * config/rs6000/xfpu.md: Delete.
18316 * config/rs6000/xilinx.h: Delete.
18317 * config/rs6000/xilinx.opt: Delete.
18318 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18319 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18320
18321 2018-05-04 Tom de Vries <tom@codesourcery.com>
18322
18323 PR libgomp/85639
18324 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18325 if ignore == 0.
18326
18327 2018-05-04 Richard Biener <rguenther@suse.de>
18328
18329 PR middle-end/85627
18330 * tree-complex.c (update_complex_assignment): We are always in SSA form.
18331 (expand_complex_div_wide): Likewise.
18332 (expand_complex_operations_1): Likewise.
18333 (expand_complex_libcall): Preserve EH info of the original stmt.
18334 (tree_lower_complex): Handle removed blocks.
18335 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18336 on complex multiplication and division libcall builtins.
18337
18338 2018-05-04 Richard Biener <rguenther@suse.de>
18339
18340 PR middle-end/85574
18341 * fold-const.c (negate_expr_p): Restrict negation of operand
18342 zero of a division to when we know that can happen without
18343 overflow.
18344 (fold_negate_expr_1): Likewise.
18345
18346 2018-05-04 Jakub Jelinek <jakub@redhat.com>
18347
18348 PR libstdc++/85466
18349 * real.h (real_nextafter): Declare.
18350 * real.c (real_nextafter): New function.
18351 * fold-const-call.c (fold_const_nextafter): New function.
18352 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18353 CASE_CFN_NEXTTOWARD.
18354 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18355 even when arg1_mode is different from arg0_mode.
18356
18357 2018-05-03 Nathan Sidwell <nathan@acm.org>
18358
18359 * doc/extend.texi (Deprecated Features): Remove
18360 -ffriend-injection.
18361 (Backwards Compatibility): Likewise.
18362 * doc/invoke.texi (C++ Language Options): Likewise.
18363 (C++ Dialect Options): Likewise.
18364
18365 2018-05-03 Jakub Jelinek <jakub@redhat.com>
18366
18367 PR target/85530
18368 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18369 _mm512_mask_mullox_epi64): New intrinsics.
18370
18371 2018-05-03 Tom de Vries <tom@codesourcery.com>
18372
18373 PR testsuite/85106
18374 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18375 dump files): Add offload-tree.
18376
18377 2018-05-03 Richard Biener <rguenther@suse.de>
18378
18379 PR tree-optimization/85615
18380 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18381 to loops not nested in BBs loop father to avoid creating multi-entry
18382 loops.
18383
18384 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18385
18386 PR tree-optimization/70291
18387 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18388 arguments. Change return type to tree. Emit libcall as a new
18389 statement rather than replacing existing one when inplace_p is true.
18390 (expand_complex_multiplication_components): New function.
18391 (expand_complex_multiplication): Expand floating-point complex
18392 multiplication using the above.
18393 (expand_complex_division): Rename inner_type parameter to type.
18394 Update expand_complex_libcall call-site.
18395 (expand_complex_operations_1): Update expand_complex_multiplication
18396 and expand_complex_division call-sites.
18397
18398 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18399
18400 PR target/85582
18401 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18402 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18403 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18404 the highest significant bit of the shift count mask is clear. In
18405 check whether and[sq]i3 is needed verify that all significant bits
18406 of the shift count other than the highest are set.
18407
18408 2018-05-02 Tom de Vries <tom@codesourcery.com>
18409
18410 PR libgomp/82428
18411 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18412 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18413 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18414 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18415 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18416 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18417 __builtin_goacc_parlevel_size.
18418
18419 2018-05-02 Richard Biener <rguenther@suse.de>
18420
18421 PR tree-optimization/85597
18422 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18423 do not use split vect_get_vec_defs call but call vect_get_slp_defs
18424 directly.
18425
18426 2018-05-02 Tom de Vries <tom@codesourcery.com>
18427
18428 PR testsuite/85106
18429 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18430 dump files): Add ltrans-tree.
18431
18432 2018-05-02 Tom de Vries <tom@codesourcery.com>
18433
18434 PR testsuite/85106
18435 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18436 dump files): Add wpa-ipa.
18437
18438 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
18439
18440 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
18441 powerpc*-*-linux*paired* target.
18442 * config/rs6000/750cl.h: Delete.
18443 * config/rs6000/paired.h: Delete.
18444 * config/rs6000/paired.md: Delete.
18445 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18446 float support.
18447 * config/rs6000/rs6000-builtin.def: Remove paired float support.
18448 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18449 comment. Remove paired float support.
18450 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18451 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18452 VECTOR_PAIRED.
18453 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18454 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18455 declarations.
18456 * config/rs6000/rs6000.c: Remove paired float support.
18457 (paired_expand_vector_init, paired_expand_vector_move,
18458 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18459 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18460 paired_expand_builtin, paired_expand_predicate_builtin,
18461 paired_init_builtins): Delete.
18462 * config/rs6000/rs6000.h: Remove paired float support.
18463 * config/rs6000/rs6000.md: Remove paired float support.
18464 (move_from_CR_ov_bit): Delete.
18465 * config/rs6000/rs6000.opt (mpaired): Delete.
18466 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18467 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18468
18469 2018-05-02 Richard Biener <rguenther@suse.de>
18470
18471 PR middle-end/85567
18472 * gimplify.c (gimplify_save_expr): When in SSA form allow
18473 SAVE_EXPRs to compute to SSA vars.
18474
18475 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18476
18477 PR target/85582
18478 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18479 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18480 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18481 clobber operands[2], instead use a new pseudo. Formatting fixes.
18482
18483 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18484
18485 PR tree-optimization/85586
18486 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18487 exit early for statements in the same group if the accesses are
18488 not strided.
18489
18490 2018-05-02 Tom de Vries <tom@codesourcery.com>
18491
18492 PR lto/85451
18493 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18494 error message.
18495
18496 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18497
18498 PR tree-optimization/85143
18499 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18500
18501 2018-05-01 Tom de Vries <tom@codesourcery.com>
18502
18503 PR lto/85451
18504 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18505 not found" error message.
18506
18507 2018-05-01 Tom de Vries <tom@codesourcery.com>
18508
18509 PR other/83786
18510 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18511 * vec.c (test_ordered_remove_if): New function.
18512 (vec_c_tests): Call test_ordered_remove_if.
18513 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18514 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18515 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18516 VEC_ORDERED_REMOVE_IF.
18517
18518 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18519
18520 PR tree-optimization/82665
18521 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18522 pointer subtraction where arguments come from a memchr call.
18523
18524 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18525
18526 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18527 --push-state --as-needed and --pop-state instead of --as-needed and
18528 --no-as-needed if ld supports it.
18529 * configure: Regenerated.
18530
18531 PR web/85578
18532 * doc/install.texi2html: Replace _002d with - and _002a with * in
18533 generated html files using sed.
18534
18535 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18536
18537 PR c++/85523
18538 * gcc-rich-location.c (blank_line_before_p): New function.
18539 (use_new_line): New function.
18540 (gcc_rich_location::add_fixit_insert_formatted): New function.
18541 * gcc-rich-location.h
18542 (gcc_rich_location::add_fixit_insert_formatted): New function.
18543
18544 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18545
18546 * selftest.c (assert_streq): Rename "expected" and "actual" to
18547 "val1" and "val2". Extend NULL-handling to cover both inputs
18548 symmetrically, while still requiring both to be non-NULL for a pass.
18549 * selftest.h (assert_streq): Rename "expected" and "actual" to
18550 "val1" and "val2".
18551 (ASSERT_EQ): Likewise.
18552 (ASSERT_EQ_AT): Likewise.
18553 (ASSERT_KNOWN_EQ): Likewise.
18554 (ASSERT_KNOWN_EQ_AT): Likewise.
18555 (ASSERT_NE): Likewise.
18556 (ASSERT_MAYBE_NE): Likewise.
18557 (ASSERT_MAYBE_NE_AT): Likewise.
18558 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18559 the assertion to pass.
18560 (ASSERT_STREQ_AT): Likewise.
18561
18562 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18563
18564 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18565 interaction with -pie.
18566
18567 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18568
18569 * selftest.h: Fix alphabetization of per-source-file selftest
18570 declarations.
18571
18572 2018-04-30 Jason Merrill <jason@redhat.com>
18573
18574 PR c++/61982 - dead stores to destroyed objects.
18575 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18576 of clobber.
18577
18578 2018-04-30 Jason Merrill <jason@redhat.com>
18579
18580 * tree.c (build_clobber): New.
18581 * tree.h: Declare it.
18582 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18583
18584 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18585
18586 * diagnostic-show-locus.c (layout::layout): Update for
18587 location_get_source_line returning a char_span.
18588 (struct char_span): Move to input.h.
18589 (struct correction): Update for fields in char_span becoming
18590 private.
18591 (struct source_line): Update for location_get_source_line
18592 returning a char_span.
18593 (layout::print_line): Likewise.
18594 * edit-context.c (edited_file::print_content): Likewise.
18595 (edited_file::print_diff_hunk): Likewise.
18596 (edited_file::print_run_of_changed_lines): Likewise.
18597 (edited_file::get_num_lines): Likewise.
18598 (edited_line::edited_line): Likewise.
18599 * final.c (asm_show_source): Likewise.
18600 * input.c (location_get_source_line): Convert return type
18601 from const char * to char_span, losing the final "line_len"
18602 param.
18603 (dump_location_info): Update for the above.
18604 (get_substring_ranges_for_loc): Likewise. Use a char_span
18605 when handling the literal within the line.
18606 (test_reading_source_line): Update for location_get_source_line
18607 returning a char_span.
18608 * input.h (class char_span): Move here from
18609 diagnostic-show-locus.c, converting from a struct to a class.
18610 Make data members private.
18611 (char_span::operator bool): New.
18612 (char_span::length): New.
18613 (char_span::get_buffer): New.
18614 (char_span::operator[]): New.
18615 (char_span::subspan): Make const.
18616 (char_span::xstrdup): New.
18617 (location_get_source_line): Convert return type from const char *
18618 to char_span, losing the final "line_size" param.
18619
18620 2018-04-30 Jan Hubicka <jh@suse.cz>
18621
18622 * lto-wrapper.c (ltrans_priorities): New static var.
18623 (cmp_priority): New.
18624 (run_gcc): Read priorities and if doing parallel build order
18625 the Makefile by them.
18626
18627 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18628
18629 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18630
18631 2018-04-30 Richard Biener <rguenther@suse.de>
18632
18633 * tree-cfg.c (verify_address): Remove base argument, add
18634 flag whether to check TREE_ADDRESSABLE and do that.
18635 (verify_expr): Remove.
18636 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18637 (verify_gimple_assign_single): Likewise.
18638 (verify_gimple_switch): Likewise.
18639 (verify_expr_location_1): Dereference tp once. Add (disabled)
18640 piece from verify_expr.
18641 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18642
18643 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18644
18645 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18646
18647 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18648
18649 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18650 (small_data_pattern): Likewise.
18651 (arc_rewrite_small_data): Likewise.
18652 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18653 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18654 (get_symbol_alignment): New function.
18655 (legitimate_small_data_address_p): Likewise.
18656 (legitimate_scaled_address): Update, call
18657 legitimate_small_data_address_p.
18658 (output_sdata): New static variable.
18659 (arc_print_operand): Update how we handle small data operands.
18660 (arc_print_operand_address): Likewise.
18661 (arc_legitimate_address_p): Update, use
18662 legitimate_small_data_address_p.
18663 (arc_rewrite_small_data_p): Remove.
18664 (arc_rewrite_small_data_1): Likewise.
18665 (arc_rewrite_small_data): Likewise.
18666 (small_data_pattern): Likewise.
18667 (compact_sda_memory_operand): Update to use
18668 legitimate_small_data_address_p and get_symbol_alignment.
18669 (prepare_move_operands): Don't rewite sdata pattern.
18670 (prepare_extend_operands): Remove.
18671 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18672 pattern.
18673 (zero_extendqisi2): Likewise.
18674 (zero_extendhisi2): Likewise.
18675 (extendqihi2): Likewise.
18676 (extendqisi2): Likewise.
18677 (extendhisi2): Likewise.
18678 (addsi3): Likewise.
18679 (subsi3): Likewise.
18680 (andsi3): Likewise.
18681 * config/arc/constraints.md (Usd): Change it to memory constraint.
18682
18683 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18684
18685 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18686 as source of std instructions.
18687 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18688 allow 6-bit constants as source for store instructions.
18689 (movdi_insn): Update instruction pattern to allow 6-bit constants
18690 as source for store instructions.
18691
18692 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18693
18694 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18695
18696 2018-04-30 Nathan Sidwell <nathan@acm.org>
18697 Sandra Loosemore <sandra@codesourcery.com>
18698
18699 * dumpfile.c (dump_open): Allow '-' for stdout.
18700 * doc/invoke.texi (Developer Options): Document dump filename
18701 determination early. Document stdin/stdout selection.
18702
18703 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18704
18705 Microblaze Target: PIC data text relative
18706
18707 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18708 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18709 Add declaration.
18710 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18711 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18712 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18713 New addressing mode for data-text relative position indepenedent code.
18714 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18715 'ADDRESS_SYMBOLIC_TXT_REL'.
18716 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18717 (microblaze_legitimate_pic_operand): Exclude function calls from
18718 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18719 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18720 addresses cases.
18721 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18722 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18723 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18724 for 'address + offset'.
18725 (microblaze_expand_prologue): Add new function prologue call for
18726 'r20' assignation.
18727 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18728 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18729 table in case of TARGET_PIC_DATA_TEXT_REL.
18730 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18731 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18732 Add new macros 'UNSPEC_TEXT',
18733 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18734 + exclude function calls from 'UNSPEC_PLT' in case of data text
18735 relative mode.
18736 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18737 new target hook for generating address diff vector tables in case of
18738 flag_pic.
18739 * doc/tm.texi : Regenerate.
18740 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18741 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18742 of addr diff vector generation.
18743 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18744 target hook definition.
18745 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18746 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18747 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18748 option for data text relative.
18749
18750 2018-04-30 Richard Biener <rguenther@suse.de>
18751
18752 * tree-chrec.h (evolution_function_is_constant_p): Remove
18753 redundant check.
18754 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18755
18756 2018-04-30 Richard Biener <rguenther@suse.de>
18757
18758 PR bootstrap/85571
18759 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18760
18761 2018-04-30 Richard Biener <rguenther@suse.de>
18762
18763 PR tree-optimization/28364
18764 PR tree-optimization/85275
18765 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18766 copying first exit test.
18767
18768 2018-04-28 Mark Wielaard <mark@klomp.org>
18769
18770 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18771 dwarf_version >= 5.
18772 (dwarf_AT): Handle DW_AT_addr_base.
18773 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18774
18775 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18776
18777 PR target/84431
18778 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18779 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18780 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18781 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18782
18783 2018-04-28 Richard Biener <rguenther@suse.de>
18784
18785 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18786 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18787 to reflect use. Only add interesting stmts.
18788
18789 2018-04-27 Martin Jambor <mjambor@suse.cz>
18790
18791 PR ipa/85549
18792 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18793 the jump function allows for passing through aggregate values.
18794
18795 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18796
18797 * input.h (in_system_header_at): Convert from macro to inline
18798 function.
18799 (from_macro_expansion_at): Likewise.
18800 (from_macro_definition_at): Likewise.
18801
18802 2018-04-27 Jeff Law <law@redhat.com>
18803
18804 * config.gcc: Mark tile* targets as deprecated/obsolete.
18805
18806 2018-04-27 Richard Biener <rguenther@suse.de>
18807
18808 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18809 fix for ILP32.
18810
18811 2018-04-27 Richard Biener <rguenther@suse.de>
18812
18813 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18814
18815 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18816
18817 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18818 with Yd constraint. Set "preferred_for_speed" attribute from
18819 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18820 with Yd constraint.
18821 (*movdi_internal): Ditto.
18822 (movti_interunit splitters): Remove
18823 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18824 (movdi_interunit splitters): Ditto.
18825 * config/i386/constraints.md (Ye): Remove.
18826 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18827
18828 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18829
18830 PR target/85512
18831 * config/aarch64/constraints.md (Usg): Limit to 31.
18832 (Usj): Limit to 63.
18833
18834 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18835
18836 PR tree-optimization/85529
18837 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18838 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18839 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18840 zero extension or masking of the MSB bit.
18841 (optimize_range_tests): Add FIRST_BB argument, pass it through
18842 to optimize_range_tests_var_bound.
18843 (maybe_optimize_range_tests, reassociate_bb): Adjust
18844 optimize_range_tests callers.
18845
18846 2018-04-26 Richard Biener <rguenther@suse.de>
18847 Jakub Jelinek <jakub@redhat.com>
18848
18849 * cgraph.h (symbol_table): Just declare debug method here.
18850 * symtab.c (symbol_table::debug): Define.
18851
18852 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18853
18854 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18855
18856 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18857
18858 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18859 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18860 (*movdi_internal): Substitute Yi and Yj constraint with x
18861 and Ym and Yn constraint with y constraint. Update "isa"
18862 attribute and set "preferred_for_speed" attribute from
18863 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18864 (*movsi_internal): Ditto.
18865 (*movdf_internal): Ditto.
18866 (*movsf_internal): Ditto.
18867 (*zero_extendsidi2): Ditto.
18868 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18869 (sse2_loadld): Ditto.
18870 (*vec_extract<ssevecmodelower>_0): Ditto.
18871 (*vec_extractv4si_0_zext_sse4): Ditto.
18872 (vec_concatv2di): Ditto.
18873 (*vec_dup<mode>): Ditto.
18874 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18875 * config/i386/constraints.md (Yi): Remove.
18876 (Yj): Remove.
18877 (Ym): Remove.
18878 (Yn): Remove.
18879
18880 2018-04-26 Nathan Sidwell <nathan@acm.org>
18881
18882 * dumpfile.c (dump_open): New.
18883 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18884 (dump_finish): Detect stdio/stderr by value not name.
18885
18886 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18887
18888 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18889
18890 2018-04-26 Tom de Vries <tom@codesourcery.com>
18891
18892 PR target/84952
18893 * config/nvptx/nvptx.c (verify_neutering_jumps)
18894 (verify_neutering_labels): New function
18895 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18896
18897 2018-04-26 Tom de Vries <tom@codesourcery.com>
18898
18899 PR target/84025
18900 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18901 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18902 need neutering.
18903
18904 2018-04-26 Richard Biener <rguenther@suse.de>
18905 Tom de Vries <tom@codesourcery.com>
18906
18907 PR lto/85422
18908 * lto-streamer-out.c (output_function): Fixup loops if required to match
18909 discovery done in the reader.
18910
18911 2018-04-26 Richard Biener <rguenther@suse.de>
18912
18913 PR tree-optimization/85116
18914 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18915 have a loop exit from the single latch predecessor. Remove
18916 case of header with just condition.
18917 (ch_base::copy_headers): Exclude infinite loops from any
18918 processing.
18919 (pass_ch::execute): Record exits.
18920
18921 2018-04-26 Richard Biener <rguenther@suse.de>
18922
18923 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18924 prologue cost vector and pass it to vect_get_load_cost.
18925 (vect_get_peeling_costs_all_drs): Likewise.
18926 (vect_peeling_hash_get_lowest_cost): Likewise.
18927 (vect_enhance_data_refs_alignment): Likewise.
18928
18929 2018-04-26 Richard Biener <rguenther@suse.de>
18930
18931 PR middle-end/85450
18932 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18933 checking of integer<->pointer conversions.
18934 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18935 sign-/zero-extending pointer types.
18936 (expand_omp_for_static_chunk): Likewise.
18937
18938 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18939 Jean Lee <xiaoyur347@gmail.com>
18940
18941 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18942 (TARGET_ASAN_SHADOW_OFFSET): Define.
18943 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18944 true for -fsanitize=address.
18945
18946 2018-04-25 Mark Wielaard <mark@klomp.org>
18947
18948 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18949 shorter ones.
18950
18951 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18952
18953 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18954 than "alu", remove explicit "memory" and "imm_disp" attributes.
18955 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18956
18957 PR middle-end/85414
18958 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18959 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18960 gen_lowpart_no_emit.
18961
18962 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18963
18964 PR target/85473
18965 * config/i386/i386.c (ix86_expand_builtin): Change memory
18966 operand to XI, extend p0 to Pmode.
18967 * config/i386/i386.md: Change unspec volatile and operand
18968 1 mode to XI, change operand 0 mode to P.
18969
18970 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18971
18972 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18973 GET_MODE_MASK before any checking.
18974 (nds32_can_use_bset_p): Likewise.
18975 (nds32_can_use_btgl_p): Likewise.
18976
18977 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18978
18979 * config/nds32/nds32-doubleword.md: New define_split pattern for
18980 illegal register number.
18981
18982 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18983
18984 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18985
18986 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18987
18988 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18989
18990 2018-04-25 Richard Biener <rguenther@suse.de>
18991
18992 * lto-streamer.h (LTO_major_version): Bump to 8.
18993
18994 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18995
18996 * BASE-VER: Set to 9.0.0.
18997
18998 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18999
19000 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
19001 in __abskf2 and __powikf2.
19002
19003 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19004
19005 PR target/85512
19006 * config/aarch64/constraints.md (Usg, Usj): New constraints.
19007 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
19008 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
19009 Use the above on operand 2. Reindent.
19010 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
19011
19012 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19013
19014 PR target/85485
19015 * common/config/i386/i386-common.c (ix86_handle_option): Don't
19016 handle OPT_mcet.
19017 * config/i386/i386.opt (mcet): Removed.
19018 * doc/install.texi: Remove -mcet documentation.
19019 * doc/invoke.texi: Likewise.
19020
19021 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19022
19023 PR target/85485
19024 * doc/install.texi: Remove -mcet from bootstrap-cet.
19025
19026 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19027
19028 PR target/85511
19029 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
19030 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
19031 if TARGET_64BIT.
19032
19033 PR target/85503
19034 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
19035 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
19036 containing a CONST_VECTOR.
19037
19038 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
19039
19040 * doc/install.texi: Update newlib dependency for nvptx.
19041
19042 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19043
19044 PR target/85508
19045 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
19046 instead of INTVAL when shifting x left.
19047
19048 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
19049
19050 PR tree-optimization/85478
19051 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
19052 vect_grouped_store_supported for single element vectors.
19053
19054 2018-04-24 Richard Biener <rguenther@suse.de>
19055
19056 PR target/85491
19057 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
19058 load cost increase to the case of non-constant step.
19059
19060 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19061
19062 PR target/84828
19063 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
19064 destination if any_malformed_asm.
19065
19066 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
19067
19068 PR middle-end/85496
19069 * expr.c (store_field): In the bitfield case, if the value comes from
19070 a function call and is returned in registers by means of a PARALLEL,
19071 do not change the mode of the temporary unless BLKmode and VOIDmode.
19072
19073 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
19074
19075 PR rtl-optimization/85423
19076 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
19077 dependencies to debug insns when the previous insn is non-debug.
19078
19079 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19080
19081 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
19082 enums into a single definition.
19083 (fls): Fix predicates and printing.
19084 (seti): Likewise.
19085
19086 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19087
19088 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
19089 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
19090 and short u6 immediate.
19091 (check_if_valid_sleep_operand): Remove.
19092 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
19093
19094 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19095
19096 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
19097 flag_always_save_lp condition.
19098 * config/nds32/nds32.opt (malways-save-lp): New option.
19099
19100 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19101
19102 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
19103 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
19104 * config/nds32/nds32.h
19105 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
19106 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
19107
19108 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19109
19110 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
19111 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
19112
19113 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19114 Chung-Ju Wu <jasonwucj@gmail.com>
19115
19116 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
19117 Declare.
19118 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
19119 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
19120
19121 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19122
19123 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
19124
19125 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19126
19127 * config/nds32/nds32-protos.h (nds32_data_alignment,
19128 nds32_local_alignment): Declare.
19129 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
19130 nds32_local_alignment): New functions.
19131 (TARGET_CONSTANT_ALIGNMENT): Define.
19132 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
19133
19134 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19135
19136 * config/nds32/nds32.c
19137 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
19138 (TARGET_MODES_TIEABLE_P): Likewise.
19139
19140 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19141
19142 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
19143 level Ofast and Og.
19144
19145 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
19146 Chung-Ju Wu <jasonwucj@gmail.com>
19147
19148 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19149 for unaligned access.
19150 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19151 unaligned access.
19152 * config/nds32/nds32-intrinsic.md: Likewise.
19153 * config/nds32/nds32_intrinsic.h: Likewise.
19154 * config/nds32/nds32.h (nds32_builtins): Likewise.
19155 * config/nds32/nds32.opt (munaligned-access): New option.
19156 * config/nds32/nds32.c (nds32_asm_file_start): Display
19157 flag_unaligned_access status.
19158
19159 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19160
19161 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
19162 -mno-relax is present.
19163 * config/riscv/linux.h (LINK_SPEC): Ditto.
19164
19165 2018-04-20 Martin Sebor <msebor@redhat.com>
19166
19167 PR c/85365
19168 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
19169 for null pointers.
19170 (gimple_fold_builtin_stxcpy_chk): Same.
19171 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
19172
19173 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
19174
19175 PR target/85456
19176 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
19177 __powikf2 when long double is IEEE 128-bit.
19178
19179 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19180
19181 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
19182 step to make sure stack always aligned.
19183
19184 2018-04-20 Carl Love <cel@us.ibm.com>
19185
19186 PR target/83402
19187 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
19188 size check for arg0.
19189
19190 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
19191 Tom de Vries <tom@codesourcery.com>
19192
19193 PR target/85445
19194 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
19195 Emit insns for calls too.
19196 (nvptx_find_par): Always look for worker-level predecessor insn.
19197 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
19198 calls.
19199 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
19200 (nvptx_process_pars): Propagate frames for calls.
19201
19202 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
19203
19204 PR target/85469
19205 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
19206 Removed.
19207 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
19208 (ix86_handle_option): Don't handle OPT_mibt.
19209 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
19210 __SHSTK__.
19211 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
19212 has_ibt and ibt.
19213 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
19214 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
19215 (ix86_target_macros): Define __CET__ with flag_cf_protection
19216 for -fcf-protection.
19217 * config/i386/i386.c (isa2_opts): Remove -mibt.
19218 * config/i386/i386.h (TARGET_IBT): Removed.
19219 (TARGET_IBT_P): Likewise.
19220 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
19221 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
19222 * config/i386/i386.opt (mcet): Update help message.
19223 (mshstk): Likewise.
19224 (mibt): Removed.
19225 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
19226 -mcet as an alias for -mshstk.
19227
19228 2018-04-20 Richard Biener <rguenther@suse.de>
19229
19230 PR middle-end/85475
19231 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
19232 complexity by forcing a single use of the multiply operand.
19233
19234 2018-04-20 Martin Jambor <mjambor@suse.cz>
19235
19236 ipa/85449
19237 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
19238 recursion dependency to only apply to non-clones.
19239
19240 2018-04-20 Martin Jambor <mjambor@suse.cz>
19241
19242 ipa/85447
19243 * ipa-cp.c (create_specialized_node): Check that clones of
19244 self-recursive edges exist during IPA-CP.
19245
19246 2018-04-19 Toon Moene <toon@moene.org>
19247
19248 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19249 by -O3.
19250
19251 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19252
19253 PR tree-optimization/85467
19254 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19255 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
19256 VECTOR_CST element to type.
19257
19258 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19259
19260 PR target/85397
19261 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19262 * config/i386/i386.md (builtin_setjmp_setup): Removed.
19263 (builtin_longjmp): Likewise.
19264 (save_stack_nonlocal): New pattern.
19265 (restore_stack_nonlocal): Likewise.
19266
19267 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19268
19269 PR target/85404
19270 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19271 Replace ASM_OUTPUT_LABEL with fprintf.
19272
19273 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19274
19275 PR target/85417
19276 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19277 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19278 * config/i386/i386-c.c (ix86_target_macros_internal): Also
19279 define __IBT__ and __SHSTK__ for -fcf-protection.
19280 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19281 TARGET_IBT.
19282 (ix86_trampoline_init): Likewise.
19283 (x86_output_mi_thunk): Likewise.
19284 (ix86_notrack_prefixed_insn_p): Likewise.
19285 (ix86_option_override_internal): Don't disallow -fcf-protection.
19286 * config/i386/i386.md (rdssp<mode>): Also enable for
19287 -fcf-protection.
19288 (incssp<mode>): Likewise.
19289 (nop_endbr): Likewise.
19290 * config/i386/i386.opt (mcet): Change help message to built-in
19291 functions only.
19292 (mibt): Likewise.
19293 (mshstk): Likewise.
19294 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19295 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
19296 enable CET built-in functions.
19297
19298 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
19299
19300 * common/config/i386/i386-common.c
19301 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19302 OPTION_MASK_ISA_MOVDIRI_UNSET,
19303 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19304 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19305 * config.gcc (movdirintrin.h): New header.
19306 * config/i386/cpuid.h (bit_MOVDIRI,
19307 bit_MOVDIR64B): New bits.
19308 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19309 and -mmvodir64b.
19310 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19311 (VOID, PVOID, PCVOID)): New function types.
19312 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19313 __builtin_ia32_directstoreu_u64,
19314 __builtin_ia32_movdir64b): New builtins.
19315 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19316 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19317 and -mmovdiri.
19318 (ix86_valid_target_attribute_inner_p): Ditto.
19319 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19320 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19321 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19322 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19323 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19324 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19325 (movdiri<mode>, movdir64b_<mode>): New.
19326 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19327 * config/i386/immintrin.h: Include movdirintrin.h.
19328 * config/i386/movdirintrin.h: New file.
19329 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19330
19331 2018-04-19 Richard Biener <rguenther@suse.de>
19332
19333 PR middle-end/85455
19334 * cfg.c (clear_bb_flags): When loop state says we have
19335 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19336
19337 2018-04-19 Richard Biener <rguenther@suse.de>
19338
19339 PR tree-optimization/84737
19340 * tree-vect-data-refs.c (vect_copy_ref_info): New function
19341 copying restrict info.
19342 (vect_setup_realignment): Use it.
19343 * tree-vectorizer.h (vect_copy_ref_info): Declare.
19344 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19345 the first DR to all generated stores.
19346 (vectorizable_load): Likewise for loads.
19347
19348 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19349
19350 PR tree-optimization/85446
19351 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19352 the integral and pointer types to have the same precision.
19353
19354 * doc/install.texi: Document --disable-cet being the default and
19355 --enable-cet=auto.
19356
19357 2018-04-18 Martin Liska <mliska@suse.cz>
19358
19359 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19360 style.
19361
19362 2018-04-18 Martin Liska <mliska@suse.cz>
19363
19364 Revert
19365 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19366
19367 PR ipa/83983
19368 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19369 arguments if they are comparable.
19370
19371 2018-04-18 Martin Liska <mliska@suse.cz>
19372
19373 Revert
19374 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19375
19376 PR lto/84805
19377 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19378 incomplete types.
19379
19380 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
19381
19382 PR target/85388
19383 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19384 ENDBR after calling __morestack.
19385
19386 2018-04-18 David Malcolm <dmalcolm@redhat.com>
19387
19388 PR jit/85384
19389 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19390 by using gcc_base_ver to generate a gcc_driver_version, and use
19391 it when generating GCC_DRIVER_NAME.
19392 * configure: Regenerate.
19393
19394 2018-04-18 Jakub Jelinek <jakub@redhat.com>
19395
19396 PR target/81084
19397 * config.gcc: Obsolete powerpc*-*-*spe*.
19398
19399 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19400
19401 PR debug/84637
19402 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19403 (stabstr_D): Change type of unum from unsigned int to
19404 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
19405 type.
19406
19407 2018-04-17 Jim Wilson <jimw@sifive.com>
19408
19409 PR 84856
19410 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19411 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19412 Set arg_pointer_offset after using pretend_args_size.
19413
19414 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19415
19416 PR rtl-optimization/85431
19417 * dse.c (record_store): Ignore zero width stores.
19418
19419 PR sanitizer/85230
19420 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
19421 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19422 __builtin_stack_restore rather than after it.
19423 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19424 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19425 argument instead of virtual_dynamic_stack_rtx.
19426
19427 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
19428
19429 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19430 New prototype.
19431 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19432 Add note to error message to explain internal mapping of overloaded
19433 built-in function name to non-overloaded built-in function name.
19434 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19435 function.
19436
19437 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19438
19439 PR target/85424
19440 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19441 where the inputs overlap with the output.
19442
19443 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19444
19445 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19446 (=v, v) alternative and explicit "memory" attribute.
19447 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
19448 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19449 attributes.
19450 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19451 "sselog1" type instead of "sselog".
19452 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19453 "sselog". Remove explicit "memory" attribute.
19454 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19455 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19456 attributes.
19457 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19458 "sselog1" type instead of "sselog". Remove explicit "memory"
19459 attribute.
19460 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19461 use "sselog1" type instead of "sselog". Remove explicit "memory"
19462 attribute.
19463 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19464 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19465 attributes.
19466 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19467 "sselog1" type instead of "sselog". Remove explicit "memory"
19468 attribute.
19469 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19470 use "sselog1" type instead of "sselog". Remove explicit "memory"
19471 attribute.
19472
19473 PR target/85430
19474 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19475
19476 PR middle-end/85414
19477 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19478 on a SUBREG.
19479
19480 2018-04-17 Martin Jambor <mjambor@suse.cz>
19481
19482 PR ipa/85421
19483 * ipa-cp.c (create_specialized_node): Call
19484 expand_all_artificial_thunks if necessary.
19485
19486 2018-04-17 Martin Liska <mliska@suse.cz>
19487
19488 PR lto/85405
19489 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19490 in message, remote space in between '_G' and '('.
19491
19492 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19493
19494 PR target/85281
19495 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19496 avx512f_vmcmp<mode>3<round_saeonly_name>,
19497 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19498 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19499 avx512f_rndscale<mode><round_saeonly_name>,
19500 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19501 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19502 Use %<iptr>2 instead of %2 for -masm=intel.
19503 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19504 avx512f_vcvttss2usi<round_saeonly_name>,
19505 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19506 -masm=intel.
19507 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19508 avx512f_vcvttsd2usi<round_saeonly_name>,
19509 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19510 Use %q1 instead of %1 for -masm=intel.
19511 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19512 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19513 of %3 for -masm=intel.
19514 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19515 -masm=intel.
19516 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19517 -masm=intel.
19518 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19519 -masm=intel.
19520 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19521 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19522 %g1.
19523 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19524 -masm=intel.
19525 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19526 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19527 %g1 and one with %0 and %1.
19528 (avx512er_vmrcp28<mode><round_saeonly_name>,
19529 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19530 %1 for -masm=intel.
19531 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19532 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19533 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19534 of %0 and %{%4%} for -masm=intel.
19535 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19536 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19537 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19538 order of %0 and %{%5%}%{z%} for -masm=intel.
19539
19540 2018-04-17 Jan Hubicka <jh@suse.cz>
19541
19542 PR lto/85405
19543 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19544
19545 2018-04-17 Martin Liska <mliska@suse.cz>
19546
19547 PR ipa/85329
19548 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19549 for target_clone error message. Make default implementation
19550 clone to be a local declaration.
19551 (separate_attrs): Add new argument and check for an empty
19552 string.
19553 (expand_target_clones): Handle it.
19554 (ipa_target_clone): Make redirection just for target_clones
19555 functions.
19556
19557 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19558 Tom de Vries <tom@codesourcery.com>
19559
19560 PR middle-end/84955
19561 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19562 tiled basic blocks without omp continue statements.
19563
19564 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19565
19566 PR target/83660
19567 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19568 vec_extract expression as having side effects to make sure it gets
19569 a cleanup point.
19570
19571 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19572
19573 PR target/85403
19574 * config/i386/i386.c (get_builtin_code_for_version): Check
19575 error_mark_node.
19576
19577 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19578
19579 PR target/84331
19580 * config.gcc: Support "skylake".
19581 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19582 PROCESSOR_SKYLAKE.
19583 * config/i386/i386.c (m_SKYLAKE): Define.
19584 (processor_target_table): Add "skylake".
19585 (ix86_option_override_internal): Add "skylake".
19586 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19587 PROCESSOR_CANNONLAKE.
19588 (get_builtin_code_for_version): Fix priority for
19589 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19590 PROCESSOR_SKYLAKE-AVX512.
19591 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19592 (processor_type): Add PROCESSOR_SKYLAKE.
19593
19594 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19595 Jason Merrill <jason@redhat.com>
19596
19597 PR c++/85112
19598 * convert.c (convert_to_integer_1): Use direct recursion for
19599 enumeral types and types with a precision less than the number
19600 of bits in their mode.
19601
19602 2018-04-16 Julia Koval <julia.koval@intel.com>
19603
19604 PR target/84413
19605 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19606 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19607
19608 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19609
19610 PR target/85293
19611 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19612 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19613 and -mno-direct-move.
19614
19615 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19616
19617 PR target/83402
19618 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19619 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19620 Ensure negative shifts result in {0}.
19621
19622 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19623
19624 PR rtl-optimization/79916
19625 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19626 regs (if any) to define how to gnerate SD moves when LRA is in
19627 progress.
19628
19629 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19630
19631 PR rtl-optimization/85393
19632 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19633 * except.c (expand_dw2_landing_pad_for_region): Make static.
19634 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19635 a label and unconditional jump to old_bb, rather than
19636 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19637 basic block.
19638
19639 PR rtl-optimization/85376
19640 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19641 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19642 instead of a specific value.
19643
19644 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19645 Bin Cheng <bin.cheng@arm.com>
19646
19647 PR tree-optimization/82965
19648 PR tree-optimization/83991
19649 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19650 by_profile_only parameter.
19651 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19652 information if the loop was predicted to iterate too many times.
19653 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19654
19655 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19656
19657 PR lto/71991
19658 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19659 always inline.
19660
19661 2018-04-13 Martin Liska <mliska@suse.cz>
19662 Jakub Jelinek <jakub@redhat.com>
19663
19664 PR middle-end/81657
19665 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19666 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19667 * builtins.c (expand_builtin_memory_copy_args): Use
19668 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19669 handle dest_addr == pc_rtx.
19670
19671 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19672
19673 PR target/85291
19674 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19675 asked to not generate direct moves.
19676 (fix_trunc<mode>si2_stfiwx): Similar.
19677 (fix_trunc<mode>si2_internal): Similar.
19678
19679 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19680
19681 PR debug/83157
19682 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19683 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19684 lookup if dest in some wider mode is known to be const0_rtx and
19685 if so, record permanent equivalence for it to be ZERO_EXTEND of
19686 the narrower mode destination.
19687
19688 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19689
19690 * lto-streamer-out.c (output_function): Revert 259346.
19691 * omp-expand.c (expand_oacc_for): Likewise.
19692
19693 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19694
19695 PR rtl-optimization/85354
19696 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19697 * sel-sched.c (sel_global_init): ... here.
19698
19699 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19700
19701 PR target/85238
19702 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19703 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19704 mode for PE-COFF targets.
19705 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19706 (i386_pe_asm_lto_end): Likewise.
19707 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19708 (TARGET_ASM_LTO_END): Likewise.
19709 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19710 (i386_pe_asm_lto_start): New function.
19711 (i386_pe_asm_lto_end): Likewise.
19712
19713 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19714 Richard Biener <rguenther@suse.de>
19715
19716 PR middle-end/84955
19717 * lto-streamer-out.c (output_function): Fix CFG loop state before
19718 streaming out.
19719 * omp-expand.c (expand_oacc_for): Handle calls to internal
19720 functions like regular functions.
19721
19722 2018-04-12 Richard Biener <rguenther@suse.de>
19723
19724 PR lto/85371
19725 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19726 for the early LTO debug to properly generate references to it
19727 during DIE emission. Do not re-use that for the skeleton for
19728 split-dwarf.
19729 (dwarf2out_early_finish): Likewise.
19730
19731 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19732
19733 PR target/85328
19734 * config/i386/sse.md
19735 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19736 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19737 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19738 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19739 and output is a reg, avoid creating invalid lowpart subreg, but
19740 instead split into a 512-bit move. Don't split if not AVX512VL,
19741 input is xmm16+ reg and output is a mem.
19742 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19743 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19744 xmm16+ reg and output is a mem.
19745
19746 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19747
19748 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19749 also for flag_dwarf2_cfi_asm.
19750
19751 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19752
19753 PR rtl-optimization/85342
19754 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19755 a bool scalar var inside of the loop instead. Don't try to update
19756 recog_data.operand after failed apply_change_group.
19757
19758 2018-04-12 Tom de Vries <tom@codesourcery.com>
19759
19760 PR target/85296
19761 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19762 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19763 array with flexible array member as array without given dimension.
19764 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19765 argument for undefined param to true.
19766
19767 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19768
19769 PR target/85321
19770 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19771 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19772 from PowerPC section.
19773 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19774 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19775 help text that is too long.
19776 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19777 help text that is too long.
19778 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19779 help text that is too long.
19780
19781 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19782
19783 * config/alpha/alpha.md (stack_probe_internal): Rename
19784 from "probe_stack". Update all callers.
19785
19786 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19787
19788 PR rtl-optimization/84566
19789 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19790 sched_macro_fuse_insns.
19791
19792 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19793
19794 PR target/84301
19795 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19796 (compute_block_dependences): ... from here.
19797
19798 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19799
19800 PR tree-optimization/85331
19801 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19802 from int to HOST_WIDE_INT.
19803
19804 2018-04-11 Martin Jambor <mjambor@suse.cz>
19805
19806 PR ipa/84149
19807 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19808 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19809 not the same as the source val.
19810 (cgraph_edge_brings_value_p): New parameter.
19811 (gather_edges_for_value): Pass destination value to
19812 cgraph_edge_brings_value_p.
19813 (perhaps_add_new_callers): Likewise.
19814 (get_info_about_necessary_edges): Likewise and exclude values brought
19815 only by self-recursive edges.
19816 (create_specialized_node): Redirect only clones of self-calling edges.
19817 (+self_recursive_pass_through_p): New function.
19818 (find_more_scalar_values_for_callers_subset): Use it.
19819 (find_aggregate_values_for_callers_subset): Likewise.
19820 (known_aggs_to_agg_replacement_list): Removed.
19821 (decide_whether_version_node): Re-calculate known constants for all
19822 remaining context clones.
19823
19824 2018-04-11 Richard Biener <rguenther@suse.de>
19825
19826 PR lto/85339
19827 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19828 from early DWARF output.
19829 (dwarf2out_early_finish): Output line info unconditionally into
19830 early DWARF and add reference to it.
19831
19832 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19833
19834 PR target/85281
19835 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19836 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19837 other than V2DFmode using iptr mode attribute.
19838 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19839
19840 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19841
19842 PR rtl-optimization/84659
19843 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19844
19845 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19846
19847 PR debug/85302
19848 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19849 SIZEP is NULL.
19850 (output_loc_list): Pass address of a dummy size variable even in the
19851 locview handling loop.
19852 (index_location_lists): Add comment on why skip_loc_list_entry can't
19853 call size_of_locs.
19854
19855 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19856
19857 PR target/85261
19858 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19859 into register.
19860
19861 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19862
19863 PR target/85321
19864 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19865 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19866 and -mstring-compare-inline-limit.
19867
19868 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19869
19870 PR target/85287
19871 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19872 for stack clash protection in a register whenever we need it to be in
19873 a register.
19874
19875 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19876
19877 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19878 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19879
19880 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19881
19882 PR target/85321
19883 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19884 the help text.
19885 (mlong-double-): Ditto.
19886 * config/rs6000/sysv4.opt (msdata=): Ditto.
19887 (mtls-size=): Ditto.
19888
19889 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19890
19891 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19892 erroneous entries for
19893 "vector int vec_ldl (int, long int *)", and
19894 "vector unsigned int vec_ldl (int, unsigned long int *)".
19895 Add comments and entries for
19896 "vector bool char vec_ldl (int, bool char *)",
19897 "vector bool short vec_ldl (int, bool short *)",
19898 "vector bool int vec_ldl (int, bool int *)",
19899 "vector bool long long vec_ldl (int, bool long long *)",
19900 "vector pixel vec_ldl (int, pixel *)",
19901 "vector long long vec_ldl (int, long long *)",
19902 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19903 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19904 type tree bool_long_long_type_node and correct definition of
19905 bool_V2DI_type_node to make reference to this new type tree.
19906 (rs6000_mangle_type): Replace erroneous reference to
19907 bool_long_type_node with bool_long_long_type_node.
19908 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19909 comments to emphasize sign distinctions for char and int types and
19910 replace RS6000_BTI_bool_long constant with
19911 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19912 use of RS6000_BTI_pixel.
19913 (bool_long_type_node): Remove this macro definition.
19914 (bool_long_long_type_node): New macro definition
19915
19916 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19917
19918 PR rtl-optimization/85300
19919 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19920 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19921 simplify_unary_operation fails.
19922
19923 2018-04-10 Martin Liska <mliska@suse.cz>
19924
19925 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19926 cgraph_edge and ipa_ref.
19927
19928 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19929
19930 PR target/85177
19931 PR target/85255
19932 * config/i386/sse.md
19933 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19934 computation of the VEC_MERGE selector from mask.
19935 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19936 Fix decoding of the VEC_MERGE selector into mask.
19937
19938 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19939
19940 PR tree-optimization/85286
19941 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19942
19943 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19944
19945 * final.c (final_1): Set insn_last_address as well as
19946 insn_current_address.
19947
19948 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19949
19950 PR target/85173
19951 * explow.c (emit_stack_probe): Call validize_mem on memory location
19952 before passing it to gen_probe_stack. Create address operand and
19953 legitimize it for the probe_stack_address case.
19954
19955 2018-04-09 Jan Hubicka <jh@suse.cz>
19956
19957 PR lto/85078
19958 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19959 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19960 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19961 walk basetypes.
19962 (free_lang_data): Rebuild type inheritance graph.
19963
19964 2018-04-09 Martin Sebor <msebor@redhat.com>
19965
19966 * invoke.texi (-finline-small-functions): Mention other optimization
19967 options.
19968 (-findirect-inlining, -fpartial-inlining): Same.
19969 (-finline-functions-called-once): Same.
19970 (-freorder-blocks-and-partition): Same.
19971
19972 2018-04-09 Jan Hubicka <jh@suse.cz>
19973
19974 PR rtl/84058
19975 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19976 jumps; choose last target that matches the criteria (i.e.
19977 no partition changes for non-crossing jumps).
19978 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19979 support for redirecting crossing jumps to non-crossing.
19980
19981 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19982
19983 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19984 also for naked functions.
19985
19986 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19987
19988 * config/arc/arc.md (add_shift): New pattern.
19989 (add_shift2): Likewise.
19990 (sub_shift): Likewise.
19991 (sub_shift_cmp0_noout): Likewise.
19992 (compare_si_ashiftsi): Likewise.
19993 (xbfu_cmp0_noout): New combine pattern.
19994 (xbfu_cmp0"): Likewise.
19995 (movsi_set_cc_insn): Place the predicable variant first.
19996 (commutative_binary_cmp0_noout): Remove clobber.
19997 (commutative_binary_cmp0): New pattern.
19998 (noncommutative_binary_cmp0): Likewise.
19999 (noncommutative_binary_cmp0_noout): Likewise.
20000 (noncommutative_binary_comparison_result_used): Removed.
20001 (rsub_cmp0): New pattern.
20002 (rsub_cmp0_noout): Likewise.
20003 (extzvsi): Changed, keep only meaningful variants.
20004 (SQH, SEZ): New iterators.
20005 (SQH_postfix): New mode attribute.
20006 (SEZ_prefix): New code attribute.
20007 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
20008 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
20009 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
20010 of numerical value.
20011 (noncommutative_operator): Check the availability of barrel
20012 shifter option.
20013
20014 2018-04-09 Richard Biener <rguenther@suse.de>
20015
20016 PR tree-optimization/85284
20017 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
20018 Only use the niter constraining form of simple_iv when the exit
20019 is always executed.
20020
20021 2018-04-09 Tom de Vries <tom@codesourcery.com>
20022
20023 PR target/84041
20024 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20025 (define_expand "*memory_barrier"): New define_expand.
20026 (define_insn "memory_barrier"): New insn.
20027
20028 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20029
20030 PR rtl-optimization/80463
20031 PR rtl-optimization/83972
20032 PR rtl-optimization/83480
20033
20034 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
20035 correct producer for the insn.
20036 (tidy_control_flow): Fixup seqnos in case of debug insns.
20037
20038 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20039
20040 PR rtl-optimization/83913
20041
20042 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
20043 different sched-times when merging exprs.
20044
20045 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20046
20047 PR rtl-optimization/83962
20048
20049 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
20050 tidy_fallthru_edge and tidy_control_flow.
20051
20052 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20053
20054 PR rtl-optimization/83530
20055
20056 * sel-sched.c (force_next_insn): New global variable.
20057 (remove_insn_for_debug): When force_next_insn is true, also leave only
20058 next insn in the ready list.
20059 (sel_sched_region): When the region wasn't scheduled, make another pass
20060 over it with force_next_insn set to 1.
20061
20062 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20063
20064 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
20065 into tm_file.
20066 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20067 for interrupt control.
20068 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20069 functions for interrupt control.
20070 * config/nds32/nds32-intrinsic.md: Likewise.
20071 * config/nds32/nds32_intrinsic.h: Likewise.
20072 * config/nds32/nds32.h (nds32_builtins): Likewise.
20073
20074 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20075
20076 * config/nds32/nds32.c (nds32_init_machine_status,
20077 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
20078 strict_aligned_p field.
20079 (nds32_expand_to_rtl_hook): New function.
20080 (TARGET_EXPAND_TO_RTL_HOOK): Define.
20081 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
20082
20083 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20084 Chung-Ju Wu <jasonwucj@gmail.com>
20085
20086 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
20087 * config/nds32/nds32-n7.md: New file.
20088 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
20089 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
20090 pipeline.
20091 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
20092 * config/nds32/nds32.md (pipeline_model): Add n7.
20093 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
20094 * config/nds32/pipelines.md: Include n7 settings.
20095
20096 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20097 Chung-Ju Wu <jasonwucj@gmail.com>
20098
20099 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
20100 * config/nds32/nds32-e8.md: New file.
20101 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
20102 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
20103 pipeline.
20104 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
20105 * config/nds32/nds32.md (pipeline_model): Add e8.
20106 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
20107 * config/nds32/pipelines.md: Include e8 settings.
20108
20109 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20110 Chung-Ju Wu <jasonwucj@gmail.com>
20111
20112 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
20113 * config/nds32/nds32-n8.md: New file.
20114 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
20115 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
20116 pipeline.
20117 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
20118 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
20119 * config/nds32/nds32.md (pipeline_model): Add n8.
20120 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
20121 * config/nds32/pipelines.md: Include n8 settings.
20122
20123 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20124 Chung-Ju Wu <jasonwucj@gmail.com>
20125
20126 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
20127 * config/nds32/nds32-n9-2r1w.md: New file.
20128 * config/nds32/nds32-n9-3r2w.md: New file.
20129 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
20130 nds32_register_ports): New or modify for cpu n9.
20131 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
20132 pipeline.
20133 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
20134 * config/nds32/nds32-utils.c: New file.
20135 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
20136 TARGET_MUL_SLOW): Define.
20137 * config/nds32/nds32.md (pipeline_model): New attribute.
20138 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
20139 New options that support cpu n9.
20140 * config/nds32/pipelines.md: Include n9 settings.
20141 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
20142
20143 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20144
20145 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
20146 information if necessary.
20147 (output_cond_branch_compare_zero): Likewise.
20148 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
20149 (nds32_target_alignment): Refine for alignment.
20150 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
20151 (FUNCTION_BOUNDARY): Modify.
20152 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
20153 align case.
20154 * config/nds32/nds32.opt (malways-align, malign-functions): New.
20155
20156 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20157
20158 * config/nds32/constants.md (unspec_volatile_element): Add values for
20159 TLB operation and data prefetch.
20160 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20161 functions for TLB operation and data prefetch.
20162 * config/nds32/nds32-intrinsic.md: Likewise.
20163 * config/nds32/nds32_intrinsic.h: Likewise.
20164 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
20165 (nds32_print_operand): Likewise.
20166 * config/nds32/nds32.h (nds32_builtins): Likewise.
20167
20168 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
20169 Andrew Pinski <pinsika@gcc.gnu.org>
20170
20171 PR middle-end/82976
20172 * match.pd: Use constant_boolean_node of correct type instead of
20173 boolean_true_node or boolean_false_node for simplifying
20174 pointer comparisons to zero.
20175
20176 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20177
20178 PR tree-optimization/80021
20179 * tree.c (verify_type_variant): Make error call in verify_variant_match
20180 translatable and remove final full stop.
20181
20182 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20183
20184 * config/nds32/constants.md (unspec_volatile_element): Add
20185 UNSPEC_VOLATILE_EH_RETURN.
20186 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
20187 nds32_output_stack_pop): Support dwarf exception handling process.
20188 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
20189 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
20190 exception handling process.
20191 (nds32_compute_stack_frame): Likewise.
20192 (nds32_return_addr_rtx): Likewise.
20193 (nds32_initial_elimination_offset): Likewise.
20194 (nds32_expand_prologue): Likewise.
20195 (nds32_expand_epilogue): Likewise.
20196 (nds32_dynamic_chain_address): New function.
20197 * config/nds32/nds32.h (machine_function): Add fields for dwarf
20198 exception handling.
20199 (DYNAMIC_CHAIN_ADDRESS): Define.
20200 (EH_RETURN_DATA_REGNO): Define.
20201 (EH_RETURN_STACKADJ_RTX): Define.
20202 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
20203 patterns for dwarf exception handling.
20204
20205 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20206
20207 * config/nds32/nds32.h: Clean up obsolete macros.
20208
20209 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20210
20211 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20212 Add enum values for particular instructions.
20213 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20214 particular intrinsic functions.
20215 * config/nds32/nds32-intrinsic.md: Likewise.
20216 * config/nds32/nds32_intrinsic.h: Likewise.
20217 * config/nds32/nds32.h (nds32_builtins): Likewise.
20218 * config/nds32/nds32.md (type): Add pbsad and pbsada.
20219 (btst, ave): New patterns for particular instructions.
20220
20221 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20222
20223 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20224 Add enum values for atomic load/store and memory sync.
20225 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
20226 and memory sync.
20227 * config/nds32/nds32-intrinsic.md: Likewise.
20228 * config/nds32/nds32_intrinsic.h: Likewise.
20229 * config/nds32/nds32.h (nds32_builtins): Likewise.
20230
20231 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20232
20233 PR tree-optimization/85257
20234 * fold-const.c (native_encode_vector): If not all elts could fit
20235 and off is -1, return 0 rather than offset.
20236 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
20237 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
20238 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
20239 adjust buffer in native_interpret_expr call.
20240
20241 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20242
20243 * config/nds32/constants.md (unspec_volatile_element): Add cache
20244 control enum values.
20245 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20246 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20247 * config/nds32/nds32.c (nds32_cctl_names): New.
20248 (nds32_print_operand): Handle cache control register names.
20249 * config/nds32/nds32.h (nds32_builtins): New enum values.
20250 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20251 macros.
20252 * config/nds32/nds32.md (type): Add mmu.
20253 * config/nds32/pipelines.md (simple_insn): Add mmu.
20254
20255 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20256
20257 * config/nds32/nds32.md (type): Remove call.
20258 * config/nds32/pipelines.md (simple_insn): Likewise.
20259
20260 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20261
20262 * config/nds32/constants.md (unspec_volatile_element): Add
20263 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20264 UNSPEC_VOLATILE_FMFCFG.
20265 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20266 description for fmfcfg and fmfcsr.
20267 (bdesc_1arg): Add fmtcsr.
20268 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20269 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20270 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20271 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20272 unspec_fmfcfg): New patterns.
20273 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20274 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20275 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20276 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20277 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20278 __nds32__fmfcfg): Define.
20279
20280 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20281
20282 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20283 intrinsic register names.
20284 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20285 intrinsic register enum values and macros.
20286
20287 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20288
20289 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20290 for load/store addressing form.
20291 (nds32_print_operand_address): Likewise.
20292
20293 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
20294
20295 PR target/85196
20296 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20297 based on LABEL_REF. Remove useless assertion.
20298 (pic_address_needs_scratch): Fix formatting.
20299 (sparc_legitimize_pic_address): Minor tweaks.
20300 (sparc_delegitimize_address): Adjust assertion accordingly.
20301 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20302 into symbolic_operand.
20303 (movsi_high_pic_label_ref): Likewise.
20304 (movsi_lo_sum_pic_label_ref): Likewise.
20305 (movdi_pic_label_ref): Likewise.
20306 (movdi_high_pic_label_ref): Likewise.
20307 (movdi_lo_sum_pic_label_ref): Likewise.
20308
20309 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
20310
20311 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20312 custom LIB_SPEC setup.
20313
20314 2018-04-06 Ruslan Bukin <br@bsdpad.com>
20315 Kito Cheng <kito.cheng@gmail.com>
20316
20317 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20318 * config/riscv/freebsd.h: New.
20319
20320 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20321
20322 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20323 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20324 file.
20325
20326 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20327 Kito Cheng <kito.cheng@gmail.com>
20328
20329 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20330 nds32_output_call, nds32_symbol_binds_local_p): New functions.
20331 * config/nds32/nds32-protos.h (nds32_output_call,
20332 nds32_output_return): Declare.
20333 * config/nds32/nds32.md: Refine all the call and return patterns.
20334
20335 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20336
20337 PR debug/85252
20338 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20339 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20340
20341 PR rtl-optimization/84872
20342 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20343 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20344 EDGE_CROSSING edge.
20345
20346 2018-04-06 Tamar Christina <tamar.christina@arm.com>
20347
20348 * expr.c (copy_blkmode_to_reg): Revert 254862.
20349 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20350
20351 2018-04-06 Richard Biener <rguenther@suse.de>
20352
20353 PR middle-end/85244
20354 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20355 after seeing a component reference with an adjacent field. Treat
20356 refs to arrays at struct end of external decls similar to
20357 refs to unconstrained commons.
20358
20359 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20360
20361 PR sanitizer/85213
20362 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20363 look through SAVE_EXPRs with non-side-effects argument. Adjust
20364 recursive calls.
20365 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20366 save_p here.
20367
20368 2018-04-06 Richard Biener <rguenther@suse.de>
20369
20370 PR middle-end/85180
20371 * alias.c (find_base_term): New wrapper around find_base_term
20372 unwinding CSELIB_VAL_PTR changes.
20373 (find_base_term): Do not restore CSELIB_VAL_PTR during the
20374 recursion.
20375
20376 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20377
20378 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20379 instructions.
20380 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20381 constant definitions.
20382 ("nop"): lr 0,0 -> nopr r0
20383 ("nop_lr0", "nop_lr1"): New insn definitions.
20384
20385 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20386
20387 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20388 NDS32_V3PUSH_AVAILABLE_P macro.
20389
20390 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
20391 Chung-Ju Wu <jasonwucj@gmail.com>
20392
20393 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20394 (nds32*-*-*): Add float and fpu_config into supported_defaults.
20395 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20396 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20397 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20398 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20399 * config/nds32/constraints.md: New constraints and checking for hard
20400 float configuration.
20401 * config/nds32/iterators.md: New mode iterator and attribute for hard
20402 float configuration.
20403 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20404 patterns.
20405 * config/nds32/nds32-fpu.md: New file.
20406 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20407 deal with hard float code generation.
20408 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20409 ARCH_V3S.
20410 (abi_type, float_reg_number): New enum type.
20411 * config/nds32/nds32-predicates.c: New predicates for hard float.
20412 * config/nds32/nds32-protos.h: Declare functions for hard float.
20413 * config/nds32/nds32.c: Implementation for hard float configuration.
20414 * config/nds32/nds32.h: Definitions for hard float configuration.
20415 * config/nds32/nds32.md: Include hard float machine description and
20416 modify patterns for hard float configuration.
20417 * config/nds32/nds32.opt: New options for hard float configuration.
20418 * config/nds32/predicates.md: New predicates for hard float
20419 configuration.
20420
20421 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20422
20423 * common/config/nds32/nds32-common.c
20424 (nds32_option_optimization_table): Enable -mreleax-hint by default.
20425
20426 2018-04-05 Jakub Jelinek <jakub@redhat.com>
20427
20428 PR middle-end/85195
20429 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20430 CONSTRUCTOR_ELT (ctor, ...)->value.
20431
20432 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
20433
20434 PR target/85193
20435 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20436
20437 2018-04-05 Tom de Vries <tom@codesourcery.com>
20438
20439 PR target/85204
20440 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20441 cond jump.
20442
20443 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20444 Kito Cheng <kito.cheng@gmail.com>
20445
20446 * config/nds32/constraints.md (U33): Fine-tune checking condition.
20447 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20448 * config/nds32/nds32.h (nds32_16bit_address_type): Add
20449 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20450
20451 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20452 Kito Cheng <kito.cheng@gmail.com>
20453
20454 * config/nds32/constraints.md (Ufe): New memory constraint.
20455 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20456 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20457 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20458 operands.
20459 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20460 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20461
20462 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20463
20464 * config/nds32/nds32.md: Use optimize_size in the condition for
20465 alu-shift instructions.
20466
20467 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20468
20469 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20470
20471 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20472
20473 * config/nds32/nds32.md (negsi2): Refine pattern.
20474
20475 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20476 Chung-Ju Wu <jasonwucj@gmail.com>
20477
20478 * config/nds32/iterators.md (shift_rotate): New code iterator.
20479 (shift): New code attribute.
20480 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20481 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20482 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20483 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20484 bit-wise operations.
20485 (andsi3, *andsi3): Ditto.
20486 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20487 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20488 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20489 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20490 nds32_ior_operand, nds32_xor_operand): New predicates.
20491
20492 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20493
20494 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20495 (addsi3, subsi3): ... this.
20496
20497 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20498
20499 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20500
20501 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20502
20503 * config/nds32/nds32.md: Adjust indention.
20504
20505 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20506
20507 * config/nds32/nds32.md (feature): New attribute.
20508
20509 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20510
20511 * config/nds32/nds32.md (subtype): New attribute.
20512
20513 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20514
20515 PR target/85203
20516 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20517 expansion to perform a bitwise AND of the argument followed by a
20518 boolean negation of the result.
20519
20520 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20521
20522 PR rtl-optimization/84878
20523 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20524 the basic block. Assert the use reference is not artificial and that
20525 it has an associated insn.
20526
20527 2018-04-04 Michael Matz <matz@suse.de>
20528
20529 * builtins.c (compute_objsize): Pass correct operand
20530 to array_at_struct_end_p.
20531
20532 2018-04-04 Richard Biener <rguenther@suse.de>
20533
20534 PR lto/85176
20535 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20536 from contexts for DINFO_LEVEL_TERSE and below.
20537
20538 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20539
20540 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20541 resiter_operand condition.
20542 * config/nds32/nds32.md (*move<mode>): Ditto.
20543
20544 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20545 Monk Chiang <sh.chiang04@gmail.com>
20546
20547 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20548
20549 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20550
20551 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20552
20553 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20554 Kito Cheng <kito.cheng@gmail.com>
20555
20556 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20557 nds32_cond_code_str, output_cond_branch,
20558 output_cond_branch_compare_zero, nds32_expand_cbranch,
20559 nds32_expand_cstore, nds32_expand_movcc,
20560 nds32_output_cbranchsi4_equality_zero,
20561 nds32_output_cbranchsi4_equality_reg,
20562 nds32_output_cbranchsi4_equality_reg_or_const_int,
20563 nds32_output_cbranchsi4_greater_less_zero: New functions.
20564 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20565 nds32_expand_cstore, nds32_expand_movcc,
20566 nds32_output_cbranchsi4_equality_zero,
20567 nds32_output_cbranchsi4_equality_reg,
20568 nds32_output_cbranchsi4_equality_reg_or_const_int,
20569 nds32_output_cbranchsi4_greater_less_zero): Declare.
20570 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20571 nds32_rimm11s_operand): New predicates.
20572 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20573 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20574 patterns.
20575
20576 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20577
20578 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20579 * config/nds32/nds32.md: Ditto.
20580 * config/nds32/pipelines.md: Ditto.
20581
20582 2018-04-04 Richard Biener <rguenther@suse.de>
20583
20584 PR tree-optimization/85168
20585 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20586 propagating abnormals.
20587
20588 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20589
20590 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20591
20592 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20593 Kito Cheng <kito.cheng@gmail.com>
20594
20595 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20596 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20597 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20598 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20599 * config/nds32/nds32.md (sibcall_internal): New.
20600 (sibcall_register): Remove.
20601 (sibcall_immediate): Remove.
20602 (sibcall_value_internal): New.
20603 (sibcall_value_register): Remove.
20604 (sibcall_value_immediate): Remove.
20605 * config/nds32/predicates.md (nds32_general_register_operand): New.
20606 (nds32_call_address_operand): New.
20607
20608 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20609
20610 PR rtl-optimization/85167
20611 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20612 bb_defs if *split_p, instead preinitialize it to NULL.
20613
20614 PR tree-optimization/85156
20615 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20616 evaluating the argument multiple times.
20617
20618 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20619
20620 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20621 than vector.
20622 (_mm_cvtpd_ps): Likewise.
20623 (_mm_cvttpd_epi32): Likewise.
20624 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20625 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20626 vector, pixel, and bool following altivec.h include.
20627
20628 2018-04-03 Martin Sebor <msebor@redhat.com>
20629
20630 * doc/extend.texi (Common Function Attributes): Clarify.
20631 (const attribute): Likewise.
20632 (pure attribute): Likewise.
20633
20634 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20635
20636 PR target/85169
20637 * config/i386/i386.c (ix86_expand_vector_set): Use
20638 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20639
20640 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20641
20642 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20643 instructions when changing rounding bits to preserve precision bits
20644 in the x87 control word.
20645
20646 2018-04-03 Martin Liska <mliska@suse.cz>
20647
20648 PR tree-optimization/82491
20649 * rtl.h (strip_offset_and_add): Replace += suboffset with
20650 poly_uint64 () + suboffset.
20651
20652 2018-03-29 Martin Liska <mliska@suse.cz>
20653 Martin Jambor <mjambor@suse.cz>
20654
20655 PR ipa/84947
20656 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20657 param_type is not an integral or pointer type.
20658
20659 2018-04-03 Richard Biener <rguenther@suse.de>
20660
20661 * sese.h (recompute_all_dominators): Remove.
20662
20663 2018-04-02 Martin Sebor <msebor@redhat.com>
20664
20665 * doc/invoke.texi (-Wrestrict): Fix typos.
20666
20667 2018-04-02 Jim Wilson <jimw@sifive.com>
20668
20669 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20670 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20671 (<optab>di3, <optab>si3_extend): Likewise.
20672 (<optab>si3_mask, <optab>si3_mask_1): New.
20673 (<optab>di3_mask, <optab>di3_mask_1): New.
20674 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20675 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20676 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20677
20678 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20679
20680 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20681 example.
20682
20683 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20684
20685 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20686 (nds32_canonicalize_comparison): New function.
20687
20688 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20689 Kito Cheng <kito.cheng@gmail.com>
20690 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20691
20692 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20693 * config/nds32/constants.md (unspec_volatile_element): Add
20694 UNSPEC_VOLATILE_RELAX_GROUP.
20695 * config/nds32/nds32-relax-opt.c: New file.
20696 * config/nds32/nds32-predicates.c
20697 (nds32_symbol_load_store_p): New function.
20698 * config/nds32/nds32-protos.h
20699 (nds32_symbol_load_store_p): Declare function.
20700 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20701 * config/nds32/nds32.c
20702 (nds32_register_pass): New function to register pass.
20703 (nds32_register_passes): New function to register passes.
20704 * config/nds32/nds32.md (relax_group): New pattern.
20705 * config/nds32/nds32.opt (mrelax-hint): New option.
20706 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20707
20708 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20709
20710 * config/nds32/t-nds32: Modify files dependency.
20711
20712 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20713
20714 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20715 (PROFILE_HOOK): Define its implementation.
20716
20717 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20718
20719 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20720 type and 32-bit size.
20721
20722 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20723
20724 PR middle-end/85090
20725 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20726 (V_128_256): New mode iterator.
20727 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20728 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20729 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20730 of V.
20731 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20732 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20733
20734 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20735
20736 PR target/83315
20737 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20738 NaN inputs correctly.
20739
20740 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20741
20742 PR target/80546
20743 * config/rs6000/vsx.md (??r): New mode attribute.
20744 (*vsx_mov<mode>_64bit): Use it.
20745 (*vsx_mov<mode>_32bit): Likewise.
20746
20747 2018-03-30 Martin Sebor <msebor@redhat.com>
20748
20749 PR tree-optimization/84818
20750 * builtins.c (check_access): Use warning_n.
20751
20752 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20753
20754 PR target/83822
20755 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20756 condition.
20757 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20758 condition.
20759
20760 2018-03-30 Julia Koval <julia.koval@intel.com>
20761
20762 PR target/84413
20763 * x86-tune.def (movx, partial_reg_dependency): Enable for
20764 m_SKYLAKE_AVX512.
20765
20766 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20767
20768 PR inline-asm/84985
20769 * lra-constraints.c (process_alt_operands): Move setting
20770 this_alternative_matches below.
20771
20772 2018-03-29 Martin Liska <mliska@suse.cz>
20773
20774 PR lto/84995.
20775 * doc/invoke.texi: Document how LTO works with debug info.
20776 Describe auto-load support of binutils. Mention 'x86-64'
20777 as valid option value of -march option.
20778
20779 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20780
20781 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20782
20783 PR c/85094
20784 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20785 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20786 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20787 checking.
20788
20789 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20790
20791 PR target/84912
20792 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20793 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20794 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20795 for RS6000_BTM_POWERPC64.
20796 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20797 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20798 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20799 definition.
20800 (DIVDE): Use it.
20801 (DIVDEU): Likewise.
20802
20803 2018-03-28 Carl Love <cel@us.ibm.com>
20804
20805 Revert
20806 2017-09-27 Carl Love <cel@us.ibm.com>
20807
20808 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20809 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20810 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20811 fctiw instruction.
20812
20813 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20814
20815 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20816 instead of __vector bool.
20817 (_mm_max_pu8): Likewise.
20818 (_mm_min_pi16): Likewise.
20819
20820 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20821
20822 PR target/84912
20823 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20824 (DIVWEUO): Likewise.
20825 (DIVDEO): Likewise.
20826 (DIVDEUO): Likewise.
20827 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20828 DIVWEUO and DIVDEUO.
20829 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20830 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20831 (div_extend): Likewise.
20832 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20833 builtin function.
20834 (__builtin_divweuo): Likewise.
20835 (__builtin_divdeo): Likewise.
20836 (__builtin_divdeuo): Likewise.
20837
20838 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20839
20840 PR target/85095
20841 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20842 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20843
20844 PR tree-optimization/82004
20845 * gimple-match-head.c (optimize_pow_to_exp): New function.
20846 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20847 Don't fold to exp if optimize_pow_to_exp is false.
20848
20849 2018-03-28 Martin Liska <mliska@suse.cz>
20850
20851 PR other/84819
20852 * calls.c (initialize_argument_information): Fix trailing space.
20853 * common.opt: Fix typo and provide better explanation for
20854 -fsanitize-coverage option.
20855 * config/i386/i386.opt: Fix typo.
20856
20857 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20858 Martin Liska <mliska@suse.cz>
20859
20860 PR sanitizer/85081
20861 * gimplify.c (asan_poison_variable): Don't do the check for
20862 gimplify_omp_ctxp here.
20863 (gimplify_decl_expr): Do it here.
20864 (gimplify_target_expr): Likewise.
20865
20866 2018-03-28 Martin Liska <mliska@suse.cz>
20867
20868 PR target/84988
20869 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20870 chkp_type_bounds_count if MPX is not enabled.
20871
20872 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20873
20874 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20875
20876 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20877
20878 PR target/84914
20879 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20880 function to create the function decl for complex long double
20881 multiply and divide for -mabi=ieeelongdouble.
20882 (init_float128_ieee): Call it.
20883
20884 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20885
20886 PR target/85044
20887 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20888 -fcf-protection=branch -mibt.
20889 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20890
20891 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20892
20893 PR target/81863
20894 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20895 arm_word_relocations.
20896
20897 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20898
20899 PR target/85056
20900 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20901 extern array declarations.
20902
20903 2018-03-27 Richard Biener <rguenther@suse.de>
20904
20905 PR middle-end/84067
20906 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20907 explicit single_use checks.
20908
20909 2018-03-27 Richard Biener <rguenther@suse.de>
20910
20911 PR tree-optimization/85082
20912 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20913 Valueize the VUSE.
20914
20915 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20916
20917 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20918 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20919 Turn on fasynchronous-unwind-tables and funwind-tables.
20920
20921 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20922
20923 PR target/85073
20924 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20925 (*bmi_blsr_<mode>_ccz): Ditto.
20926
20927 2018-03-26 Tom de Vries <tom@codesourcery.com>
20928
20929 PR tree-optimization/85063
20930 * omp-general.c (offloading_function_p): New function. Factor out
20931 of ...
20932 * omp-offload.c (pass_omp_target_link::gate): ... here.
20933 * omp-general.h (offloading_function_p): Declare.
20934 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20935 with attribute omp declare target for offloading functions.
20936
20937 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20938
20939 PR tree-optimization/84005
20940 * tree-data-ref.h (get_base_for_alignment): Declare.
20941 * tree-data-ref.c (get_base_for_alignment_1): New function.
20942 (get_base_for_alignment): Likewise.
20943 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20944 get_base_for_alignment to find a suitable base object, instead
20945 of always using drb->base_address.
20946
20947 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20948
20949 PR inline-asm/85022
20950 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20951 known size by default.
20952
20953 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20954
20955 PR inline-asm/85030
20956 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20957 and non BLKmode operands.
20958
20959 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20960
20961 PR target/85026
20962 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20963 Clean up attributes.
20964
20965 2018-03-23 Richard Biener <rguenther@suse.de>
20966
20967 PR debug/85020
20968 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20969 we are going to emit early debug for LTO.
20970
20971 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20972
20973 PR inline-asm/85034
20974 * function.c (match_asm_constraints_1): Don't optimize if input
20975 doesn't satisfy general_operand predicate for output's mode.
20976
20977 PR inline-asm/85022
20978 * alias.c (write_dependence_p): Don't require for x_canonicalized
20979 non-VOIDmode if x has VOIDmode.
20980
20981 PR sanitizer/85029
20982 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20983 just don't try to optimize it rather than assert it never happens.
20984
20985 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20986
20987 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20988 macro expansions for definition of ST_INTERNAL_<mode> and
20989 LD_INTERNAL_<mode> builtins.
20990 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20991 Remove prototype.
20992 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20993 function.
20994 (altivec_expand_st_builtin): Likewise.
20995 (altivec_expand_builtin): Remove calls to deleted functions.
20996 (rs6000_address_for_altivec): Delete this function.
20997 * config/rs6000/vector.md: Remove expands for
20998 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20999
21000 2018-03-22 Sudakshina Das <sudi.das@arm.com>
21001
21002 PR target/84826
21003 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
21004 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
21005 re-computing once computed.
21006 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
21007 (arm_init_machine_status): Initialize
21008 machine->static_chain_stack_bytes.
21009
21010 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21011
21012 PR target/84760
21013 * doc/extend.texi: Add four new prototypes for vec_ld.
21014 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
21015 definitions for more logical presentation.
21016 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
21017 entries for V1TI variants of __builtin_altivec_ld builtin.
21018 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
21019 handling of V1TI variant of LVX icode pattern.
21020 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
21021 (rs6000_gimple_fold_builtin): Likewise.
21022 (altivec_init_builtins): Add code to define
21023 __builtin_altivec_lvx_v1ti function.
21024
21025 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21026
21027 PR inline-asm/84941
21028 * function.c (match_asm_constraints_1): Don't do the optimization
21029 if input isn't a REG, SUBREG, MEM or constant.
21030
21031 2018-03-22 Tom de Vries <tom@codesourcery.com>
21032
21033 PR tree-optimization/84956
21034 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
21035 bb_has_abnormal_pred.
21036
21037 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21038
21039 PR sanitizer/85018
21040 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
21041 DECL_INITIAL (decl) to decl at the end.
21042 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
21043 adjust the comment.
21044
21045 2018-03-21 Joseph Myers <joseph@codesourcery.com>
21046
21047 * doc/extend.texi (__builtin_tgmath): Document when complex
21048 integer types are treated as _Complex _Float64.
21049
21050 2018-03-21 Tom de Vries <tom@codesourcery.com>
21051
21052 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
21053
21054 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21055
21056 PR tree-optimization/84960
21057 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
21058 if it is ENTRY block, move them into single succ of ENTRY in that case.
21059
21060 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
21061
21062 PR tree-optimization/84811
21063 * poly-int.h (poly_span_traits): Remove the T3 parameter and
21064 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
21065 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
21066 (known_subrange_p): Update accordingly. Cast each value involved
21067 in the size comparison, rather than casting the result of the
21068 subtraction.
21069
21070 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21071
21072 PR tree-optimization/84982
21073 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
21074 by flipping the least significant bit rather than all bits from
21075 bitpos to bitpos + bitsize - 1.
21076
21077 2018-03-21 Nathan Sidwell <nathan@acm.org>
21078
21079 * doc/extend.texi (Deprecated Features): Remove mention of
21080 long-deleted deprecations.
21081
21082 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21083
21084 PR jit/84288
21085 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
21086 * configure: Regenerate.
21087
21088 2018-03-21 Tom de Vries <tom@codesourcery.com>
21089
21090 PR tree-optimization/83126
21091 * tree-parloops.c (num_phis): New function.
21092 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
21093
21094 2018-03-21 Nathan Sidwell <nathan@acm.org>
21095
21096 * doc/extend.texi (Deprecated Features): Update deprecated flags,
21097 mention anon-struct/union members and trailing attributes.
21098
21099 2018-03-21 Bin Cheng <bin.cheng@arm.com>
21100
21101 PR tree-optimization/84969
21102 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
21103 builtin memset partitions if they set different rhs values.
21104
21105 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21106
21107 PR rtl-optimization/84989
21108 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
21109 VEC_DUPLICATE with scalar result mode.
21110
21111 2018-03-21 Martin Liska <mliska@suse.cz>
21112
21113 PR ipa/84963
21114 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
21115 not intended return statement.
21116
21117 2018-03-21 Martin Liska <mliska@suse.cz>
21118
21119 PR target/84988
21120 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
21121 (chkp_find_bound_slots_1): Limit number of iterations.
21122
21123 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
21124
21125 PR target/84838
21126 * Minor grammar fixes for x86 options.
21127
21128 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21129
21130 PR debug/84875
21131 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
21132 holding REG_CFA_RESTORE notes, instead turn them into a USE.
21133
21134 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
21135
21136 PR target/83789
21137 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
21138 (altivec_lvx_<mode>_1op): Likewise.
21139 (altivec_stvx_<mode>_2op): Likewise.
21140 (altivec_stvx_<mode>_1op): Likewise.
21141 (altivec_lvx_<VM2:mode>): New define_expand.
21142 (altivec_stvx_<VM2:mode>): Likewise.
21143 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
21144 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21145 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
21146 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21147 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
21148 (rs6000_gen_lvx): Likewise.
21149 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
21150 (altivec_expand_stv_builtin): Likewise.
21151 (altivec_expand_builtin): Likewise.
21152 * config/rs6000/vector.md: Likewise.
21153
21154 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21155
21156 PR target/82518
21157 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
21158 BYTES_BIG_ENDIAN.
21159
21160 2018-03-20 Richard Biener <rguenther@suse.de>
21161
21162 PR target/84986
21163 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
21164 sign-conversions as zero, fall back to standard scalar_stmt
21165 cost for the rest.
21166
21167 2018-03-20 Martin Liska <mliska@suse.cz>
21168
21169 PR ipa/84825
21170 * predict.c (rebuild_frequencies): Handle case when we have
21171 PROFILE_ABSENT, but flag_guess_branch_prob is false.
21172
21173 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21174
21175 PR target/84990
21176 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
21177 flag_section_anchors.
21178 * varasm.c (use_blocks_for_decl_p): Remove hack for
21179 dw2_force_const_mem.
21180
21181 PR target/84845
21182 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
21183 to ...
21184 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
21185 be created, use lowpart_subreg of operands[0] rather than operands[0]
21186 itself.
21187 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
21188 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
21189 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
21190 and n constraint instead of aarch64_shift_imm_di and Usd.
21191 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
21192 (*aarch64_<optab>_reg_minus<mode>3): ... this.
21193
21194 2018-03-20 Sudakshina Das <sudi.das@arm.com>
21195
21196 PR target/82989
21197 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
21198 to favor GPR over NEON registers.
21199 (<shift>di3_neon): Likewise.
21200
21201 2018-03-20 Tom de Vries <tom@codesourcery.com>
21202
21203 PR target/84952
21204 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
21205 (nvptx_process_pars): Emit bar.sync asap and alap.
21206
21207 2018-03-20 Tom de Vries <tom@codesourcery.com>
21208
21209 PR target/84954
21210 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
21211 seen_label if seen_label is already set.
21212
21213 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21214
21215 PR target/84945
21216 * config/i386/i386.c (fold_builtin_cpu): For features above 31
21217 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
21218 Use 1U instead of 1. Formatting fixes.
21219
21220 PR c/84953
21221 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
21222 instead of TREE_TYPE (s1) for the return value.
21223
21224 2018-03-19 Jakub Jelinek <jakub@redhat.com>
21225
21226 PR tree-optimization/84946
21227 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
21228 bitsize + bitsize in poly_uint64 rather than poly_int64.
21229
21230 PR sanitizer/78651
21231 * dwarf2asm.c: Include fold-const.c.
21232 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
21233 of decl rather than decl itself.
21234
21235 PR rtl-optimization/84643
21236 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
21237
21238 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
21239
21240 PR sanitizer/78651
21241 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21242 calling assemble_variable.
21243
21244 2018-03-19 Sudakshina Das <sudi.das@arm.com>
21245
21246 PR target/81647
21247 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21248 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21249
21250 2018-03-19 Jim Wilson <jimw@sifive.com>
21251
21252 PR bootstrap/84856
21253 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21254 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21255 (riscv_first_stack_step): Likewise.
21256 (riscv_option_override): Use STACK_BOUNDARY instead of
21257 MIN_STACK_BOUNDARY.
21258 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21259 MIN_STACK_BOUNDARY.
21260 (BIGGEST_ALIGNMENT): Set to 128.
21261 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21262 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21263 STACK_BOUNDARY.
21264
21265 2018-03-19 Richard Biener <rguenther@suse.de>
21266
21267 PR tree-optimization/84933
21268 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21269 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21270
21271 2018-03-19 Richard Biener <rguenther@suse.de>
21272
21273 PR tree-optimization/84859
21274 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21275 (cond_if_else_store_replacement): Perform sinking operation on
21276 single-store BBs regardless of MAX_STORES_TO_SINK setting.
21277 Generalize what a BB with a single eligible store is.
21278
21279 2018-03-19 Richard Biener <rguenther@suse.de>
21280
21281 PR tree-optimization/84929
21282 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21283 chrec_is_positive against non-chrec arg.
21284
21285 2018-03-19 Tamar Christina <tamar.christina@arm.com>
21286
21287 PR target/84711
21288 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21289
21290 2018-03-18 Martin Liska <mliska@suse.cz>
21291
21292 PR rtl-optimization/84635
21293 * regrename.c (build_def_use): Use matches_mode only when
21294 matches >= 0.
21295
21296 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
21297
21298 PR tree-optimization/84913
21299 * tree-vect-loop.c (vectorizable_reduction): Don't try to
21300 vectorize chains of COND_EXPRs.
21301
21302 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21303
21304 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21305
21306 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21307
21308 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21309
21310 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21311
21312 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21313
21314 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21315 Kito Cheng <kito.cheng@gmail.com>
21316
21317 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21318 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21319 (nds32_adjust_reg_alloc_order): New function.
21320 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21321
21322 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
21323
21324 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21325 nds32_print_operand, nds32_print_operand_address): Use
21326 HOST_WIDE_INT_PRINT_DEC instead.
21327
21328 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21329
21330 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21331
21332 2018-03-17 Jakub Jelinek <jakub@redhat.com>
21333
21334 PR target/84902
21335 * config/i386/i386.c (initial_ix86_tune_features,
21336 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21337 unsigned long long.
21338 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21339 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21340 rather than 1u << ix86_tune. Formatting fix.
21341 (ix86_option_override_internal): Change ix86_arch_mask from
21342 unsigned int to unsigned HOST_WIDE_INT, initialize to
21343 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21344 (ix86_function_specific_restore): Likewise.
21345
21346 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21347
21348 PR target/84899
21349 * postreload.c (reload_combine_recognize_pattern): Perform
21350 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21351 truncate_int_for_mode the result for the destination's mode.
21352
21353 PR c/84909
21354 * hsa-gen.c (mem_type_for_type): Fix comment typo.
21355 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21356 Likewise.
21357 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21358 Likewise.
21359
21360 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
21361
21362 PR target/84876
21363 * lra-assigns.c (lra_split_hard_reg_for): Don't use
21364 regno_allocno_class_array and sorted_pseudos.
21365 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21366 insns where regno is used.
21367
21368 2018-03-16 Martin Liska <mliska@suse.cz>
21369
21370 PR ipa/84833
21371 * multiple_target.c (create_dispatcher_calls): Redirect
21372 reference in the symbol table.
21373
21374 2018-03-16 Martin Liska <mliska@suse.cz>
21375
21376 PR ipa/84722
21377 * multiple_target.c (create_dispatcher_calls): Redirect also
21378 an alias.
21379
21380 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21381
21382 PR c++/79937
21383 PR c++/82410
21384 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21385 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21386 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21387
21388 2018-03-16 Julia Koval <julia.koval@intel.com>
21389
21390 * doc/invoke.texi (Skylake Server): Add CLWB.
21391 Cannonlake): Remove CLWB.
21392
21393 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21394
21395 PR tree-optimization/84841
21396 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21397 1 << 3.
21398 (FLOAT_ONE_CONST_TYPE): Define.
21399 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21400 (sort_by_operand_rank): Put entries with higher constant_type last
21401 rather than first to match comments.
21402
21403 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
21404
21405 * config/nios2/nios2.md (movsi_internal): Fix thinko in
21406 split predicate.
21407
21408 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21409
21410 PR c++/79085
21411 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21412 check and use address of target always.
21413
21414 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
21415
21416 PR target/84574
21417 * config/i386/i386.c (indirect_thunk_needed): Update comments.
21418 (indirect_thunk_bnd_needed): Likewise.
21419 (indirect_thunks_used): Likewise.
21420 (indirect_thunks_bnd_used): Likewise.
21421 (indirect_return_needed): New.
21422 (indirect_return_bnd_needed): Likewise.
21423 (output_indirect_thunk_function): Add a bool argument for
21424 function return.
21425 (output_indirect_thunk_function): Don't generate alias for
21426 function return thunk.
21427 (ix86_code_end): Call output_indirect_thunk_function to generate
21428 function return thunks.
21429 (ix86_output_function_return): Set indirect_return_bnd_needed
21430 and indirect_return_needed instead of indirect_thunk_bnd_needed
21431 and indirect_thunk_needed.
21432
21433 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
21434
21435 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21436 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21437 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21438
21439 2018-03-15 David Malcolm <dmalcolm@redhat.com>
21440 Paul Hua <paul.hua.gm@gmail.com>
21441
21442 PR c/84852
21443 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21444
21445 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
21446
21447 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21448 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21449 resp. SFmode cases.
21450
21451 2018-03-15 Tamar Christina <tamar.christina@arm.com>
21452
21453 PR target/84711
21454 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21455 instead of GET_MODE_SIZE when comparing Units.
21456
21457 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21458
21459 PR target/68256
21460 * varasm.c (hash_section): Return an unchangeble hash value
21461 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21462 Return !aarch64_can_use_per_function_literal_pools_p ().
21463
21464 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21465
21466 PR target/84860
21467 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21468 rather than address of cmode as last argument to prepare_cmp_insn.
21469
21470 2018-03-15 Julia Koval <julia.koval@intel.com>
21471
21472 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21473 F_AVX512VNNI, F_AVX512BITALG): New.
21474
21475 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21476
21477 PR target/83451
21478 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21479 insn for floating-point loads and stores.
21480
21481 2018-03-14 Carl Love <cel@us.ibm.com>
21482
21483 * config/rs6000/rs6000-c.c: Add macro definitions for
21484 ALTIVEC_BUILTIN_VEC_PERMXOR.
21485 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21486 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21487 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21488 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21489 UNSPEC_VPERMXOR.
21490 * config/doc/extend.texi: Add prototypes for vec_permxor.
21491
21492 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21493
21494 PR c/84852
21495 * diagnostic-show-locus.c (class layout_point): Convert m_line
21496 from int to linenum_type.
21497 (line_span::comparator): Use linenum "compare" function when
21498 comparing line numbers.
21499 (test_line_span): New function.
21500 (layout_range::contains_point): Convert param "row" from int to
21501 linenum_type.
21502 (layout_range::intersects_line_p): Likewise.
21503 (layout::will_show_line_p): Likewise.
21504 (layout::print_source_line): Likewise.
21505 (layout::should_print_annotation_line_p): Likewise.
21506 (layout::print_annotation_line): Likewise.
21507 (layout::print_leading_fixits): Likewise.
21508 (layout::annotation_line_showed_range_p): Likewise.
21509 (struct line_corrections): Likewise for field m_row.
21510 (line_corrections::line_corrections): Likewise for param "row".
21511 (layout::print_trailing_fixits): Likewise.
21512 (layout::get_state_at_point): Likewise.
21513 (layout::get_x_bound_for_row): Likewise.
21514 (layout::print_line): Likewise.
21515 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21516 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21517 * input.c (selftest::test_linenum_comparisons): New function.
21518 (selftest::input_c_tests): Call it.
21519 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21520 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21521 * selftest.h (ASSERT_GT): New macro.
21522 (ASSERT_GT_AT): New macro.
21523 (ASSERT_LT): New macro.
21524 (ASSERT_LT_AT): New macro.
21525
21526 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21527
21528 PR rtl-optimization/84780
21529 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21530
21531 2018-03-14 Martin Liska <mliska@suse.cz>
21532
21533 * tree.c (record_node_allocation_statistics): Use
21534 get_stats_node_kind.
21535 (get_stats_node_kind): New function extracted from
21536 record_node_allocation_statistics.
21537 (free_node): Use get_stats_node_kind.
21538
21539 2018-03-14 Richard Biener <rguenther@suse.de>
21540
21541 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21542 that the value-set of ANTIC_IN doesn't grow.
21543
21544 Revert
21545 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21546 member.
21547 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21548 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21549
21550 2018-03-14 Julia Koval <julia.koval@intel.com>
21551
21552 * config.gcc (icelake-client, icelake-server): New.
21553 (icelake): Remove.
21554 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21555 (initial_ix86_arch_features): Ditto.
21556 (PTA_SKYLAKE): Add SGX.
21557 (PTA_ICELAKE): Remove.
21558 (PTA_ICELAKE_CLIENT): New.
21559 (PTA_ICELAKE_SERVER): New.
21560 (ix86_option_override_internal): Split up icelake on icelake client and
21561 icelake server.
21562 (get_builtin_code_for_version): Ditto.
21563 (fold_builtin_cpu): Ditto.
21564 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21565 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21566 * config/i386/i386.h (processor_type): Ditto.
21567 * doc/invoke.texi: Ditto.
21568
21569 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21570
21571 PR sanitizer/83392
21572 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21573 INTEGER_CST offset, add it together with bitpos / 8 and
21574 sign extend based on POINTER_SIZE.
21575
21576 PR target/84844
21577 Revert
21578 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21579
21580 PR target/78090
21581 * config/i386/constraints.md (Yc): New register constraint.
21582 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21583 Use Yc constraint for alternative 2 of operand 0. Remove
21584 preferred_for_speed attribute.
21585
21586 2018-03-14 Richard Biener <rguenther@suse.de>
21587
21588 PR tree-optimization/84830
21589 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21590 with the old one to avoid oscillations.
21591
21592 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21593
21594 PR target/83712
21595 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21596 pseudos.
21597 (assign_by_spills): Return a flag of reload assignment failure.
21598 Do not process the reload assignment failures. Do not spill other
21599 reload pseudos if they has the same reg class. Update n if
21600 necessary.
21601 (lra_assign): Add a return arg. Set up from the result of
21602 assign_by_spills call.
21603 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21604 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21605 usage_insns if it is not NULL.
21606 (spill_hard_reg_in_range): New function.
21607 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21608 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21609 function prototypes.
21610 (lra_assign): Change prototype.
21611 * lra.c (lra): Add code to deal with fails by splitting hard reg
21612 live ranges.
21613
21614 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21615
21616 * config/riscv/riscv.opt (mrelax): New option.
21617 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21618 "norelax" when riscv_mrelax is disabled.
21619 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21620
21621 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21622
21623 PR target/84743
21624 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21625 reassociation for int modes.
21626
21627 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21628
21629 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21630 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21631 for big-endian.
21632 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21633 * config/aarch64/aarch64-sve.md
21634 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21635 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21636 (*extend<mode><Vwide>2): Rename to...
21637 (aarch64_sve_extend<mode><Vwide>2): ...this.
21638 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21639 renaming the old pattern to...
21640 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21641 unsigned packs.
21642 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21643 define_expand, renaming the old pattern to...
21644 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21645 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21646 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21647 account when deciding which SVE instruction the optab should use.
21648 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21649
21650 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21651
21652 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21653 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21654 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21655 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21656 (tlsdesc_small_<mode>): Turn a define_expand and use
21657 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21658 (tlsdesc_small_advsimd_<mode>): ...this.
21659 (tlsdesc_small_sve_<mode>): New pattern.
21660
21661 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21662
21663 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21664 (UNSPEC_UMUL_HIGHPART): New constants.
21665 (MUL_HIGHPART): New int iteraor.
21666 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21667 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21668 define_expand.
21669 (*<su>mul<mode>3_highpart): New define_insn.
21670
21671 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21672
21673 PR lto/84805
21674 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21675 incomplete types.
21676
21677 2018-03-13 Martin Liska <mliska@suse.cz>
21678
21679 PR ipa/84658.
21680 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21681 vector.
21682 (sem_item_optimizer::~sem_item_optimizer): Release it.
21683 (sem_item_optimizer::merge_classes): Register variable aliases.
21684 (sem_item_optimizer::fixup_pt_set): New function.
21685 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21686 * ipa-icf.h: Declare new variables and functions.
21687
21688 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21689
21690 PR middle-end/84834
21691 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21692 integer_pow2p@2 and test integer_pow2p in condition.
21693 (A < 0 ? C : 0): Similarly for @1.
21694
21695 PR middle-end/84831
21696 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21697 characters starting at p contain '\0' character, don't look beyond
21698 that.
21699
21700 PR target/84827
21701 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21702 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21703
21704 PR target/84828
21705 * reg-stack.c (change_stack): Change update_end var from int to
21706 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21707 also call set_block_for_insn on the newly added insns and rescan.
21708
21709 PR target/84786
21710 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21711 on the last operand.
21712
21713 PR c++/84704
21714 * tree.c (stabilize_reference_1): Return save_expr (e) for
21715 STATEMENT_LIST even if it doesn't have side-effects.
21716
21717 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21718
21719 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21720
21721 2018-03-12 Renlin Li <renlin.li@arm.com>
21722
21723 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21724 aarch64_output_scalar_simd_mov_immediate.
21725
21726 2018-03-12 Martin Sebor <msebor@redhat.com>
21727
21728 PR tree-optimization/83456
21729 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21730 for perfectly overlapping calls to memcpy.
21731 (gimple_fold_builtin_memory_chk): Same.
21732 (gimple_fold_builtin_strcpy): Handle no-warning.
21733 (gimple_fold_builtin_stxcpy_chk): Same.
21734 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21735
21736 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21737
21738 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21739 parameter. Use it for SFmode.
21740 (rs6000_function_arg_advance_1): Adjust.
21741 (rs6000_function_arg): Adjust.
21742 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21743
21744 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21745
21746 PR rtl-optimization/84169
21747 PR rtl-optimization/84780
21748 * combine.c (can_combine_p): Check for a 2-insn combination whether
21749 the destination register is used between the two insns, too.
21750
21751 2018-03-12 Richard Biener <rguenther@suse.de>
21752
21753 PR tree-optimization/84803
21754 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21755 for refs DR analysis didn't process.
21756
21757 2018-03-12 Richard Biener <rguenther@suse.de>
21758
21759 PR tree-optimization/84777
21760 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21761 force-vectorize loops ignore whether we are optimizing for size.
21762
21763 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21764
21765 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21766 (TARGET_MD_ASM_ADJUST): Define.
21767
21768 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21769 Kito Cheng <kito.cheng@gmail.com>
21770 Chung-Ju Wu <jasonwucj@gmail.com>
21771
21772 * config/nds32/nds32.c (nds32_compute_stack_frame,
21773 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21774 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21775 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21776 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21777 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21778 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21779 * config/nds32/nds32.md (prologue, epilogue): Use macro
21780 NDS32_V3PUSH_AVAILABLE_P to do checking.
21781
21782 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21783
21784 PR debug/58150
21785 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21786 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21787 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21788 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21789 addition of most attributes on !orig_type_die or the attribute not
21790 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21791
21792 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21793 Chung-Ju Wu <jasonwucj@gmail.com>
21794
21795 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21796 __NDS32_VH__ macro.
21797 * config/nds32/nds32.opt (mvh): New option.
21798
21799 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21800 Chung-Ju Wu <jasonwucj@gmail.com>
21801
21802 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21803 function.
21804 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21805 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21806 definition.
21807
21808 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21809 Chung-Ju Wu <jasonwucj@gmail.com>
21810
21811 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21812 function.
21813 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21814 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21815
21816 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21817 Kito Cheng <kito.cheng@gmail.com>
21818 Chung-Ju Wu <jasonwucj@gmail.com>
21819
21820 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21821 UNSPEC_FFMISM and UNSPEC_FLMISM.
21822 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21823 for ffb, ffmism and flmism.
21824 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21825 (unspec_ffmism): Ditto.
21826 (unspec_flmism): Ditto.
21827 (nds32_expand_builtin_impl): Check if string extension is available.
21828 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21829 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21830
21831 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21832
21833 Reverting patch:
21834 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21835
21836 PR target/83712
21837 * lra-assigns.c (assign_by_spills): Return a flag of reload
21838 assignment failure. Do not process the reload assignment
21839 failures. Do not spill other reload pseudos if they has the same
21840 reg class.
21841 (lra_assign): Add a return arg. Set up from the result of
21842 assign_by_spills call.
21843 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21844 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21845 usage_insns if it is not NULL.
21846 (spill_hard_reg_in_range): New function.
21847 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21848 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21849 function prototypes.
21850 (lra_assign): Change prototype.
21851 * lra.c (lra): Add code to deal with fails by splitting hard reg
21852 live ranges.
21853
21854 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21855
21856 PR target/84807
21857 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21858
21859 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21860
21861 PR debug/84620
21862 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21863 (dw_val_node): Add val_symbolic_view.
21864 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21865 (symview_upper_bound): New.
21866 (new_line_info_table): Initialize symviews_since_reset.
21867 (dwarf2out_source_line): Count symviews_since_reset and set
21868 symview_upper_bound.
21869 (dw_val_equal_p): Handle symview.
21870 (add_AT_symview): New.
21871 (print_dw_val): Handle symview.
21872 (attr_checksum, attr_checksum_ordered): Likewise.
21873 (same_dw_val_p, size_of_die): Likewise.
21874 (value_format, output_die): Likewise.
21875 (add_high_low_attributes): Use add_AT_symview for entry_view.
21876 (dwarf2out_finish): Reset symview_upper_bound, clear
21877 zero_view_p.
21878
21879 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21880
21881 PR target/83969
21882 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21883 Add strict argument and use it.
21884 (rs6000_split_multireg_move): Update for new strict argument.
21885 (mem_operand_gpr): Disallow all non-offsettable addresses.
21886 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21887
21888 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21889
21890 PR target/84772
21891 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21892 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21893 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21894
21895 PR c++/84767
21896 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21897 decl, use remap_type if we want to use the type.
21898
21899 2018-03-09 Martin Sebor <msebor@redhat.com>
21900
21901 PR tree-optimization/84526
21902 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21903 Remove dead code.
21904 (builtin_access::generic_overlap): Be prepared to handle non-array
21905 base objects.
21906
21907 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21908
21909 PR rtl-optimization/84682
21910 * lra-constraints.c (process_address_1): Check is_address flag
21911 for address constraints.
21912 (process_alt_operands): Likewise.
21913 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21914 preprocess_constraints.
21915 * recog.h (preprocess_constraints): Add oploc parameter.
21916 Adjust callers.
21917 * recog.c (preprocess_constraints): Test address_operand for
21918 CT_ADDRESS constraints.
21919
21920 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21921
21922 PR target/83712
21923 * lra-assigns.c (assign_by_spills): Return a flag of reload
21924 assignment failure. Do not process the reload assignment
21925 failures. Do not spill other reload pseudos if they has the same
21926 reg class.
21927 (lra_assign): Add a return arg. Set up from the result of
21928 assign_by_spills call.
21929 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21930 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21931 usage_insns if it is not NULL.
21932 (spill_hard_reg_in_range): New function.
21933 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21934 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21935 function prototypes.
21936 (lra_assign): Change prototype.
21937 * lra.c (lra): Add code to deal with fails by splitting hard reg
21938 live ranges.
21939
21940 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21941
21942 PR target/83193
21943 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21944 Accept complain bool parameter. Only emit errors if it is true.
21945 (arm_parse_cpu_option_name): Likewise.
21946 (arm_target_thumb_only): Adjust callers of the above.
21947 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21948 prototype to take a default true bool parameter.
21949 (arm_parse_arch_option_name): Likewise.
21950
21951 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21952 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21953
21954 PR jit/64089
21955 PR jit/84288
21956 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21957 * configure: Regenerate.
21958 * configure.ac ("linker --version-script option"): New.
21959 ("linker soname option"): New.
21960
21961 2018-03-09 Richard Biener <rguenther@suse.de>
21962
21963 PR tree-optimization/84775
21964 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21965 immediate uses of predicate stmts and mark them modified.
21966
21967 Revert
21968 PR tree-optimization/84178
21969 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21970 to caller.
21971 (version_loop_for_if_conversion): Delay update_ssa call.
21972 (tree_if_conversion): Delay update_ssa until after predicate
21973 insertion.
21974
21975 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21976
21977 PR target/84763
21978 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21979 when the function accesses prior frames.
21980
21981 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21982
21983 PR debug/84456
21984 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21985 gen_llsym, otherwise call maybe_gen_llsym.
21986
21987 PR inline-asm/84742
21988 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21989 has ',' character inside of it.
21990
21991 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21992
21993 PR target/84748
21994 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21995 as clobbering CC_REGNUM.
21996
21997 2018-03-08 Richard Biener <rguenther@suse.de>
21998
21999 PR middle-end/84552
22000 * tree-scalar-evolution.c: Include tree-into-ssa.h.
22001 (follow_copies_to_constant): Do not follow SSA names registered
22002 for update.
22003
22004 2018-03-08 Richard Biener <rguenther@suse.de>
22005
22006 PR tree-optimization/84178
22007 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22008 to caller.
22009 (version_loop_for_if_conversion): Delay update_ssa call.
22010 (tree_if_conversion): Delay update_ssa until after predicate
22011 insertion.
22012
22013 2018-03-08 David Malcolm <dmalcolm@redhat.com>
22014
22015 PR tree-optimization/84178
22016 * tree-if-conv.c (release_bb_predicate): Remove the
22017 the assertion that the stmts have NULL use_ops.
22018 Discard the statements, asserting that they haven't
22019 yet been added to a BB.
22020
22021 2018-03-08 Richard Biener <rguenther@suse.de>
22022
22023 PR tree-optimization/84746
22024 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
22025 (phi_translate): Pass in destination ANTIC_OUT set.
22026 (phi_translate_1): Likewise. For a simplified result lookup
22027 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
22028 (phi_translate_set): Adjust.
22029 (do_pre_regular_insertion): Likewise.
22030 (do_pre_partial_partial_insertion): Likewise.
22031
22032 2018-03-08 Martin Liska <mliska@suse.cz>
22033
22034 PR gcov-profile/84735
22035 * doc/gcov.texi: Document usage of profile files.
22036 * gcov-io.h: Document changes in the format.
22037
22038 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
22039
22040 PR debug/84404
22041 PR debug/84408
22042 * dwarf2out.c (struct dw_line_info_table): Update comments for
22043 view == -1.
22044 (FORCE_RESET_NEXT_VIEW): New.
22045 (FORCE_RESETTING_VIEW_P): New.
22046 (RESETTING_VIEW_P): Check for -1 too.
22047 (ZERO_VIEW_P): Likewise.
22048 (new_line_info_table): Force-reset next view.
22049 (dwarf2out_begin_function): Likewise.
22050 (dwarf2out_source_line): Simplify zero_view_p initialization.
22051 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
22052 view directly. Omit view when omitting .loc at line 0.
22053
22054 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22055
22056 PR tree-optimization/84740
22057 * tree-switch-conversion.c (process_switch): Call build_constructors
22058 only if info.phi_count is non-zero.
22059
22060 PR tree-optimization/84739
22061 * tree-tailcall.c (find_tail_calls): Check call arguments against
22062 DECL_ARGUMENTS (current_function_decl) rather than
22063 DECL_ARGUMENTS (func) when checking for tail recursion.
22064
22065 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22066
22067 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
22068 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
22069 Volker Reichelt's entry and add entries for people that perform
22070 GCC fuzzy testing and report numerous bugs.
22071
22072 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
22073
22074 PR target/82411
22075 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
22076 readonly data in sdata, if that is disabled.
22077 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
22078 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
22079 -mreadonly-in-sdata option.
22080
22081 2018-03-07 Martin Sebor <msebor@redhat.com>
22082
22083 PR tree-optimization/84468
22084 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
22085 basic block when looking for nul assignment.
22086
22087 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
22088
22089 PR target/84277
22090 * except.h (output_function_exception_table): Adjust prototype.
22091 * except.c (output_function_exception_table): Remove FNNAME parameter
22092 and add SECTION parameter. Ouput one part of the table at a time.
22093 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
22094 the first part of the exception table and emit unwind directives.
22095 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
22096 (i386_pe_seh_cold_init): Likewise.
22097 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
22098 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
22099 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
22100 (ix86_output_call_insn): Emit a nop in one more case for SEH.
22101 * config/i386/winnt.c: Include except.h.
22102 (struct seh_frame_state): Add reg_offset, after_prologue and
22103 in_cold_section fields.
22104 (i386_pe_seh_end_prologue): Set seh->after_prologue.
22105 (i386_pe_seh_cold_init): New function.
22106 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
22107 to seh->in_cold_section.
22108 (seh_emit_push): Record the offset of the push.
22109 (seh_emit_save): Record the offet of the save.
22110 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
22111 Test seh->after_prologue to disregard the epilogue.
22112 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
22113 (i386_pe_end_cold_function): New function.
22114
22115 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22116
22117 PR fortran/84565
22118 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
22119 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
22120
22121 PR c++/84704
22122 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
22123 on tmp_var.
22124 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
22125 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
22126
22127 PR middle-end/84723
22128 * multiple_target.c: Include tree-inline.h and intl.h.
22129 (expand_target_clones): Diagnose and fail if node->definition and
22130 !tree_versionable_function_p (node->decl).
22131
22132 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
22133
22134 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
22135 sprint_ul.
22136 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
22137 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
22138 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
22139
22140 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22141
22142 PR target/84710
22143 * combine.c (try_combine): Use reg_or_subregno instead of handling
22144 just paradoxical SUBREGs and REGs.
22145
22146 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
22147
22148 * config/arc/arc.c (arc_finalize_pic): Remove function.
22149 (arc_must_save_register): We use single base PIC register, remove
22150 checks to save/restore the PIC register.
22151 (arc_expand_prologue): Likewise.
22152 * config/arc/arc-protos.h (arc_set_default_type_attributes):
22153 Remove.
22154 (arc_verify_short): Likewise.
22155 (arc_attr_type): Likewise.
22156 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
22157 (walk_stores): Likewise.
22158 (arc_address_cost): Make it static.
22159 (arc_verify_short): Likewise.
22160 (branch_dest): Likewise.
22161 (arc_attr_type): Likewise.
22162 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
22163 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
22164 (arc_final_prescan_insn): Remove inserting the nops due to
22165 hardware hazards. It is done in reorg step.
22166 (insn_length_variant_t): Remove.
22167 (insn_length_parameters_t): Likewise.
22168 (arc_insn_length_parameters): Likewise.
22169 (arc_get_insn_variants): Likewise.
22170 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
22171
22172 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22173
22174 PR inline-asm/84683
22175 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
22176 assertion failure.
22177
22178 PR tree-optimization/84687
22179 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
22180 on new_node->decl.
22181 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
22182
22183 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22184
22185 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
22186 Rename to ppc_speculation_barrier.
22187 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
22188 __builtin_ppc_speculation_barrier.
22189
22190 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22191
22192 PR target/84700
22193 * combine.c (combine_simplify_rtx): Don't try to simplify if
22194 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
22195 are equal to x.
22196
22197 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
22198
22199 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
22200 to 32 bytes when compiling for POWER9.
22201
22202 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22203
22204 PR target/84564
22205 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
22206 regparm >= 3 with no arg reg available also for calls with
22207 flag_force_indirect_call. Pass decl to ix86_function_regparm.
22208
22209 PR target/84524
22210 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
22211 orig,vex.
22212 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
22213
22214 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
22215
22216 PR target/84264
22217 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
22218
22219 2018-03-05 Richard Biener <rguenther@suse.de>
22220
22221 PR tree-optimization/84486
22222 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
22223 When inserting a __builtin_assume_aligned call set the LHS
22224 SSA name alignment info accordingly.
22225
22226 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
22227
22228 PR tree-optimization/84114
22229 * config/aarch64/aarch64.c (aarch64_reassociation_width)
22230 Avoid reassociation of FLOAT_MODE addition.
22231
22232 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
22233
22234 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
22235 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
22236 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
22237 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
22238 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
22239 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
22240 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
22241 and -mwbnoinvd.
22242 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22243 __builtin_ia32_wbinvd): New builtins.
22244 (SPECIAL_ARGS2): New.
22245 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22246 (SPECIAL_ARGS2): New.
22247 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22248 (ix86_valid_target_attribute_inner_p): Ditto.
22249 (ix86_init_mmx_sse_builtins): Add special_args2.
22250 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22251 TARGET_WBNOINVD_P): New.
22252 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22253 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22254 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22255 * config/i386/immintrin.h (_wbinvd): New intrinsic.
22256 * config/i386/pconfigintrin.h: New file.
22257 * config/i386/wbnoinvdintrin.h: Ditto.
22258 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22259 wbnoinvdintrin.h.
22260 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22261
22262 2018-03-05 Richard Biener <rguenther@suse.de>
22263
22264 PR tree-optimization/84670
22265 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22266 member.
22267 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22268 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22269 (compute_antic_aux): Only assert the number of values in ANTIC_IN
22270 doesn't grow if all successors (recursively) were visited at least
22271 once.
22272
22273 2018-03-05 Richard Biener <rguenther@suse.de>
22274
22275 PR tree-optimization/84650
22276 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22277 if executed in the loop pipeline.
22278
22279 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
22280
22281 * doc/configfiles.texi (Configuration Files): Move info about
22282 conditionalizing $target-protos.h to...
22283 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
22284 differs from $target-protos.h.
22285
22286 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
22287 Chung-Ju Wu <jasonwucj@gmail.com>
22288
22289 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22290 * config/nds32/nds32-multiple.md (setmemsi): Define.
22291 * config/nds32/nds32-memory-manipulation.c
22292 (nds32_gen_dup_4_byte_to_word_value): New.
22293 (emit_setmem_word_loop): New.
22294 (emit_setmem_byte_loop): New.
22295 (nds32_expand_setmem_loop): New.
22296 (nds32_expand_setmem_loop_v3m): New.
22297 (nds32_expand_setmem_unroll): New.
22298 (nds32_expand_setmem): New.
22299
22300 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22301 Chung-Ju Wu <jasonwucj@gmail.com>
22302
22303 * config/nds32/nds32-memory-manipulation.c
22304 (nds32_emit_load_store): New.
22305 (nds32_emit_post_inc_load_store): New.
22306 (nds32_emit_mem_move): New.
22307 (nds32_emit_mem_move_block): New.
22308 (nds32_expand_movmemsi_loop_unknown_size): New.
22309 (nds32_expand_movmemsi_loop_known_size): New.
22310 (nds32_expand_movmemsi_loop): New.
22311 (nds32_expand_movmemsi_unroll): New.
22312 (nds32_expand_movmemqi): Rename ...
22313 (nds32_expand_movmemsi): ... to this.
22314 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22315 (movmemsi): ... to this.
22316 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22317 (nds32_expand_movmemsi): ... to this.
22318
22319 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22320 Monk Chiang <sh.chiang04@gmail.com>
22321 Chung-Ju Wu <jasonwucj@gmail.com>
22322
22323 * config/nds32/nds32-protos.h
22324 (nds32_expand_load_multiple): New arguments.
22325 (nds32_expand_store_multiple): Ditto.
22326 (nds32_valid_multiple_load_store): Rename ...
22327 (nds32_valid_multiple_load_store_p): ... to this.
22328 * config/nds32/nds32-memory-manipulation.c
22329 (nds32_expand_load_multiple): Refine implementation.
22330 (nds32_expand_store_multiple): Ditto.
22331 * config/nds32/nds32-multiple.md
22332 (load_multiple): Update nds32_expand_load_multiple interface.
22333 (store_multiple): Update nds32_expand_store_multiple interface.
22334 * config/nds32/nds32-predicates.c
22335 (nds32_valid_multiple_load_store): Rename ...
22336 (nds32_valid_multiple_load_store_p): ... to this and refine
22337 implementation.
22338 * config/nds32/predicates.md
22339 (nds32_load_multiple_and_update_address_operation): New predicate.
22340 (nds32_store_multiple_and_update_address_operation): New predicate.
22341
22342 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22343 Chung-Ju Wu <jasonwucj@gmail.com>
22344
22345 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22346 (combo): New attribute.
22347 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22348
22349 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
22350
22351 * config/nds32/nds32.opt: Change -mcmodel= default value.
22352
22353 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
22354 Monk Chiang <sh.chiang04@gmail.com>
22355 Chung-Ju Wu <jasonwucj@gmail.com>
22356
22357 * config/nds32/constants.md (unspec_element): New enum.
22358 * config/nds32/constraints.md (Umw): New constraint.
22359 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22360 * config/nds32/nds32-intrinsic.md: Likewise.
22361 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22362 (nds32_valid_smw_lwm_base_p): New.
22363 (nds32_output_smw_single_word): New.
22364 (nds32_output_lmw_single_word): New.
22365 (nds32_expand_unaligned_load): New.
22366 (nds32_expand_unaligned_store): New.
22367 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22368 (nds32_output_smw_single_word): Declare.
22369 (nds32_output_lmw_single_word): Declare.
22370 (nds32_expand_unaligned_load): Declare.
22371 (nds32_expand_unaligned_store): Declare.
22372 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22373 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22374 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22375 NDS32_BUILTIN_UASTORE_DW.
22376 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22377 predicate.
22378
22379 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
22380 Kito Cheng <kito.cheng@gmail.com>
22381 Chung-Ju Wu <jasonwucj@gmail.com>
22382
22383 * config/nds32/nds32-intrinsic.c
22384 (nds32_expand_builtin_null_ftype_reg): Delete.
22385 (nds32_expand_builtin_reg_ftype_imm): Ditto.
22386 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22387 (nds32_read_argument): New.
22388 (nds32_legitimize_target): Ditto.
22389 (nds32_legitimize_argument): Ditto.
22390 (nds32_check_constant_argument): Ditto.
22391 (nds32_expand_unop_builtin): Ditto.
22392 (nds32_expand_unopimm_builtin): Ditto.
22393 (nds32_expand_binop_builtin): Ditto.
22394 (nds32_builtin_decl_impl): Ditto.
22395 (builtin_description): Ditto.
22396 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22397 (nds32_init_builtins_impl): Ditto.
22398 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22399 (nds32_builtin_decl): New.
22400 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22401 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22402
22403 2018-03-02 Jeff Law <law@redhat.com>
22404
22405 * reorg.c (stop_search_p): Handle DEBUG_INSN.
22406 (redundant_insn, fill_simple_delay_slots): Likewise.
22407 (fill_slots_from_thread): Likewise.
22408 * resource.c (mark_referenced_resources): Likewise.
22409 (mark_set_resources, find_dead_or_set_registers): Likewise.
22410
22411 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22412
22413 * substring-locations.h (format_warning_va): Formatting fix for
22414 ATTRIBUTE_GCC_DIAG.
22415 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22416 argument.
22417 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22418 * substring-locations.c: Include intl.h.
22419 (format_warning_va): Turned into small wrapper around
22420 format_warning_n_va, renamed to ...
22421 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22422 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22423 use ngettext.
22424 (format_warning_at_substring_n): New function.
22425 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22426 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
22427 format_warning_at_substring with just a shorter name instead of
22428 const function pointer.
22429 (fmtwarn_n): New function.
22430 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22431 appropriate, get rid of all the fmtstr temporaries, move conditionals
22432 with G_() wrapped string literals directly into fmtwarn arguments,
22433 cast dir.len to (int), formatting fixes.
22434
22435 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
22436
22437 * doc/invoke.texi: Remove "Cilk Plus" references.
22438
22439 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22440 Richard Biener <rguenther@suse.de>
22441
22442 PR ipa/84628
22443 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22444 for error or warning attributes if CALL_FROM_THUNK_P is set.
22445 Formatting fixes.
22446
22447 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22448
22449 PR target/56540
22450 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22451 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22452
22453 PR target/56540
22454 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22455 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22456
22457 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22458 instead of -1U in last predictors element's probability member.
22459
22460 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22461
22462 PR ipa/83983
22463 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22464 arguments if they are comparable.
22465
22466 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22467
22468 PR tree-optimization/84634
22469 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22470 masks and masked_loop_p with a single loop_masks, making sure it's
22471 null for bb vectorization.
22472
22473 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22474
22475 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22476 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22477 loop->force_vectorize to check whether there is no alias.
22478
22479 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22480
22481 PR target/84614
22482 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22483 prototypes.
22484 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22485 comments.
22486 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22487 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22488 instead of a loop around prev_real_insn.
22489 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22490 prev_real_insn.
22491
22492 PR inline-asm/84625
22493 * config/i386/i386.c (ix86_print_operand): Use conditional
22494 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22495 zero vector.
22496
22497 2018-03-02 Richard Biener <rguenther@suse.de>
22498
22499 PR tree-optimization/84427
22500 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22501 (bitmap_set_subtract_values): Rewrite to handle multiple
22502 exprs per value.
22503 (clean): Likewise.
22504 (prune_clobbered_mems): Likewise.
22505 (phi_translate): Take edge instead of pred/phiblock.
22506 (phi_translate_1): Likewise.
22507 (phi_translate_set): Likewise. Insert all translated
22508 exprs for a value into the set, keeping possibly multiple
22509 expressions per value.
22510 (compute_antic_aux): Adjust for phi_translate changes.
22511 When intersecting union the expressions and prune those
22512 not in the final value set, keeping possibly multiple
22513 expressions per value. Do not use value-insertion
22514 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22515 all expressions. Add verification that the value-sets
22516 only shrink during iteration.
22517 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22518 (do_pre_regular_insertion): Likewise.
22519 (do_pre_partial_partial_insertion): Likewise.
22520
22521 2018-03-02 Richard Biener <rguenther@suse.de>
22522
22523 PR target/82005
22524 * config/darwin.c (saved_debug_info_level): New static global.
22525 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22526 (darwin_asm_lto_end): Restore debug info generation settings.
22527
22528 2018-03-01 Martin Liska <mliska@suse.cz>
22529
22530 PR sanitizer/82484
22531 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22532 volatile arguments.
22533
22534 2018-03-01 Richard Biener <rguenther@suse.de>
22535
22536 PR debug/84645
22537 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22538 type annotation with LTO when debug was disabled at compile-time.
22539
22540 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22541
22542 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22543 XINT with INTVAL.
22544 (mips_final_postscan_insn): Likewise.
22545
22546 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22547
22548 PR rtl-optimization/84528
22549 * alias.c (init_alias_target): Add commentary.
22550 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22551 a unique base value if the frame pointer is not eliminated
22552 to the stack pointer.
22553
22554 2018-03-01 Tom de Vries <tom@codesourcery.com>
22555
22556 PR rtl-optimization/83327
22557 * lra-int.h (hard_regs_spilled_into): Declare.
22558 * lra.c (hard_regs_spilled_into): Define.
22559 (init_reg_info): Init hard_regs_spilled_into.
22560 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22561 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22562 (process_bb_lives): Handle hard_regs_spilled_into.
22563 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22564 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22565
22566 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22567
22568 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22569 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22570 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22571 * config/rs6000/aix72.h: New file.
22572
22573 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22574
22575 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22576 instead of warning_at with conditional singular and plural messages
22577 where possible.
22578
22579 PR target/52991
22580 * stor-layout.c (update_alignment_for_field): For
22581 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22582 && !DECL_PACKED (field), do the alignment update, just use
22583 only desired_align instead of MAX (type_align, desired_align)
22584 as the alignment.
22585 (place_field): Don't do known_align < desired_align handling
22586 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22587 is non-NULL, instead do it after rli->prev_field handling and
22588 only if not within a bitfield word. For DECL_PACKED (field)
22589 use type_align of BITS_PER_UNIT.
22590
22591 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22592
22593 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22594 superfluous parentheses and trailing spaces.
22595
22596 2018-02-28 Richard Biener <rguenther@suse.de>
22597
22598 PR tree-optimization/84584
22599 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22600 SCoPs with fake exit edge.
22601
22602 2018-02-28 Martin Liska <mliska@suse.cz>
22603
22604 PR testsuite/84597
22605 * timevar.c (timer::print): Fix format to properly print 100%
22606 values.
22607
22608 2018-02-28 Richard Biener <rguenther@suse.de>
22609
22610 PR middle-end/84607
22611 * genmatch.c (capture_info::walk_match): Do not mark
22612 captured expressions without operands as expr_p given
22613 they act more like predicates and should be subject to
22614 "lost tail" side-effect preserving.
22615
22616 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22617
22618 PR rtl-optimization/81611
22619 * auto-inc-dec.c (attempt_change): Move dead note from
22620 mem_insn if it's the next use of regno
22621 (find_address): Take address use of reg holding
22622 non-incremented value. Add parm to limit search to the named
22623 reg only.
22624 (merge_in_block): Attempt to use a mem insn that is the next
22625 use of the original regno.
22626
22627 2018-02-27 Martin Sebor <msebor@redhat.com>
22628
22629 PR c++/83871
22630 * doc/invoke.texi (-Wmissing-attributes): New option.
22631 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22632
22633 2018-02-27 Martin Sebor <msebor@redhat.com>
22634
22635 PR translation/84207
22636 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22637 n argument to unsigned HOST_WIDE_INT.
22638 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22639 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22640 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22641 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22642
22643 2018-02-27 Richard Biener <rguenther@suse.de>
22644
22645 PR tree-optimization/84512
22646 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22647 Do not use the estimate returned from record_stmt_cost for
22648 the scalar iteration cost but sum properly using add_stmt_cost.
22649
22650 2018-02-27 Richard Biener <rguenther@suse.de>
22651
22652 PR tree-optimization/84466
22653 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22654 Adjust last change to less strictly validate use operands.
22655
22656 2018-02-27 Martin Liska <mliska@suse.cz>
22657
22658 PR gcov-profile/84548
22659 * gcov.c (process_file): Allow partial overlap and consider it
22660 also as group functions.
22661 (output_lines): Properly calculate range of lines for a group.
22662
22663 2018-02-27 Martin Liska <mliska@suse.cz>
22664
22665 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22666 'ggc' suffixes. Change first column width.
22667 (timer::print): Fix formatting of the column.
22668
22669 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22670
22671 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22672 preserve inline entry blocks for the sake of debug inline
22673 entry point markers alone.
22674 (remove_unused_locals): Suggest in comments a better place to
22675 force the preservation of inline entry blocks that are
22676 otherwise unused, but do not preserve them.
22677
22678 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22679
22680 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22681
22682 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22683
22684 PR target/84039
22685 * config/i386/constraints.md (Bs): Replace
22686 ix86_indirect_branch_register with
22687 TARGET_INDIRECT_BRANCH_REGISTER.
22688 (Bw): Likewise.
22689 * config/i386/i386.md (indirect_jump): Likewise.
22690 (tablejump): Likewise.
22691 (*sibcall_memory): Likewise.
22692 (*sibcall_value_memory): Likewise.
22693 Peepholes of indirect call and jump via memory: Likewise.
22694 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22695 (*sibcall_value_GOT_32): Likewise.
22696 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22697 (GOT_memory_operand): Likewise.
22698 (call_insn_operand): Likewise.
22699 (sibcall_insn_operand): Likewise.
22700 (GOT32_symbol_operand): Likewise.
22701 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22702
22703 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22704
22705 PR rtl-optimization/83496
22706 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22707 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22708 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22709 redundant insn, if any.
22710 (relax_delay_slots): Likewise.
22711 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22712
22713 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22714
22715 PR tree-optimization/83965
22716 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22717 that grouped statements are part of a reduction chain. Return
22718 true if the statement is not marked as a reduction itself but
22719 is part of a group.
22720 (vect_recog_dot_prod_pattern): Don't check whether the statement
22721 is part of a group here.
22722 (vect_recog_sad_pattern): Likewise.
22723 (vect_recog_widen_sum_pattern): Likewise.
22724
22725 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22726
22727 PR debug/84545
22728 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22729
22730 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22731
22732 PR target/84530
22733 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22734 the bool argument.
22735 (ix86_output_indirect_function_return): New prototype.
22736 (ix86_split_simple_return_pop_internal): Likewise.
22737 * config/i386/i386.c (indirect_return_via_cx): New.
22738 (indirect_return_via_cx_bnd): Likewise.
22739 (indirect_thunk_name): Handle return va CX_REG.
22740 (output_indirect_thunk_function): Create alias for
22741 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22742 (ix86_output_indirect_jmp): Remove the bool argument.
22743 (ix86_output_indirect_function_return): New function.
22744 (ix86_split_simple_return_pop_internal): Likewise.
22745 * config/i386/i386.md (*indirect_jump): Don't pass false
22746 to ix86_output_indirect_jmp.
22747 (*tablejump_1): Likewise.
22748 (simple_return_pop_internal): Change it to define_insn_and_split.
22749 Call ix86_split_simple_return_pop_internal to split it for
22750 -mfunction-return=.
22751 (simple_return_indirect_internal): Call
22752 ix86_output_indirect_function_return instead of
22753 ix86_output_indirect_jmp.
22754
22755 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22756
22757 PR bootstrap/84405
22758 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22759 memset and value initialization afterwards.
22760
22761 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22762
22763 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22764
22765 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22766
22767 PR target/84521
22768 * common/config/aarch64/aarch64-common.c
22769 (aarch_option_optimization_table[]): Switch
22770 off fomit-frame-pointer
22771
22772 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22773 Chung-Ju Wu <jasonwucj@gmail.com>
22774
22775 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22776 volatile memory.
22777 (store_multiple): Ditto.
22778
22779 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22780
22781 * config.gcc: Add --with-cpu support for nds32 target.
22782 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22783 * config/nds32/nds32.opt: Add -mcpu= option.
22784
22785 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22786
22787 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22788 isel=yes): Warn for these deprecated options.
22789
22790 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22791
22792 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22793 ISA_2_5_MASKS_EMBEDDED.
22794
22795 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22796
22797 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22798 p->max as pointers rather than using iterative_hash_expr.
22799
22800 2018-02-23 Carl Love <cel@us.ibm.com>
22801
22802 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22803 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22804 BU_P8V_OVERLOAD_2.
22805 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22806 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22807 P8V_BUILTIN_VEC_VUNSIGNED2.
22808
22809 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22810
22811 PR target/81572
22812 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22813 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22814 LRA_UNKNOWN_ALT.
22815 * lra-constraints.c (curr_insn_transform): Set up
22816 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22817 LRA_UNKNOWN_ALT.
22818 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22819 * lra-eliminations.c (spill_pseudos): Ditto.
22820 (process_insn_for_elimination): Ditto.
22821 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22822 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22823 LRA_NON_CLOBBERED_ALT.
22824
22825 2018-02-22 Martin Sebor <msebor@redhat.com>
22826
22827 PR tree-optimization/84480
22828 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22829 to maybe_diag_stxncpy_trunc. Call it.
22830 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22831 from gimple_fold_builtin_strcpy. Print inlining stack.
22832 (handle_builtin_stxncpy): Print inlining stack.
22833 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22834
22835 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22836
22837 PR target/84176
22838 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22839 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22840 and -fcheck-pointer-bounds are used together.
22841 (indirect_thunk_prefix): New enum.
22842 (indirect_thunk_need_prefix): New function.
22843 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22844 "_nt" instead of "_bnd" for NOTRACK prefix.
22845 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22846 (output_indirect_thunk_function): Likewise.
22847 (): Likewise.
22848 (ix86_code_end): Update output_indirect_thunk_function calls.
22849 (ix86_output_indirect_branch_via_reg): Replace
22850 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22851 (ix86_output_indirect_branch_via_push): Likewise.
22852 (ix86_output_function_return): Likewise.
22853 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22854 incompatible with -fcf-protection=branch and
22855 -fcheck-pointer-bounds.
22856
22857 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22858
22859 PR target/83335
22860 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22861 Change gcc_assert call to output_operand_lossage.
22862
22863 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22864
22865 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22866
22867 2018-02-22 DJ Delorie <dj@redhat.com>
22868 Sebastian Perta <sebastian.perta@renesas.com>
22869 Oleg Endo <olegendo@gcc.gnu.org>
22870
22871 * config/rx/rx.c (rx_rtx_costs): New function.
22872 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22873
22874 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22875
22876 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22877
22878 2018-02-22 Martin Liska <mliska@suse.cz>
22879
22880 PR driver/83193
22881 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22882 Add "native" as a possible value.
22883
22884 2018-02-22 Martin Liska <mliska@suse.cz>
22885
22886 PR driver/83193
22887 * config/i386/i386.c (ix86_option_override_internal):
22888 Add "native" as a possible value for -march and -mtune.
22889
22890 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22891
22892 PR target/84502
22893 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22894 to all type variants.
22895
22896 PR tree-optimization/84503
22897 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22898 width as info->bitpos + info->bitsize - start.
22899 (merged_store_group::merge_overlapping): Simplify width computation.
22900 (check_no_overlap): New function.
22901 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22902 start + width and last_order of the group, fail if check_no_overlap
22903 fails.
22904 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22905 to group if check_no_overlap fails.
22906
22907 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22908
22909 * config/rs6000/altivec.md: Delete contraint arguments to
22910 define_expand, define_split, and define_peephole2, and in
22911 define_insn_and_split if always unused.
22912 * config/rs6000/darwin.md: Ditto.
22913 * config/rs6000/dfp.md: Ditto.
22914 * config/rs6000/rs6000.md: Ditto.
22915 * config/rs6000/sync.md: Ditto.
22916 * config/rs6000/vector.md: Ditto.
22917 * config/rs6000/vsx.md: Ditto.
22918
22919 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22920
22921 * config/rs6000/altivec.md: Write output control strings as braced
22922 blocks instead of double-quoted strings.
22923 * config/rs6000/darwin.md: Ditto.
22924 * config/rs6000/rs6000.md: Ditto.
22925 * config/rs6000/vector.md: Ditto.
22926 * config/rs6000/vsx.md: Ditto.
22927
22928 2018-02-21 Jason Merrill <jason@redhat.com>
22929
22930 PR c++/84314 - ICE with templates and fastcall attribute.
22931 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22932
22933 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22934
22935 * ipa-cp.c (determine_versionability): Fix comment typos.
22936
22937 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22938
22939 PR c/84229
22940 * ipa-cp.c (determine_versionability): Do not version functions caling
22941 va_arg_pack.
22942
22943 2018-02-21 Martin Liska <mliska@suse.cz>
22944
22945 PR driver/83193
22946 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22947 Add "native" as a possible value.
22948 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22949 the macro when native cpu detection is available.
22950
22951 2018-02-21 Martin Liska <mliska@suse.cz>
22952
22953 PR driver/83193
22954 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22955 Add "native" as a possible value.
22956 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22957 when native cpu detection is available.
22958
22959 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22960 Martin Sebor <msebor@redhat.com>
22961
22962 PR tree-optimization/84478
22963 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22964 false.
22965 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22966 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22967 support which is conservatively correct, for 2 only stay conservative
22968 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22969 argument to the 2 argument get_range_strlen, adjust 6 arg
22970 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22971 false.
22972 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22973 (gimple_fold_builtin_strlen): Pass true as last argument to
22974 get_range_strlen.
22975
22976 2018-02-20 Martin Sebor <msebor@redhat.com>
22977
22978 PR middle-end/84095
22979 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22980 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22981 (builtin_memref::builtin_memref): Factor out parts into
22982 set_base_and_offset and call it.
22983
22984 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22985
22986 PR middle-end/84406
22987 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22988 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22989 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22990 search at the associated MODE_INT.
22991
22992 2018-02-20 Jeff Law <law@redhat.com>
22993
22994 PR middle-end/82123
22995 PR tree-optimization/81592
22996 PR middle-end/79257
22997 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22998 for range data rather than using global data.
22999 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
23000 range data rather than using global data.
23001 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
23002 pass it to children as needed.
23003 (struct directive::fmtresult): Similarly.
23004 (struct directive::set_width): Similarly.
23005 (struct directive::set_precision): Similarly.
23006 (format_integer, format_directive, parse_directive): Similarly.
23007 (format_none): Accept unnamed vr_values parameter.
23008 (format_percent, format_floating, format_character): Similarly.
23009 (format_string, format_plain): Similarly.
23010 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
23011 the EVRP range analyzer for range data rather than using global data.
23012 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
23013 gimple-ssa-evrp-analyze.h
23014 (class sprintf_dom_walker): Add after_dom_children member function.
23015 Add evrp_range_analyzer member.
23016 (sprintf_dom_walker::before_dom_children): Call into the EVRP
23017 range analyzer as needed.
23018 (sprintf_dom_walker::after_dom_children): New member function.
23019 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
23020 if not optimizing.
23021 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
23022 (evrp_range_analyzer::pop_to_marker): Likewise.
23023
23024 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23025
23026 PR tree-optimization/84419
23027 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
23028 with the required type if its current type is compatible but
23029 different.
23030
23031 2018-02-20 Jakub Jelinek <jakub@redhat.com>
23032
23033 PR middle-end/82004
23034 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
23035 after vectorization.
23036
23037 2018-02-20 Martin Liska <mliska@suse.cz>
23038
23039 PR driver/83193
23040 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
23041 possible values if we don't have a hint.
23042
23043 2018-02-20 Martin Liska <mliska@suse.cz>
23044
23045 PR c/84310
23046 PR target/79747
23047 * final.c (shorten_branches): Build align_tab array with one
23048 more element.
23049 * opts.c (finish_options): Add alignment option limit check.
23050 (MAX_CODE_ALIGN): Likewise.
23051 (MAX_CODE_ALIGN_VALUE): Likewise.
23052 * doc/invoke.texi: Document maximum allowed option value for
23053 all -falign-* options.
23054
23055 2018-02-19 Jakub Jelinek <jakub@redhat.com>
23056
23057 PR target/84146
23058 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
23059 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
23060 * var-tracking.c (emit_note_insn_var_location): Remove all references
23061 to NOTE_INSN_CALL_ARG_LOCATION.
23062 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
23063 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
23064 Use copy_rtx_if_shared.
23065 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
23066 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
23067 (dwarf2out_var_location): Remove handling of
23068 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
23069 on call_insn.
23070 * final.c (final_scan_insn): Remove all references to
23071 NOTE_INSN_CALL_ARG_LOCATION.
23072 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
23073 before dumping final insns.
23074 * except.c (emit_note_eh_region_end): Remove all references to
23075 NOTE_INSN_CALL_ARG_LOCATION.
23076 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
23077 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
23078 * config/arc/arc.c (hwloop_optimize): Likewise.
23079 * config/arm/arm.c (create_fix_barrier): Likewise.
23080 * config/s390/s390.c (s390_chunkify_start): Likewise.
23081 * config/sh/sh.c (find_barrier): Likewise.
23082 * config/i386/i386.c (rest_of_insert_endbranch,
23083 ix86_seh_fixup_eh_fallthru): Likewise.
23084 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
23085 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
23086 * config/frv/frv.c (frv_function_prologue): Likewise.
23087 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
23088 reg note.
23089 (note_outside_basic_block_p): Remove all references to
23090 NOTE_INSN_CALL_ARG_LOCATION.
23091 * gengtype.c (adjust_field_rtx_def): Likewise.
23092 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
23093 Likewise.
23094 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
23095 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
23096
23097 PR c++/84444
23098 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
23099 is ADDR_EXPR.
23100
23101 PR tree-optimization/84452
23102 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
23103 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
23104 is NULL.
23105
23106 2018-02-19 Martin Liska <mliska@suse.cz>
23107
23108 PR sanitizer/82183
23109 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
23110
23111 2018-02-19 Martin Liska <mliska@suse.cz>
23112 Richard Sandiford <richard.sandiford@linaro.org>
23113
23114 PR tree-optimization/82491
23115 * gimple-fold.c (get_base_constructor): Make earlier bail out
23116 to prevent ubsan.
23117
23118 2018-02-19 Carl Love <cel@us.ibm.com>
23119
23120 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
23121 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
23122 BU_P8V_OVERLOAD_1.
23123 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
23124 P8V_BUILTIN_VEC_NEG.
23125
23126 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
23127
23128 * config/rl78/rl78.md (movdf): New define expand.
23129
23130 2018-02-19 Martin Liska <mliska@suse.cz>
23131
23132 PR other/80589
23133 * doc/invoke.texi: Fix typo.
23134 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
23135
23136 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
23137
23138 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
23139 handle rs6000_single_float and rs6000_double_float specially for
23140 e500 family CPUs.
23141
23142 2018-02-16 Jeff Law <law@redhat.com>
23143
23144 * config/rx/rx.c (add_pop_cfi_notes): New function.;
23145 (pop_regs): Use it.
23146
23147 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23148
23149 PR ipa/84425
23150 * ipa-inline.c (inline_small_functions): Fix a typo.
23151
23152 2018-02-16 Nathan Sidwell <nathan@acm.org>
23153
23154 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
23155
23156 2018-02-16 Carl Love <cel@us.ibm.com>
23157
23158 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
23159 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
23160 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
23161 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
23162 expansion to P8V_BUILTIN_VEC_FLOAT2.
23163
23164 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
23165
23166 PR rtl-optimization/70023
23167 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
23168 src_regno into account.
23169
23170 2018-02-16 Carl Love <cel@us.ibm.com>
23171
23172 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
23173 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
23174 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
23175 * config/rs6000/rs6000.c: Remove case statements for
23176 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
23177 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
23178 and P9V_BUILTIN_VEC_VINSERT4B.
23179 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
23180 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
23181 * config/rs6000/vsx.md:
23182 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
23183 vec_insert4b.
23184
23185 2018-02-16 Carl Love <cel@us.ibm.com>
23186
23187 * config/rs6000/altivec.h: Add builtin names vec_extract4b
23188 vec_insert4b.
23189 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
23190 definitions.
23191 * config/rs6000/rs6000-c.c: Add the definitions for
23192 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
23193 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
23194 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
23195 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
23196 definition for insert4b and define insn *insert3b_internal.
23197 * doc/extend.texi: Add documentation for vec_extract4b.
23198
23199 2018-02-16 Nathan Sidwell <nathan@acm.org>
23200
23201 * doc/extend.texi (Backwards Compatibility): Mention friend
23202 injection. Note for-scope is deprecated.
23203 * doc/invoke.texi (-ffriend-injection): Deprecate.
23204
23205 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
23206
23207 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
23208 that moved to I2, also allow destinations that are a paradoxical
23209 subreg (instead of a normal reg).
23210
23211 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
23212
23213 PR target/83831
23214 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
23215 to QImode.
23216
23217 2018-02-16 Richard Biener <rguenther@suse.de>
23218
23219 PR tree-optimization/84037
23220 PR tree-optimization/84016
23221 PR target/82862
23222 * config/i386/i386.c (ix86_builtin_vectorization_cost):
23223 Adjust vec_construct for the fact we need additional higher latency
23224 128bit inserts for AVX256 and AVX512 vector builds.
23225 (ix86_add_stmt_cost): Scale vector construction cost for
23226 elementwise loads.
23227
23228 2018-02-16 Richard Biener <rguenther@suse.de>
23229
23230 PR tree-optimization/84417
23231 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
23232 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
23233 (non_rewritable_lvalue_p): Likewise, use poly-ints.
23234
23235 2018-02-16 Martin Liska <mliska@suse.cz>
23236
23237 PR sanitizer/84307
23238 * internal-fn.def (ASAN_CHECK): Set proper flags.
23239 (ASAN_MARK): Likewise.
23240
23241 2018-02-16 Julia Koval <julia.koval@intel.com>
23242
23243 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23244 from PTA_CANNONLAKE.
23245
23246 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23247
23248 PR target/84272
23249 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23250 Use ++iter rather than iter++ for std::list iterators.
23251 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
23252 defer deleting them until all nodes in the forest are processed. Do
23253 free even leaf nodes. Change to_process into auto_vec.
23254
23255 PR bootstrap/84405
23256 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23257 * vec.h (vec_default_construct): Use memset instead of placement new
23258 if BROKEN_VALUE_INITIALIZATION is defined.
23259 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23260 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23261 is defined.
23262
23263 PR rtl-optimization/83723
23264 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23265 * lra.c (lra_substitute_pseudo): Likewise. If true, use
23266 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
23267 recursive calls.
23268 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23269 callers.
23270 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23271
23272 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
23273
23274 PR rtl-optimization/81443
23275 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23276 from inner REGs to paradoxical SUBREGs.
23277
23278 2018-02-16 Richard Biener <rguenther@suse.de>
23279
23280 PR tree-optimization/84399
23281 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23282 For operands we can analyze at their definition make sure we can
23283 analyze them at each use as well.
23284
23285 2018-02-16 Richard Biener <rguenther@suse.de>
23286
23287 PR tree-optimization/84190
23288 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23289 volatile accesses if the decl isn't volatile.
23290
23291 2018-02-15 Jason Merrill <jason@redhat.com>
23292
23293 PR c++/84314 - ICE with templates and fastcall attribute.
23294 * attribs.c (build_type_attribute_qual_variant): Don't clobber
23295 TYPE_CANONICAL on an existing type.
23296
23297 2018-02-15 Jakub Jelinek <jakub@redhat.com>
23298
23299 PR tree-optimization/84383
23300 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23301 dstoff nor call operand_equal_p if dstbase is NULL.
23302
23303 PR tree-optimization/84334
23304 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23305 also a CONSTANT_CLASS_P, punt.
23306
23307 2018-02-14 Jim Wilson <jimw@sifive.com>
23308
23309 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23310 first SMALL_OPERAND check. New local min_second_step. Move assert
23311 to where locals are set. Add TARGET_RVC support.
23312 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23313
23314 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
23315
23316 * doc/invoke.texi: Correct -Wformat-overflow code sample.
23317
23318 2018-02-14 Martin Sebor <msebor@redhat.com>
23319
23320 PR tree-optimization/83698
23321 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23322 arrays constrain the offset range to their bounds.
23323 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23324 (builtin_access::overlap): Avoid setting the size of overlap if it's
23325 already been set.
23326 (maybe_diag_overlap): Also consider arrays when deciding what values
23327 of offsets to include in diagnostics.
23328
23329 2018-02-14 Martin Sebor <msebor@redhat.com>
23330
23331 PR c/84108
23332 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23333 that correspond to the kind of a declaration.
23334
23335 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
23336
23337 PR target/83984
23338 * config/pa/pa.md: Load address of PIC label using the linkage table
23339 if the label is nonlocal.
23340
23341 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
23342
23343 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23344 warning message if user requests -maltivec=be.
23345 * doc/invoke.texi: Document deprecation of -maltivec=be.
23346
23347 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
23348
23349 PR target/84220
23350 * config/rs6000/rs6000-c.c: Update definitions for
23351 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23352 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23353
23354 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23355
23356 PR target/84239
23357 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23358 add _get_ssp intrinsics. Remove argument from
23359 __builtin_ia32_rdssp[d|q].
23360 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23361 * config/i386/i386-builtin.def: Remove argument from
23362 __builtin_ia32_rdssp[d|q].
23363 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23364 ix86_expand_special_args_builtin for _rdssp[d|q].
23365 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23366 Clear register before usage.
23367 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23368 Add documentation for new _get_ssp and _inc_ssp intrinsics.
23369
23370 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
23371
23372 PR tree-optimization/84357
23373 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23374 operand 1 of an ARRAY_REF too.
23375
23376 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
23377
23378 PR target/83831
23379 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23380 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23381 declarations.
23382 (set_of_reg): New struct.
23383 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23384 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23385 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23386 functions.
23387 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23388 Split into bitclr, bitset, bitinvert patterns if appropriate.
23389 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23390 use rx_fuse_in_memory_bitop.
23391 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23392 to named insn, correct maximum insn length.
23393
23394 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
23395
23396 PR target/79242
23397 * machmode.def: Define a complex mode for PARTIAL_INT.
23398 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23399 MODE_PARTIAL_INT.
23400 * doc/rtl.texi: Document CSPImode.
23401 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23402 handling.
23403 (msp430_hard_regno_nregs_with_padding): Likewise.
23404
23405 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
23406
23407 PR target/84279
23408 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23409
23410 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
23411
23412 PR rtl-optimization/84169
23413 * combine.c (try_combine): New variable split_i2i3. Set it to true if
23414 we generated a parallel as new i3 and we split that to new i2 and i3
23415 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
23416 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
23417 those to i2, not i1. Partially rewrite this scan code.
23418
23419 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23420
23421 PR c/82210
23422 * stor-layout.c (place_field): For variable length fields, adjust
23423 offset_align afterwards not just based on the field's alignment,
23424 but also on the size.
23425
23426 PR middle-end/84309
23427 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23428 of exps and logs in the use_exp2 case.
23429
23430 2018-02-13 Jeff Law <law@redhat.com>
23431
23432 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23433 entry for "vector".
23434
23435 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23436 ARGS as unused.
23437
23438 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
23439
23440 PR debug/84342
23441 PR debug/84319
23442 * common.opt (gas-loc-support, gas-locview-support): New.
23443 (ginline-points, ginternal-reset-location-views): New.
23444 * doc/invoke.texi: Document them. Use @itemx where intended.
23445 (gvariable-location-views): Adjust.
23446 * target.def (reset_location_view): New.
23447 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23448 (TARGET_RESET_LOCATION_VIEW): New.
23449 * doc/tm.texi: Rebuilt.
23450 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23451 (dwarf2out_default_as_locview_support): New.
23452 (output_asm_line_debug_info): Use option variables.
23453 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23454 (output_loc_list): Likewise.
23455 (add_high_low_attributes): Check option variables.
23456 Don't output entry view attribute in strict mode.
23457 (gen_inlined_subroutine_die): Check option variables.
23458 (dwarf2out_inline_entry): Likewise.
23459 (init_sections_and_labels): Likewise.
23460 (dwarf2out_early_finish): Likewise.
23461 (maybe_reset_location_view): New, from...
23462 (dwarf2out_var_location): ... here. Call it.
23463 * debug.h (dwarf2out_default_as_loc_support): Declare.
23464 (dwarf2out_default_as_locview_support): Declare.
23465 * hooks.c (hook_int_rtx_insn_0): New.
23466 * hooks.h (hook_int_rtx_insn_0): Declare.
23467 * toplev.c (process_options): Take -gas-loc-support and
23468 -gas-locview-support from dwarf2out. Enable
23469 -gvariable-location-views by default only with locview
23470 assembler support. Enable -ginternal-reset-location-views by
23471 default only if the target defines the corresponding hook.
23472 Enable -ginline-points by default if location views are
23473 enabled; force it disabled if statement frontiers are
23474 disabled.
23475 * tree-inline.c (expand_call_inline): Check option variables.
23476 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23477
23478 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23479
23480 PR tree-optimization/84321
23481 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23482 handling. Also check whether the anti-range contains any values
23483 that satisfy the mask; switch to a VR_RANGE if not.
23484
23485 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23486
23487 PR sanitizer/84340
23488 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23489
23490 2018-02-13 Martin Jambor <mjambor@suse.cz>
23491
23492 PR c++/83990
23493 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23494 of call statements, also set location of a load to a temporary.
23495
23496 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23497
23498 * config/rl78/rl78.c (add_vector_labels): New function.
23499 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23500 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23501 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23502 which checks that no arguments are passed.
23503 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23504 * doc/extend.texi: Documentation for the new attribute.
23505
23506 2018-02-13 Andreas Schwab <schwab@suse.de>
23507
23508 * config/riscv/linux.h (CPP_SPEC): Define.
23509
23510 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23511
23512 PR target/84335
23513 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23514 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23515 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23516 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23517 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23518 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23519 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23520 temporarily for AES and PCLMUL builtins.
23521
23522 PR tree-optimization/84339
23523 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23524 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23525 Formatting fixes.
23526
23527 PR middle-end/84309
23528 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23529 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23530 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23531 inline function.
23532 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23533 inline function.
23534 * omp-simd-clone.h: New file.
23535 * omp-simd-clone.c: Include omp-simd-clone.h.
23536 (expand_simd_clones): No longer static.
23537 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23538 cgraph.h and omp-simd-clone.h.
23539 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23540 (vect_recog_widen_shift_pattern): Formatting fix.
23541 (vect_pattern_recog_1): Don't check optab for calls.
23542
23543 PR target/84336
23544 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23545 operands[2] into a REG before using gen_lowpart on it.
23546
23547 2018-02-12 Jeff Law <law@redhat.com>
23548
23549 PR target/83760
23550 * config/sh/sh.c (find_barrier): Consider a sibling call
23551 a barrier as well.
23552
23553 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23554 successfully back substituting a reg.
23555
23556 2018-02-12 Richard Biener <rguenther@suse.de>
23557
23558 PR tree-optimization/84037
23559 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23560 parameter, move visited init to caller.
23561 (vect_slp_analyze_operations): Separate cost from validity
23562 check, initialize visited once for all instances.
23563 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23564 for all instances.
23565 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23566 out an assert.
23567 (vect_model_promotion_demotion_cost): Likewise.
23568 (vectorizable_bswap): Guard cost modeling with !slp_node
23569 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23570 SLP stmts.
23571 (vectorizable_call): Likewise.
23572 (vectorizable_conversion): Likewise.
23573 (vectorizable_assignment): Likewise.
23574 (vectorizable_shift): Likewise.
23575 (vectorizable_operation): Likewise.
23576 (vectorizable_store): Likewise.
23577 (vectorizable_load): Likewise.
23578 (vectorizable_condition): Likewise.
23579 (vectorizable_comparison): Likewise.
23580
23581 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23582
23583 PR sanitizer/84307
23584 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23585 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23586 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23587
23588 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23589
23590 PR middle-end/83665
23591 * params.def (inline-min-speedup): Increase from 8 to 15.
23592 (max-inline-insns-auto): Decrease from 40 to 30.
23593 * ipa-split.c (consider_split): Add some buffer for function to
23594 be considered inlining candidate.
23595 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23596 default values.
23597
23598 2018-02-12 Richard Biener <rguenther@suse.de>
23599
23600 PR tree-optimization/84037
23601 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23602 matched stmts if we cannot swap the non-matched ones.
23603
23604 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23605
23606 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23607 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23608 _mm_maskz_scalef_round_ss): New intrinsics.
23609 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23610 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23611 __builtin_ia32_scalefss_round): Remove.
23612 (__builtin_ia32_scalefsd_mask_round,
23613 __builtin_ia32_scalefss_mask_round): New intrinsics.
23614 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23615 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23616 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23617 "<round_constraint>")): Changed to ...
23618 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23619 "<round_scalar_constraint>")): ... this.
23620 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23621 %0, %1, %2<round_op3>}"): Changed to ...
23622 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23623 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23624 %2<round_scalar_mask_op3>}"): ... this.
23625 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23626
23627 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23628
23629 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23630 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23631 (_mm_maskz_sqrt_round_ss): New intrinsics.
23632 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23633 (__builtin_ia32_sqrtsd_mask_round)
23634 (__builtin_ia32_sqrtss_mask_round): New builtins.
23635 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23636 (__builtin_ia32_sqrtss_round): Remove.
23637 (__builtin_ia32_sqrtsd_mask_round)
23638 (__builtin_ia32_sqrtss_mask_round): New builtins.
23639 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23640 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23641 ((match_operand:VF_128 1 "vector_operand"
23642 "xBm,<round_constraint>")): Changed to ...
23643 ((match_operand:VF_128 1 "vector_operand"
23644 "xBm,<round_scalar_constraint>")): ... this.
23645 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23646 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23647 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23648 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23649 %<iptr>1<round_scalar_mask_op3>}): ... this.
23650 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23651 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23652
23653 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23654
23655 PR target/84266
23656 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23657 Cast vec_cmpeq result to correct type.
23658 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23659 Cast vec_cmpgt result to correct type.
23660
23661 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23662
23663 * final.c (final_scan_insn_1): Renamed from...
23664 (final_scan_insn): ... this. New wrapper, to recover
23665 seen from the outermost call in recursive ones.
23666 * config/sparc/sparc.c (output_return): Drop seen from call.
23667 (output_sibcall): Likewise.
23668 * config/visium/visium.c (output_branch): Likewise.
23669
23670 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23671
23672 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23673 function label.
23674
23675 2018-02-10 Alan Modra <amodra@gmail.com>
23676
23677 PR target/84300
23678 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23679 Specify LR as an input.
23680
23681 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23682
23683 PR sanitizer/83987
23684 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23685 remove_member_access_dummy_vars): New functions.
23686 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23687 lower_omp_1, execute_lower_omp): Use them.
23688
23689 PR rtl-optimization/84308
23690 * shrink-wrap.c (spread_components): Release todo vector.
23691
23692 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23693
23694 PR rtl-optimization/57193
23695 * ira-color.c (struct allocno_color_data): Add member
23696 conflict_allocno_hard_prefs.
23697 (update_conflict_allocno_hard_prefs): New.
23698 (bucket_allocno_compare_func): Add a preference based on
23699 conflict_allocno_hard_prefs.
23700 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23701 (color_allocnos): Remove a dead code. Initiate
23702 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23703
23704 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23705
23706 PR target/84226
23707 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23708 constraint from =wa to wa. Avoid a subreg on the output operand,
23709 instead use a pseudo and subreg it in a move.
23710 (p9_xxbrd_<mode>): Changed to ...
23711 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23712 (p9_xxbrd_v2df): New expander.
23713 (p9_xxbrw_<mode>): Changed to ...
23714 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23715 (p9_xxbrw_v4sf): New expander.
23716
23717 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23718
23719 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23720
23721 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23722
23723 PR target/83926
23724 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23725 multiply in 32-bit mode.
23726 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23727 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23728 mode.
23729
23730 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23731
23732 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23733 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23734 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23735 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23736
23737 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23738
23739 PR lto/84213
23740 * dwarf2out.c (is_trivial_indirect_ref): New function.
23741 (dwarf2out_late_global_decl): Do not generate a location
23742 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23743 and that are not defined in the current unit.
23744
23745 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23746
23747 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23748 instead of a libcall for UNORDERED.
23749
23750 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23751
23752 PR target/82641
23753 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23754 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23755
23756 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23757
23758 PR target/PR84295
23759 * config/s390/s390.c (s390_set_current_function): Invoke
23760 s390_indirect_branch_settings also if fndecl didn't change.
23761
23762 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23763
23764 * config/rs6000/rs6000.md (blockage): Set length to zero.
23765
23766 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23767
23768 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23769
23770 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23771
23772 PR sanitizer/84285
23773 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23774 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23775 -static-lib*san.
23776
23777 PR debug/84252
23778 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23779 PARALLEL incoming that failed vt_get_decl_and_offset check.
23780
23781 PR middle-end/84237
23782 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23783 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23784 TREE_READONLY bit.
23785 (get_variable_section): For decls in named .bss* sections pass true as
23786 second argument to bss_initializer_p.
23787
23788 2018-02-09 Marek Polacek <polacek@redhat.com>
23789 Jakub Jelinek <jakub@redhat.com>
23790
23791 PR c++/83659
23792 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23793 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23794 Sync some changes from cxx_fold_indirect_ref.
23795
23796 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23797
23798 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23799 markers.
23800 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23801 (BLOCK_INLINE_ENTRY_LABEL): New.
23802 (dwarf2out_var_location): Disregard inline entry markers.
23803 (inline_entry_data): New struct.
23804 (inline_entry_data_hasher): New hashtable type.
23805 (inline_entry_data_hasher::hash): New.
23806 (inline_entry_data_hasher::equal): New.
23807 (inline_entry_data_table): New variable.
23808 (add_high_low_attributes): Add DW_AT_entry_pc and
23809 DW_AT_GNU_entry_view attributes if a pending entry is found
23810 in inline_entry_data_table. Add old entry_pc attribute only
23811 if debug nonbinding markers are disabled.
23812 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23813 markers are enabled.
23814 (block_within_block_p, dwarf2out_inline_entry): New.
23815 (dwarf2out_finish): Check that no entries remained in
23816 inline_entry_data_table.
23817 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23818 (final_scan_insn, notice_source_line): Likewise.
23819 (rest_of_clean_state): Skip inline entry markers.
23820 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23821 markers.
23822 * gimple.c (gimple_build_debug_inline_entry): New.
23823 * gimple.h (enum gimple_debug_subcode): Add
23824 GIMPLE_DEBUG_INLINE_ENTRY.
23825 (gimple_build_debug_inline_entry): Declare.
23826 (gimple_debug_inline_entry_p): New.
23827 (gimple_debug_nonbind_marker_p): Adjust.
23828 * insn-notes.def (INLINE_ENTRY): New.
23829 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23830 inline entry marker notes.
23831 (print_insn): Likewise.
23832 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23833 (INSN_DEBUG_MARKER_KIND): Likewise.
23834 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23835 * tree-inline.c (expand_call_inline): Build and insert
23836 debug_inline_entry stmt.
23837 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23838 inline entry blocks early, if nonbind markers are enabled.
23839 (dump_scope_block): Dump fragment info.
23840 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23841 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23842 (gimple_build_debug_inline_entry): New.
23843 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23844 Enable/disable inline entry points too.
23845 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23846 (DEBUG_INSN): Describe inline entry markers.
23847
23848 * common.opt (gvariable-location-views): New.
23849 (gvariable-location-views=incompat5): New.
23850 * config.in: Rebuilt.
23851 * configure: Rebuilt.
23852 * configure.ac: Test assembler for view support.
23853 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23854 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23855 * dwarf2out.c (var_loc_view): New typedef.
23856 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23857 (dwarf2out_locviews_in_attribute): New.
23858 (dwarf2out_locviews_in_loclist): New.
23859 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23860 (enum dw_line_info_opcode): Add LI_adv_address.
23861 (struct dw_line_info_table): Add view.
23862 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23863 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23864 (zero_view_p): New variable.
23865 (ZERO_VIEW_P): New macro.
23866 (output_asm_line_debug_info): New.
23867 (struct var_loc_node): Add view.
23868 (add_AT_view_list, AT_loc_list): New.
23869 (add_var_loc_to_decl): Add view param. Test it against last.
23870 (new_loc_list): Add view params. Record them.
23871 (AT_loc_list_ptr): Handle loc and view lists.
23872 (view_list_to_loc_list_val_node): New.
23873 (print_dw_val): Handle dw_val_class_view_list.
23874 (size_of_die): Likewise.
23875 (value_format): Likewise.
23876 (loc_list_has_views): New.
23877 (gen_llsym): Set vl_symbol too.
23878 (maybe_gen_llsym, skip_loc_list_entry): New.
23879 (dwarf2out_maybe_output_loclist_view_pair): New.
23880 (output_loc_list): Output view list or entries too.
23881 (output_view_list_offset): New.
23882 (output_die): Handle dw_val_class_view_list.
23883 (output_dwarf_version): New.
23884 (output_compilation_unit_header): Use it.
23885 (output_skeleton_debug_sections): Likewise.
23886 (output_rnglists, output_line_info): Likewise.
23887 (output_pubnames, output_aranges): Update version comments.
23888 (output_one_line_info_table): Output view numbers in asm comments.
23889 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23890 Call maybe_gen_llsym.
23891 (loc_list_from_tree_1): Adjust.
23892 (add_AT_location_description): Create view list attribute if
23893 needed, check it's absent otherwise.
23894 (convert_cfa_to_fb_loc_list): Adjust.
23895 (maybe_emit_file): Call output_asm_line_debug_info for test.
23896 (dwarf2out_var_location): Reset views as needed. Precompute
23897 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23898 attribute. Set view.
23899 (new_line_info_table): Reset next view.
23900 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23901 (dwarf2out_source_line): Likewise. Output view resets and labels to
23902 the assembler, or select appropriate line info opcodes.
23903 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23904 (optimize_string_length): Catch it. Adjust.
23905 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23906 dw_val_class_view_list, and remove it if no longer needed.
23907 (hash_loc_list): Hash view numbers.
23908 (loc_list_hasher::equal): Compare them.
23909 (optimize_location_lists): Check whether a view list symbol is
23910 needed, and whether the locview attribute is present, and
23911 whether they match. Remove the locview attribute if no longer
23912 needed.
23913 (index_location_lists): Call skip_loc_list_entry for test.
23914 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23915 Use output_dwarf_version.
23916 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23917 (struct dw_val_node): Add val_view_list.
23918 * final.c (SEEN_NEXT_VIEW): New.
23919 (set_next_view_needed): New.
23920 (clear_next_view_needed): New.
23921 (maybe_output_next_view): New.
23922 (final_start_function): Rename to...
23923 (final_start_function_1): ... this. Take pointer to FIRST,
23924 add SEEN parameter. Emit param bindings in the initial view.
23925 (final_start_function): Reintroduce SEEN-less interface.
23926 (final): Rename to...
23927 (final_1): ... this. Take SEEN parameter. Output final pending
23928 next view at the end.
23929 (final): Reintroduce seen-less interface.
23930 (final_scan_insn): Output pending next view before switching
23931 sections or ending a block. Mark the next view as needed when
23932 outputting variable locations. Notify debug backend of section
23933 changes, and of location view changes.
23934 (rest_of_handle_final): Adjust.
23935 * toplev.c (process_options): Autodetect value for debug variable
23936 location views option. Warn on incompat5 without -gdwarf-5.
23937 * doc/invoke.texi (gvariable-location-views): New.
23938 (gvariable-location-views=incompat5): New.
23939 (gno-variable-location-views): New.
23940
23941 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23942
23943 PR tree-optimization/84136
23944 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23945 that the result of find_edge is non-NULL.
23946
23947 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23948
23949 PR target/83008
23950 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23951 storing integer register in SImode. Fix cost of 256 and 512
23952 byte aligned SSE register store.
23953
23954 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23955
23956 * config/i386/i386.c (ix86_multiplication_cost): Fix
23957 multiplication cost for TARGET_AVX512DQ.
23958
23959 2018-02-08 Marek Polacek <polacek@redhat.com>
23960
23961 PR tree-optimization/84238
23962 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23963 get_range_strlen.
23964
23965 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23966
23967 PR tree-optimization/84265
23968 * tree-vect-stmts.c (vectorizable_store): Don't treat
23969 VMAT_CONTIGUOUS accesses as grouped.
23970 (vectorizable_load): Likewise.
23971
23972 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23973
23974 PR tree-optimization/81635
23975 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23976 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23977 (test_round_for_mask): New functions.
23978 (wide_int_cc_tests): Call test_round_for_mask.
23979 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23980 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23981 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23982 range returned by get_range_info.
23983
23984 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23985
23986 PR ipa/81360
23987 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23988 * symtab.c: Include builtins.h
23989 (symtab_node::output_to_lto_symbol_table_p): Move here
23990 from lto-streamer-out.c:output_symbol_p.
23991 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23992 (output_symbol_p): Move all logic to symtab.c
23993 (produce_symtab): Update.
23994
23995 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23996
23997 * config/s390/s390-opts.h (enum indirect_branch): Define.
23998 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23999 (s390_indirect_branch_via_thunk)
24000 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
24001 (enum s390_indirect_branch_type): Define.
24002 * config/s390/s390.c (struct s390_frame_layout, struct
24003 machine_function): Remove.
24004 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
24005 (indirect_branch_table_label_no, indirect_branch_table_name):
24006 Define variables.
24007 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
24008 (enum s390_indirect_branch_option): Define.
24009 (s390_return_addr_from_memory): New function.
24010 (s390_handle_string_attribute): New function.
24011 (s390_attribute_table): Add new attribute handler.
24012 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
24013 (s390_indirect_branch_via_thunk): New function.
24014 (s390_indirect_branch_via_inline_thunk): New function.
24015 (s390_function_ok_for_sibcall): When jumping via thunk disallow
24016 sibling call optimization for non z10 compiles.
24017 (s390_emit_call): Force indirect branch target to be a single
24018 register. Add r1 clobber for non-z10 compiles.
24019 (s390_emit_epilogue): Emit return jump via return_use expander.
24020 (s390_reorg): Handle JUMP_INSNs as execute targets.
24021 (s390_option_override_internal): Perform validity checks for the
24022 new command line options.
24023 (s390_indirect_branch_attrvalue): New function.
24024 (s390_indirect_branch_settings): New function.
24025 (s390_set_current_function): Invoke s390_indirect_branch_settings.
24026 (s390_output_indirect_thunk_function): New function.
24027 (s390_code_end): Implement target hook.
24028 (s390_case_values_threshold): Implement target hook.
24029 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
24030 macros.
24031 * config/s390/s390.h (struct s390_frame_layout)
24032 (struct machine_function): Move here from s390.c.
24033 (TARGET_INDIRECT_BRANCH_NOBP_RET)
24034 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
24035 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
24036 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
24037 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
24038 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
24039 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
24040 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
24041 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
24042 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
24043 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
24044 (mnemonic attribute): Add values which aren't recognized
24045 automatically.
24046 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
24047 pattern for branch conversion. Fix mnemonic attribute.
24048 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
24049 indirect branch via thunk if requested.
24050 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
24051 ("*indirect_jump"): Disable for branch conversion using out of
24052 line thunks.
24053 ("indirect_jump_via_thunk<mode>_z10")
24054 ("indirect_jump_via_thunk<mode>")
24055 ("indirect_jump_via_inlinethunk<mode>_z10")
24056 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
24057 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
24058 ("casesi_jump_via_inlinethunk<mode>_z10")
24059 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
24060 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
24061 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
24062 ("*indirect2_jump"): Disable for branch conversion.
24063 ("casesi_jump"): Turn into expander and expand patterns for branch
24064 conversion.
24065 ("return_use"): New expander.
24066 ("*return"): Emit return via thunk and rename it to ...
24067 ("*return<mode>"): ... this one.
24068 * config/s390/s390.opt: Add new options and and enum for the
24069 option values.
24070
24071 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24072
24073 * lra-constraints.c (match_reload): Unconditionally use
24074 gen_lowpart_SUBREG, rather than selecting between that
24075 and equivalent gen_rtx_SUBREG code.
24076
24077 2018-02-08 Richard Biener <rguenther@suse.de>
24078
24079 PR tree-optimization/84233
24080 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
24081 changed flag instead of boguously re-using phi_inserted.
24082
24083 2018-02-08 Martin Jambor <mjambor@suse.cz>
24084
24085 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
24086 static local variables.
24087
24088 2018-02-08 Richard Biener <rguenther@suse.de>
24089
24090 PR tree-optimization/84278
24091 * tree-vect-stmts.c (vectorizable_store): When looking for
24092 smaller vector types to perform grouped strided loads/stores
24093 make sure the mode is supported by the target.
24094 (vectorizable_load): Likewise.
24095
24096 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24097
24098 * config/aarch64/aarch64.c (aarch64_components_for_bb):
24099 Increase LDP/STP opportunities by adding adjacent callee-saves.
24100
24101 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24102
24103 PR rtl-optimization/84068
24104 PR rtl-optimization/83459
24105 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
24106
24107 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
24108
24109 PR tree-optimization/84224
24110 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
24111 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
24112 non-zero arguments.
24113
24114 2018-02-07 Iain Sandoe <iain@codesourcery.com>
24115
24116 PR target/84113
24117 * config/rs6000/altivec.md (*restore_world): Remove LR use.
24118 * config/rs6000/predicates.md (restore_world_operation): Adjust op
24119 count, remove one USE.
24120
24121 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
24122
24123 * doc/install.texi (Configuration): Document the
24124 --with-long-double-format={ibm,ieee} PowerPC configuration
24125 options.
24126
24127 PR target/84154
24128 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
24129 Convert from define_expand to be define_insn_and_split. Rework
24130 float/double/_Float128 conversions to QI/HI/SImode to work with
24131 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
24132 conversions to QI/HImode types did a store and then a load to
24133 truncate the value. For conversions to VSX registers, don't split
24134 the insn, instead emit the code directly. Use the code iterator
24135 any_fix to combine signed and unsigned conversions.
24136 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
24137 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
24138 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24139 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
24140 (fix_<mode>di2_hw): Likewise.
24141 (fixuns_<mode>di2_hw): Likewise.
24142 (fix_<mode>si2_hw): Likewise.
24143 (fixuns_<mode>si2_hw): Likewise.
24144 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
24145 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24146 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
24147 fix<uns>_trunc<SFDF:mode>si2_p8.
24148 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
24149 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
24150 (fix<uns>_<mode>_mem): Likewise.
24151 (fctiw<u>z_<mode>_mem): Likewise.
24152 (fix<uns>_<mode>_mem): Likewise.
24153 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
24154 the register allocator from doing a direct move to the GPRs to do
24155 a store, and instead use the ISA 3.0 store byte/half-word from
24156 vector register instruction. For IEEE 128-bit floating point,
24157 also optimize stores of 32-bit ints.
24158 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
24159
24160 2018-02-07 Alan Hayward <alan.hayward@arm.com>
24161
24162 * genextract.c (push_pathstr_operand): New function to support
24163 [a-zA-Z].
24164 (walk_rtx): Call push_pathstr_operand.
24165 (print_path): Support [a-zA-Z].
24166
24167 2018-02-07 Richard Biener <rguenther@suse.de>
24168
24169 PR tree-optimization/84037
24170 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
24171 (cse_and_gimplify_to_preheader): Declare.
24172 (vect_get_place_in_interleaving_chain): Likewise.
24173 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24174 ivexpr_map.
24175 (_loop_vec_info::~_loop_vec_info): Delete it.
24176 (cse_and_gimplify_to_preheader): New function.
24177 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
24178 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
24179 (vectorizable_load): Likewise. For grouped stores always base
24180 the IV on the first element.
24181 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
24182 condition before gimplifying.
24183
24184 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24185
24186 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
24187 *DIV_EXPR and *MOD_EXPR.
24188
24189 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
24190
24191 PR target/84248
24192 * config/i386/i386.c (ix86_option_override_internal): Mask out
24193 the CF_SET bit when checking -fcf-protection.
24194
24195 2018-02-07 Tom de Vries <tom@codesourcery.com>
24196
24197 PR libgomp/84217
24198 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
24199 enough.
24200
24201 2018-02-07 Richard Biener <rguenther@suse.de>
24202
24203 PR tree-optimization/84204
24204 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
24205 this place.
24206
24207 PR tree-optimization/84205
24208 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
24209 special-case isl_ast_op_zdiv_r.
24210
24211 PR tree-optimization/84223
24212 * graphite-scop-detection.c (gather_bbs::before_dom_children):
24213 Only add conditions from within the region.
24214 (gather_bbs::after_dom_children): Adjust.
24215
24216 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
24217
24218 PR target/84209
24219 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
24220 * config/avr/avr.md: Only post-reload split REG-REG moves if
24221 either register is GENERAL_REG_P.
24222
24223 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24224
24225 PR tree-optimization/84235
24226 * tree-ssa-scopedtables.c
24227 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
24228 if the subtraction is performed in floating point type where NaNs are
24229 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
24230 build 1. Formatting fix.
24231
24232 2018-02-06 Jakub Jelinek <jakub@redhat.com>
24233
24234 PR target/84146
24235 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
24236 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
24237 and skip it regardless of bb boundaries. Use CALL_P macro,
24238 don't test INSN_P (insn) together with CALL_P or JUMP_P check
24239 unnecessarily, formatting fix.
24240
24241 2018-02-06 Michael Collison <michael.collison@arm.com>
24242
24243 * config/arm/thumb2.md:
24244 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24245 (*thumb_mov_notscc): Ditto.
24246
24247 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
24248
24249 PR target/84154
24250 * config/rs6000/rs6000.md (su code attribute): Use "u" for
24251 unsigned_fix, not "s".
24252
24253 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24254
24255 * configure.ac (gcc_fn_eh_frame_ro): New function.
24256 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24257 correct .eh_frame permissions.
24258 * configure: Regenerate.
24259
24260 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
24261
24262 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24263 irrelevant options.
24264
24265 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24266
24267 * config/rs6000/rs6000.c (rs6000_option_override_internal):
24268 Display warning message for -mno-speculate-indirect-jumps.
24269
24270 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
24271
24272 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24273 Undocumented.
24274 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24275
24276 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
24277
24278 PR tree-optimization/84225
24279 * tree-eh.c (find_trapping_overflow): Only call
24280 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24281
24282 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24283
24284 PR target/84145
24285 * config/i386/i386.c: Reimplement the check of possible options
24286 -mibt/-mshstk conbination. Change error messages.
24287 * doc/invoke.texi: Fix a typo: remove extra '='.
24288
24289 2018-02-06 Marek Polacek <polacek@redhat.com>
24290
24291 PR tree-optimization/84228
24292 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24293
24294 2018-02-06 Tamar Christina <tamar.christina@arm.com>
24295
24296 PR target/82641
24297 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24298 emitted arch directives.
24299 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24300 __ARM_FEATURE_COPROC before changing architectures.
24301
24302 2018-02-06 Richard Biener <rguenther@suse.de>
24303
24304 * config/i386/i386.c (print_reg): Fix typo.
24305 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24306
24307 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
24308
24309 * configure: Regenerate.
24310
24311 2018-02-05 Martin Sebor <msebor@redhat.com>
24312
24313 PR tree-optimization/83369
24314 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24315 inlining context.
24316
24317 2018-02-05 Martin Liska <mliska@suse.cz>
24318
24319 * doc/invoke.texi: Cherry-pick upstream r323995.
24320
24321 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
24322
24323 * ira.c (ira_init_register_move_cost): Adjust comment.
24324
24325 2018-02-05 Martin Liska <mliska@suse.cz>
24326
24327 PR gcov-profile/84137
24328 * doc/gcov.texi: Fix typo in documentation.
24329
24330 2018-02-05 Martin Liska <mliska@suse.cz>
24331
24332 PR gcov-profile/83879
24333 * doc/gcov.texi: Document necessity of --dynamic-list-data when
24334 using dlopen functionality.
24335
24336 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
24337
24338 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24339 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24340 _mm_maskz_range_ss, _mm_mask_range_round_ss,
24341 _mm_maskz_range_round_ss): New intrinsics.
24342 (__builtin_ia32_rangesd128_round)
24343 (__builtin_ia32_rangess128_round): Remove.
24344 (__builtin_ia32_rangesd128_mask_round,
24345 __builtin_ia32_rangess128_mask_round): New builtins.
24346 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24347 __builtin_ia32_rangess128_round): Remove.
24348 (__builtin_ia32_rangesd128_mask_round,
24349 __builtin_ia32_rangess128_mask_round): New builtins.
24350 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24351 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24352 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24353 "<round_saeonly_constraint>")): Changed to ...
24354 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24355 "<round_saeonly_scalar_constraint>")): ... this.
24356 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24357 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24358 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24359 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24360 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24361
24362 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
24363
24364 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24365 options.
24366 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24367 Remove all values except native, 8540 and 8548.
24368
24369 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
24370
24371 * config/i386/i386.c (ix86_output_function_return): Pass
24372 INVALID_REGNUM, instead of -1, as invalid register number to
24373 indirect_thunk_name and output_indirect_thunk.
24374
24375 2018-02-02 Julia Koval <julia.koval@intel.com>
24376
24377 * config.gcc: Add -march=icelake.
24378 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24379 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24380 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24381 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24382 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24383 (processor_target_table): Add icelake.
24384 (ix86_option_override_internal): Handle new PTAs.
24385 (get_builtin_code_for_version): Handle icelake.
24386 (M_INTEL_COREI7_ICELAKE): New.
24387 (fold_builtin_cpu): Handle icelake.
24388 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24389 * doc/invoke.texi: Add -march=icelake.
24390
24391 2018-02-02 Julia Koval <julia.koval@intel.com>
24392
24393 * config/i386/i386.c (ix86_option_override_internal): Change flags type
24394 to wide_int_bitmask.
24395 * wide-int-bitmask.h: New.
24396
24397 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24398
24399 PR target/84066
24400 * config/i386/i386.md: Replace Pmode with word_mode in
24401 builtin_setjmp_setup and builtin_longjmp to support x32.
24402
24403 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
24404
24405 PR target/56010
24406 PR target/83743
24407 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24408 #include "opts.h".
24409 (rs6000_supported_cpu_names): New static variable.
24410 (linux_cpu_translation_table): Likewise.
24411 (elf_platform) <cpu>: Define new static variable and use it.
24412 Translate kernel AT_PLATFORM name to canonical name if needed.
24413 Error if platform name is unknown.
24414
24415 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
24416
24417 PR target/84089
24418 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24419
24420 2018-02-01 Jeff Law <law@redhat.com>
24421
24422 PR target/84128
24423 * config/i386/i386.c (release_scratch_register_on_entry): Add new
24424 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
24425 the scratch if RELEASE_VIA_POP is false.
24426 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24427 If we have to save a temporary register, decrement SIZE appropriately.
24428 Pass new arguments to release_scratch_register_on_entry.
24429 (ix86_adjust_stack_and_probe): Likewise.
24430 (ix86_emit_probe_stack_range): Pass new arguments to
24431 release_scratch_register_on_entry.
24432
24433 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
24434
24435 PR rtl-optimization/84157
24436 * combine.c (change_zero_ext): Use REG_P predicate in
24437 front of HARD_REGISTER_P predicate.
24438
24439 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
24440
24441 * config/avr/avr.c (avr_option_override): Move disabling of
24442 -fdelete-null-pointer-checks to...
24443 * common/config/avr/avr-common.c (avr_option_optimization_table):
24444 ...here.
24445
24446 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24447
24448 PR tree-optimization/81635
24449 * tree-data-ref.c (split_constant_offset_1): For types that
24450 wrap on overflow, try to use range info to prove that wrapping
24451 cannot occur.
24452
24453 2018-02-01 Renlin Li <renlin.li@arm.com>
24454
24455 PR target/83370
24456 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24457 TAILCALL_ADDR_REGS.
24458 (aarch64_register_move_cost): Likewise.
24459 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24460 TAILCALL_ADDR_REGS.
24461 (REG_CLASS_NAMES): Likewise.
24462 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24463 TAILCALL_ADDR_REGS. Remove IP registers.
24464 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24465
24466 2018-02-01 Richard Biener <rguenther@suse.de>
24467
24468 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24469 for specifying RPO order and allow NULL for that.
24470 * domwalk.c (dom_walker::dom_walker): Likewise.
24471 (dom_walker::walk): Handle NULL RPO order.
24472 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24473 in RPO order.
24474 (rewrite_update_dom_walker): Likewise.
24475 (mark_def_dom_walker): Likewise.
24476
24477 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24478
24479 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24480 (aarch64_maybe_expand_sve_subreg_move): Declare.
24481 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24482 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24483 predicate.
24484 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24485 that are semantically a reverse operation.
24486 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24487 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24488 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24489 functions.
24490 (aarch64_can_change_mode_class): For big-endian, forbid changes
24491 between two SVE modes if they have different element sizes.
24492
24493 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24494
24495 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24496 the TImode handling for big-endian targets.
24497
24498 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24499
24500 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24501 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24502 not just bytes.
24503 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24504 Remove BSWAP handing for big-endian targets and use the form of
24505 LD1RQ appropariate for the mode.
24506
24507 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24508
24509 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24510 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24511 duplicated element.
24512
24513 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24514
24515 PR tearget/83845
24516 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24517 check for operands that need to go through aarch64_sve_reload_be.
24518
24519 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24520
24521 PR tree-optimization/81661
24522 PR tree-optimization/84117
24523 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24524 * tree-eh.c: Include gimplify.h.
24525 (find_trapping_overflow, replace_trapping_overflow,
24526 rewrite_to_non_trapping_overflow): New functions.
24527 * tree-vect-loop.c: Include tree-eh.h.
24528 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24529 * tree-data-ref.c: Include tree-eh.h.
24530 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24531
24532 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24533
24534 PR rtl-optimization/84123
24535 * combine.c (change_zero_ext): Check if hard register satisfies
24536 can_change_dest_mode before calling gen_lowpart_SUBREG.
24537
24538 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24539
24540 PR target/82444
24541 * ira.c (ira_init_register_move_cost): Remove assert.
24542
24543 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24544
24545 PR rtl-optimization/84071
24546 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24547 * doc/tm.texi: Regenerate.
24548
24549 2018-01-31 Richard Biener <rguenther@suse.de>
24550
24551 PR tree-optimization/84132
24552 * tree-data-ref.c (analyze_miv_subscript): Properly
24553 check whether evolution_function_is_affine_multivariate_p
24554 before calling gcd_of_steps_may_divide_p.
24555
24556 2018-01-31 Julia Koval <julia.koval@intel.com>
24557
24558 PR target/83618
24559 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24560 * config/i386/i386.md (rdpid_rex64) New.
24561 (rdpid): Make 32bit only.
24562
24563 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24564
24565 PR lto/84105
24566 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24567 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24568
24569 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24570
24571 Revert
24572 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24573
24574 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24575
24576 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24577
24578 PR rtl-optimization/84071
24579 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24580 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24581
24582 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24583
24584 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24585 (arc_attribute_table): Add 'aux' attribute.
24586 (arc_in_small_data_p): Consider aux like variables.
24587 (arc_is_aux_reg_p): New function.
24588 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24589 (arc_get_aux_arg): New function.
24590 (prepare_move_operands): Handle aux-register access.
24591 (arc_handle_aux_attribute): New function.
24592 * doc/extend.texi (ARC Variable attributes): Add subsection.
24593
24594 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24595
24596 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24597 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24598 (arc_attribute_table): Add 'uncached' attribute.
24599 (arc_print_operand): Print '.di' flag for uncached memory
24600 accesses.
24601 (arc_in_small_data_p): Do not consider for small data the uncached
24602 types.
24603 (arc_is_uncached_mem_p): New function.
24604 * config/arc/predicates.md (compact_store_memory_operand): Check
24605 for uncached memory accesses.
24606 (nonvol_nonimm_operand): Likewise.
24607 * doc/extend.texi (ARC Type Attribute): New subsection.
24608
24609 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24610
24611 PR c/84100
24612 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24613 falign-loops=): Add Optimization flag.
24614
24615 2018-01-30 Jeff Law <law@redhat.com>
24616
24617 PR target/84064
24618 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24619 INT_REGISTERS_SAVED. Check it prior to calling
24620 get_scratch_register_on_entry.
24621 (ix86_adjust_stack_and_probe): Similarly.
24622 (ix86_emit_probe_stack_range): Similarly.
24623 (ix86_expand_prologue): Corresponding changes.
24624
24625 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24626
24627 PR target/40411
24628 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24629 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24630
24631 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24632
24633 PR target/84112
24634 * lra-constraints.c (curr_insn_transform): Process AND in the
24635 address.
24636
24637 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24638
24639 PR rtl-optimization/83986
24640 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24641 dependence against last_pending_memory_flush in addition to
24642 pending_jump_insns.
24643
24644 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24645
24646 PR tree-optimization/81611
24647 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24648 copies.
24649
24650 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24651
24652 PR target/83758
24653 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24654 a reg rtx.
24655
24656 2018-01-30 Richard Biener <rguenther@suse.de>
24657 Jakub Jelinek <jakub@redhat.com>
24658
24659 PR tree-optimization/84111
24660 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24661 inner loops added during recursion, as they don't have up-to-date
24662 SSA form.
24663
24664 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24665
24666 PR ipa/81360
24667 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24668 (can_inline_edge_by_limits_p): ... here.
24669 (can_early_inline_edge_p, check_callers,
24670 update_caller_keys, update_callee_keys, recursive_inlining,
24671 add_new_edges_to_heap, speculation_useful_p,
24672 inline_small_functions,
24673 inline_small_functions, flatten_function,
24674 inline_to_all_callers_1): Update.
24675
24676 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24677
24678 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24679 zeros correctly.
24680
24681 2018-01-30 Richard Biener <rguenther@suse.de>
24682
24683 PR tree-optimization/83008
24684 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24685 invariant and constant vector uses in stmts when they need
24686 more than one stmt.
24687
24688 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24689
24690 PR bootstrap/84017
24691 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24692 * configure: Regenerate.
24693
24694 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24695
24696 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24697 pattern.
24698 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24699 Use gen_rtx_REG rather than gen_lowpart.
24700
24701 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24702
24703 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24704 rather than 0 when creating partial subregs.
24705
24706 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24707
24708 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24709 of usage.
24710
24711 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24712
24713 PR target/81550
24714 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24715 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24716 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24717 flags. This restores the settings used before the 2017-07-24.
24718 Turning off pre increment/decrement/modify allows IVOPTS to
24719 optimize DF/SF loops where the index is an int.
24720
24721 2018-01-29 Richard Biener <rguenther@suse.de>
24722 Kelvin Nilsen <kelvin@gcc.gnu.org>
24723
24724 PR bootstrap/80867
24725 * tree-vect-stmts.c (vectorizable_call): Don't call
24726 targetm.vectorize_builtin_md_vectorized_function if callee is
24727 NULL.
24728
24729 2018-01-22 Carl Love <cel@us.ibm.com>
24730
24731 * doc/extend.tex: Fix typo in second arg in
24732 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24733
24734 2018-01-29 Richard Biener <rguenther@suse.de>
24735
24736 PR tree-optimization/84086
24737 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24738 (flush_ssaname_freelist): When SSA names were released reset
24739 the SCEV hash table.
24740
24741 2018-01-29 Richard Biener <rguenther@suse.de>
24742
24743 PR tree-optimization/84057
24744 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24745 removed paths when removing edges.
24746
24747 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24748
24749 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24750 -mfunction-return=@var{choice}.
24751
24752 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24753
24754 PR diagnostic/84034
24755 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24756 Handle CR like TAB.
24757 (layout::print_source_line): Likewise.
24758 (test_get_line_width_without_trailing_whitespace): Add test cases.
24759
24760 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24761
24762 PR middle-end/84040
24763 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24764 debug insns.
24765
24766 2018-01-26 Jim Wilson <jimw@sifive.com>
24767
24768 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24769
24770 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24771 specified.
24772
24773 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24774
24775 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24776 and CMP + SUB-immediate -> SUBS.
24777
24778 2018-01-26 Martin Sebor <msebor@redhat.com>
24779
24780 PR tree-optimization/83896
24781 * tree-ssa-strlen.c (get_string_len): Rename...
24782 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24783 Avoid assuming length is constant.
24784 (handle_char_store): Use HOST_WIDE_INT for string length.
24785
24786 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24787
24788 PR target/81763
24789 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24790 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24791
24792 2018-01-26 Richard Biener <rguenther@suse.de>
24793
24794 PR rtl-optimization/84003
24795 * dse.c (record_store): Only record redundant stores when
24796 the earlier store aliases at least all accesses the later one does.
24797
24798 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24799
24800 PR rtl-optimization/83985
24801 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24802 REG_CFA_RESTORE insns.
24803 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24804 REG_CFA_RESTORE insns here.
24805
24806 PR c/83989
24807 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24808 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24809
24810 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24811
24812 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24813 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24814 (arc_init): Likewise.
24815 (arc_override_options): Likewise.
24816 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24817 value.
24818 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24819 support.
24820 * config/arc/arc.h (TARGET_DBNZ): Define.
24821 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24822 properly set the tune attribute.
24823 (dbnz): Use TARGET_DBNZ guard.
24824 * config/arc/arc.opt (mtune): Add core3 option.
24825
24826 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24827
24828 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24829 recognize new pic like addresses.
24830 (arc_delegitimize_address): Clean up.
24831
24832 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24833
24834 * config/arc/arc-arches.def: Option mrf16 valid for all
24835 architectures.
24836 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24837 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24838 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24839 * config/arc/arc-tables.opt: Regenerate.
24840 * config/arc/arc.c (arc_conditional_register_usage): Handle
24841 reduced register file case.
24842 (arc_file_start): Set must have build attributes.
24843 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24844 mrf16 option value.
24845 * config/arc/arc.opt (mrf16): Add new option.
24846 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24847 * config/arc/genmultilib.awk: Handle new mrf16 option.
24848 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24849 * config/arc/t-multilib: Regenerate.
24850 * doc/invoke.texi (ARC Options): Document mrf16 option.
24851
24852 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24853
24854 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24855 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24856 (arc_attribute_table): Add 'secure_call' attribute.
24857 (arc_print_operand): Print secure call operand.
24858 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24859 secure.
24860 (arc_is_secure_call_p): New function. * config/arc/arc.md
24861 (call_i): Add support for sjli instruction.
24862 (call_value_i): Likewise.
24863 * config/arc/constraints.md (Csc): New constraint.
24864
24865 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24866 John Eric Martin <John.Martin@emmicro-us.com>
24867
24868 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24869 * config/arc/arc.c (_arc_jli_section): New struct.
24870 (arc_jli_section): New type.
24871 (rc_jli_sections): New static variable.
24872 (arc_handle_jli_attribute): New function.
24873 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24874 (arc_file_end): New function.
24875 (TARGET_ASM_FILE_END): Define.
24876 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24877 (arc_add_jli_section): New function.
24878 (jli_call_scan): Likewise.
24879 (arc_reorg): Call jli_call_scan.
24880 (arc_output_addsi): Remove 'S' from printing asm operand.
24881 (arc_is_jli_call_p): New function.
24882 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24883 operand.
24884 (movhi_insn): Likewise.
24885 (movsi_insn): Likewise.
24886 (movsi_set_cc_insn): Likewise.
24887 (loadqi_update): Likewise.
24888 (load_zeroextendqisi_update): Likewise.
24889 (load_signextendqisi_update): Likewise.
24890 (loadhi_update): Likewise.
24891 (load_zeroextendhisi_update): Likewise.
24892 (load_signextendhisi_update): Likewise.
24893 (loadsi_update): Likewise.
24894 (loadsf_update): Likewise.
24895 (movsicc_insn): Likewise.
24896 (bset_insn): Likewise.
24897 (bxor_insn): Likewise.
24898 (bclr_insn): Likewise.
24899 (bmsk_insn): Likewise.
24900 (bicsi3_insn): Likewise.
24901 (cmpsi_cc_c_insn): Likewise.
24902 (movsi_ne): Likewise.
24903 (movsi_cond_exec): Likewise.
24904 (clrsbsi2): Likewise.
24905 (norm_f): Likewise.
24906 (normw): Likewise.
24907 (swap): Likewise.
24908 (divaw): Likewise.
24909 (flag): Likewise.
24910 (sr): Likewise.
24911 (kflag): Likewise.
24912 (ffs): Likewise.
24913 (ffs_f): Likewise.
24914 (fls): Likewise.
24915 (call_i): Remove 'S' asm letter, add jli instruction.
24916 (call_value_i): Likewise.
24917 * config/arc/arc.op (mjli-always): New option.
24918 * config/arc/constraints.md (Cji): New constraint.
24919 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24920 operand.
24921 (subsf3_fpx): Likewise.
24922 (mulsf3_fpx): Likewise.
24923 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24924 asm operand.
24925 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24926 function attrbutes.
24927 * doc/invoke.texi (ARC): Document mjli-always option.
24928
24929 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24930
24931 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24932 avoid addition with 0 and use incw and decw where possible.
24933
24934 2018-01-26 Richard Biener <rguenther@suse.de>
24935
24936 PR tree-optimization/81082
24937 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24938 association if it requires casting to unsigned.
24939 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24940 from fold_plusminus_mult_expr to catch important cases late when
24941 range info is available.
24942
24943 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24944
24945 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24946 * configure.ac (hidden_linkonce): New test.
24947 * configure: Regenerate.
24948 * config.in: Regenerate.
24949
24950 2018-01-26 Julia Koval <julia.koval@intel.com>
24951
24952 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24953 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24954 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24955 _mm_mask_bitshuffle_epi64_mask): Fix type.
24956 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24957 USI_FTYPE_V4DI_V4DI_USI): Remove.
24958 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24959 __builtin_ia32_vpshufbitqmb256_mask,
24960 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24961 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24962 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24963
24964 2018-01-26 Alan Modra <amodra@gmail.com>
24965
24966 PR target/84033
24967 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24968 UNSPEC_VBPERMQ. Sort other unspecs.
24969
24970 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24971
24972 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24973
24974 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24975
24976 PR middle-end/83055
24977 * predict.c (drop_profile): Do not push/pop cfun; update also
24978 node->count.
24979 (handle_missing_profiles): Fix logic looking for zero profiles.
24980
24981 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24982
24983 PR middle-end/83977
24984 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24985 on functions with #pragma omp declare simd or functions with simd
24986 attribute.
24987 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24988 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24989 Remove trailing \n from warning_at calls.
24990
24991 2018-01-25 Tom de Vries <tom@codesourcery.com>
24992
24993 PR target/84028
24994 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24995 for neutered workers.
24996
24997 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24998
24999 PR target/68467
25000 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
25001 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
25002
25003 2018-01-24 Jeff Law <law@redhat.com>
25004
25005 PR target/83994
25006 * i386.c (get_probe_interval): Move to earlier point.
25007 (ix86_compute_frame_layout): If -fstack-clash-protection and
25008 the frame is larger than the probe interval, then use pushes
25009 to save registers rather than reg->mem moves.
25010 (ix86_expand_prologue): Remove conditional for int_registers_saved
25011 assertion.
25012
25013 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
25014
25015 PR target/84014
25016 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
25017 min/max for never referenced object.
25018
25019 2018-01-24 Jakub Jelinek <jakub@redhat.com>
25020
25021 PR middle-end/83977
25022 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
25023 here.
25024 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
25025 attributes from DECL_ATTRIBUTES (decl) without affecting
25026 DECL_ATTRIBUTES (current_function_decl).
25027 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
25028 functions with non-NULL DECL_ABSTRACT_ORIGIN.
25029
25030 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
25031
25032 PR tree-optimization/83979
25033 * fold-const.c (fold_comparison): Use constant_boolean_node
25034 instead of boolean_{true,false}_node.
25035
25036 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
25037
25038 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
25039 with zero counts.
25040
25041 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25042
25043 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25044 Simplify the clause that sets the length attribute.
25045 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25046 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
25047 clause that sets the length attribute.
25048 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25049
25050 2018-01-24 Tom de Vries <tom@codesourcery.com>
25051
25052 PR target/83589
25053 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
25054 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
25055 Add strict parameter.
25056 (prevent_branch_around_nothing): Insert dummy insn between branch to
25057 label and label with no ptx insn inbetween.
25058 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
25059
25060 2018-01-24 Tom de Vries <tom@codesourcery.com>
25061
25062 PR target/81352
25063 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25064 for neutered threads in warp.
25065 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
25066
25067 2018-01-24 Richard Biener <rguenther@suse.de>
25068
25069 PR tree-optimization/83176
25070 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
25071 operands.
25072
25073 2018-01-24 Richard Biener <rguenther@suse.de>
25074
25075 PR tree-optimization/82819
25076 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
25077 code generating pluses that are no-ops in the target precision.
25078
25079 2018-01-24 Richard Biener <rguenther@suse.de>
25080
25081 PR middle-end/84000
25082 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
25083
25084 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25085
25086 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
25087 to merge probabilities.
25088 * predict.c (probably_never_executed): Also mark as cold functions
25089 with global 0 profile and guessed local profile.
25090 * profile-count.c (profile_probability::combine_with_count): New
25091 member function.
25092 * profile-count.h (profile_probability::operator*,
25093 profile_probability::operator*=, profile_probability::operator/,
25094 profile_probability::operator/=): Reduce precision to adjusted
25095 and set value to guessed on contradictory divisions.
25096 (profile_probability::combine_with_freq): Remove.
25097 (profile_probability::combine_wiht_count): Declare.
25098 (profile_count::force_nonzero):: Set to adjusted.
25099 (profile_count::probability_in):: Set quality to adjusted.
25100 * tree-ssa-tail-merge.c (replace_block_by): Use
25101 combine_with_count.
25102
25103 2018-01-23 Andrew Waterman <andrew@sifive.com>
25104 Jim Wilson <jimw@sifive.com>
25105
25106 * config/riscv/riscv.c (riscv_stack_boundary): New.
25107 (riscv_option_override): Set riscv_stack_boundary. Handle
25108 riscv_preferred_stack_boundary_arg.
25109 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
25110 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
25111 (STACK_BOUNDARY): Set to riscv_stack_boundary.
25112 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
25113 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
25114 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
25115
25116 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
25117
25118 PR target/83905
25119 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
25120 of struct ix86_frame.
25121 (ix86_expand_epilogue): Likewise. Add a local variable for
25122 the reg_save_offset field in struct ix86_frame.
25123
25124 2018-01-23 Bin Cheng <bin.cheng@arm.com>
25125
25126 PR tree-optimization/82604
25127 * tree-loop-distribution.c (enum partition_kind): New enum item
25128 PKIND_PARTIAL_MEMSET.
25129 (partition_builtin_p): Support above new enum item.
25130 (generate_code_for_partition): Ditto.
25131 (compute_access_range): Differentiate cases that equality can be
25132 proven at all loops, the innermost loops or no loops.
25133 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
25134 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
25135 (finalize_partitions, distribute_loop): Don't fuse partition of
25136 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
25137 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
25138 parloop is enabled.
25139
25140 2018-01-23 Martin Liska <mliska@suse.cz>
25141
25142 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
25143 order to ignore the predictor.
25144 (PRED_POLYMORPHIC_CALL): Likewise.
25145 (PRED_RECURSIVE_CALL): Likewise.
25146
25147 2018-01-23 Martin Liska <mliska@suse.cz>
25148
25149 * tree-profile.c (tree_profiling): Print function header to
25150 aware reader which function we are working on.
25151 * value-prof.c (gimple_find_values_to_profile): Do not print
25152 not interesting value histograms.
25153
25154 2018-01-23 Martin Liska <mliska@suse.cz>
25155
25156 * profile-count.h (enum profile_quality): Add
25157 profile_uninitialized as the first value. Do not number values
25158 as they are zero based.
25159 (profile_count::verify): Update sanity check.
25160 (profile_probability::verify): Likewise.
25161
25162 2018-01-23 Nathan Sidwell <nathan@acm.org>
25163
25164 * doc/invoke.texi (ffor-scope): Deprecate.
25165
25166 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25167
25168 PR tree-optimization/83510
25169 * domwalk.c (set_all_edges_as_executable): New function.
25170 (dom_walker::dom_walker): Convert bool param
25171 "skip_unreachable_blocks" to enum reachability. Move setup of
25172 edge flags to set_all_edges_as_executable and only do it when
25173 reachability is REACHABLE_BLOCKS.
25174 * domwalk.h (enum dom_walker::reachability): New enum.
25175 (dom_walker::dom_walker): Convert bool param
25176 "skip_unreachable_blocks" to enum reachability.
25177 (set_all_edges_as_executable): New decl.
25178 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
25179 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
25180 "reachability".
25181 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
25182 but converting true to REACHABLE_BLOCKS.
25183 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
25184 * tree-vrp.c
25185 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
25186 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
25187 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
25188 REACHABLE_BLOCKS.
25189 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
25190 if check_all_array_refs will be called.
25191
25192 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25193
25194 * tree.c (selftest::test_location_wrappers): Add more test
25195 coverage.
25196
25197 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25198
25199 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
25200 (selftest::test_bit_in_range): Likewise.
25201
25202 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25203
25204 PR testsuite/83888
25205 * doc/sourcebuild.texi (vect_float): Say that the selector
25206 only describes the situation when -funsafe-math-optimizations is on.
25207 (vect_float_strict): Document.
25208
25209 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25210
25211 PR tree-optimization/83965
25212 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
25213 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
25214 instead of checking only for a reduction.
25215 (vect_recog_widen_sum_pattern): Likewise.
25216
25217 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25218
25219 * predict.c (probably_never_executed): Only use precise profile info.
25220 (compute_function_frequency): Skip after inlining hack since we now
25221 have quality checking.
25222
25223 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25224
25225 * profile-count.h (profile_probability::very_unlikely,
25226 profile_probability::unlikely, profile_probability::even): Set
25227 precision to guessed.
25228
25229 2018-01-23 Richard Biener <rguenther@suse.de>
25230
25231 PR tree-optimization/83963
25232 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
25233 Properly terminate dominator walk when crossing the exit edge not
25234 when visiting its source block.
25235
25236 2018-01-23 Jakub Jelinek <jakub@redhat.com>
25237
25238 PR c++/83918
25239 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
25240 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25241
25242 2018-01-22 Jakub Jelinek <jakub@redhat.com>
25243
25244 PR tree-optimization/83957
25245 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
25246 semicolon after for body surrounded by braces.
25247
25248 PR tree-optimization/83081
25249 * profile-count.h (profile_probability::split): New method.
25250 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25251 Use profile_probability::split.
25252 (do_compare_rtx_and_jump): Fix adjustment of probabilities
25253 when splitting a single conditional jump into 2.
25254
25255 2018-01-22 David Malcolm <dmalcolm@redhat.com>
25256
25257 PR tree-optimization/69452
25258 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25259 decl.
25260
25261 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25262
25263 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25264 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25265 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25266
25267 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25268
25269 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25270 declaration.
25271 * config/rl78/rl78.md (movdi): New define_expand.
25272 * config/rl78/rl78.c (rl78_split_movdi): New function.
25273
25274 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
25275
25276 PR target/83862
25277 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25278 no longer used.
25279 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25280 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25281 128-bit to produce an UNSPEC move to get the double word with the
25282 signbit and then a shift directly to do signbit.
25283 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25284 implementation with a new version that just does either a direct
25285 move or a regular move. Move memory interface to separate insns.
25286 Move insns so they are next to the expander.
25287 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25288 with signbit move. Split big and little endian case.
25289 (signbit<mode>2_dm_mem_le): Likewise.
25290 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25291 (signbit<mode>2_dm2): Likewise.
25292
25293 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25294
25295 * config/rl78/rl78.md (anddi3): New define_expand.
25296
25297 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25298
25299 * config/rl78/rl78.md (umindi3): New define_expand.
25300
25301 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25302
25303 * config/rl78/rl78.md (smindi3): New define_expand.
25304
25305 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25306
25307 * config/rl78/rl78.md (smaxdi3): New define_expand.
25308
25309 2018-01-22 Carl Love <cel@us.ibm.com>
25310
25311 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25312 LVX_V1TI): Add macro expansion.
25313 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25314 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25315 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25316 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25317 Change check to determine if the instruction is a byte reversing
25318 entry. Fix typo in comment.
25319 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25320 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25321 Add def_builtin calls for new builtins.
25322 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25323 Add define_insn expansion.
25324
25325 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25326
25327 * config/rl78/rl78.md (umaxdi3): New define_expand.
25328
25329 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25330
25331 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25332 for non-QImode registers.
25333
25334 2018-01-22 Richard Biener <rguenther@suse.de>
25335
25336 PR tree-optimization/83963
25337 * graphite-scop-detection.c (scop_detection::get_sese): Delay
25338 including the loop exit block.
25339 (scop_detection::merge_sese): Likewise.
25340 (scop_detection::add_scop): Do it here instead.
25341
25342 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25343
25344 * doc/sourcebuild.texi (arm_softfloat): Document.
25345
25346 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
25347
25348 PR gcc/77734
25349 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25350 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25351 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25352
25353 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25354 David Edelsohn <dje.gcc@gmail.com>
25355
25356 PR target/83946
25357 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25358 Change "crset eq" to "crset 2".
25359 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25360 (*call_indirect_aix<mode>_nospec): Likewise.
25361 (*call_value_indirect_aix<mode>_nospec): Likewise.
25362 (*call_indirect_elfv2<mode>_nospec): Likewise.
25363 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25364 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25365 change assembly output from . to $.
25366 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25367 (indirect_jump<mode>_nospec): Change assembly output from . to $.
25368 (*tablejump<mode>_internal1_nospec): Likewise.
25369
25370 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
25371
25372 PR target/80870
25373 * config/sh/sh_optimize_sett_clrt.cc:
25374 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25375
25376 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
25377
25378 PR tree-optimization/83940
25379 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25380 offset_dt to vect_constant_def rather than vect_unknown_def_type.
25381 (vect_check_load_store_mask): Add a mask_dt_out parameter and
25382 use it to pass back the definition type.
25383 (vect_check_store_rhs): Likewise rhs_dt_out.
25384 (vect_build_gather_load_calls): Add a mask_dt argument and use
25385 it instead of a call to vect_is_simple_use.
25386 (vectorizable_store): Update calls to vect_check_load_store_mask
25387 and vect_check_store_rhs. Use the dt returned by the latter instead
25388 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
25389 instead of calls to vect_is_simple_use. Pass the scalar rather
25390 than the vector operand to vect_is_simple_use when handling
25391 second and subsequent copies of an rhs value.
25392 (vectorizable_load): Update calls to vect_check_load_store_mask
25393 and vect_build_gather_load_calls. Use the cached mask_dt and
25394 gs_info.offset_dt instead of calls to vect_is_simple_use.
25395
25396 2018-01-20 Jakub Jelinek <jakub@redhat.com>
25397
25398 PR middle-end/83945
25399 * tree-emutls.c: Include gimplify.h.
25400 (lower_emutls_2): New function.
25401 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25402 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25403 it before further processing.
25404
25405 PR target/83930
25406 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25407 UINTVAL (trueop1) instead of INTVAL (op1).
25408
25409 2018-01-19 Jakub Jelinek <jakub@redhat.com>
25410
25411 PR debug/81570
25412 PR debug/83728
25413 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25414 INCOMING_FRAME_SP_OFFSET if not defined.
25415 (scan_trace): Add ENTRY argument. If true and
25416 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25417 emit a note to adjust the CFA offset.
25418 (create_cfi_notes): Adjust scan_trace callers.
25419 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25420 INCOMING_FRAME_SP_OFFSET in the CIE.
25421 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25422 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25423 Likewise.
25424 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25425 * doc/tm.texi: Regenerated.
25426
25427 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25428
25429 PR rtl-optimization/83147
25430 * lra-constraints.c (remove_inheritance_pseudos): Use
25431 lra_substitute_pseudo_within_insn.
25432
25433 2018-01-19 Tom de Vries <tom@codesourcery.com>
25434 Cesar Philippidis <cesar@codesourcery.com>
25435
25436 PR target/83920
25437 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25438
25439 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
25440
25441 PR target/83790
25442 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25443 spaces for function labels.
25444
25445 2018-01-19 Martin Liska <mliska@suse.cz>
25446
25447 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25448 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25449 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25450 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25451 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25452 (PRED_CONST_RETURN): Change from 69 to 65.
25453 (PRED_NULL_RETURN): Change from 91 to 71.
25454 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25455 (PRED_LOOP_GUARD): Change from 66 to 73.
25456
25457 2018-01-19 Martin Liska <mliska@suse.cz>
25458
25459 * predict.c (predict_insn_def): Add new assert.
25460 (struct branch_predictor): Change type to signed integer.
25461 (test_prediction_value_range): Amend test to cover
25462 PROB_UNINITIALIZED.
25463 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25464 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25465 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25466 (PRED_LOOP_IV_COMPARE): Likewise.
25467 * predict.h (PROB_UNINITIALIZED): Define new constant.
25468
25469 2018-01-19 Martin Liska <mliska@suse.cz>
25470
25471 * predict.c (dump_prediction): Add new format for
25472 analyze_brprob.py script which is enabled with -details
25473 suboption.
25474 * profile-count.h (precise_p): New function.
25475
25476 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25477
25478 PR tree-optimization/83922
25479 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25480 there are no statements that need masking.
25481 (vect_active_double_reduction_p): New function.
25482 (vect_analyze_loop_operations): Use it when handling phis that
25483 are not in the loop header.
25484
25485 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25486
25487 PR tree-optimization/83914
25488 * tree-vect-loop.c (vectorizable_induction): Don't convert
25489 init_expr or apply the peeling adjustment for inductions
25490 that are nested within the vectorized loop.
25491
25492 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25493
25494 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25495 instead of NEG.
25496
25497 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25498
25499 PR sanitizer/81715
25500 PR testsuite/83882
25501 * function.h (gimplify_parameters): Add gimple_seq * argument.
25502 * function.c: Include gimple.h and options.h.
25503 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25504 for the added local temporaries if needed.
25505 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25506 if there are any parameter cleanups, wrap whole body into a
25507 try/finally with the cleanups.
25508
25509 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25510
25511 PR target/82964
25512 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25513 Use GET_MODE_CLASS for scalar floating point.
25514
25515 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25516
25517 PR ipa/82256
25518 patch by PaX Team
25519 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25520 Fix call of call_cgraph_insertion_hooks.
25521
25522 2018-01-18 Martin Sebor <msebor@redhat.com>
25523
25524 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25525
25526 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25527
25528 PR ipa/83619
25529 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25530 frequencies.
25531
25532 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25533
25534 PR other/70268
25535 * common.opt: (-ffile-prefix-map): New option.
25536 * opts.c (common_handle_option): Defer it.
25537 * opts-global.c (handle_common_deferred_options): Handle it.
25538 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25539 * file-prefix-map.h: New file.
25540 (remap_debug_filename, add_debug_prefix_map): ...here.
25541 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25542 * final.c (debug_prefix_map, add_debug_prefix_map
25543 remap_debug_filename): Move to...
25544 * file-prefix-map.c: New file.
25545 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25546 generalize, get rid of alloca(), use strrchr() instead of strchr().
25547 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25548 Implement in terms of add_prefix_map().
25549 (remap_macro_filename, remap_debug_filename): Implement in term of
25550 remap_filename().
25551 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25552 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25553 * dbxout.c: Include file-prefix-map.h.
25554 * varasm.c: Likewise.
25555 * vmsdbgout.c: Likewise.
25556 * xcoffout.c: Likewise.
25557 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25558 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25559 * doc/invoke.texi (-ffile-prefix-map): Document.
25560 (-fdebug-prefix-map): Update description.
25561
25562 2018-01-18 Martin Liska <mliska@suse.cz>
25563
25564 * config/i386/i386.c (indirect_thunk_name): Document that also
25565 lfence is emitted.
25566 (output_indirect_thunk): Document why both instructions
25567 (pause and lfence) are generated.
25568
25569 2018-01-18 Richard Biener <rguenther@suse.de>
25570
25571 PR tree-optimization/83887
25572 * graphite-scop-detection.c
25573 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25574 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25575 (scop_detection::merge_sese): Re-implement with a flood-fill
25576 algorithm that properly finds a SESE region if it exists.
25577
25578 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25579
25580 PR c/61240
25581 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25582 pointer_diff optimizations use view_convert instead of convert.
25583
25584 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25585
25586 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25587 Generate different code for -mno-speculate-indirect-jumps.
25588 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25589 (*call_indirect_aix<mode>): Disable for
25590 -mno-speculate-indirect-jumps.
25591 (*call_indirect_aix<mode>_nospec): New define_insn.
25592 (*call_value_indirect_aix<mode>): Disable for
25593 -mno-speculate-indirect-jumps.
25594 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25595 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25596 -mno-speculate-indirect-jumps.
25597 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25598
25599 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25600
25601 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25602 long double type, set the flags for noting the default long double
25603 type, even if we don't pass or return a long double type.
25604
25605 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25606
25607 PR ipa/83051
25608 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25609 failure.
25610
25611 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25612
25613 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25614 support for merge[hl].
25615 (fold_mergehl_helper): New helper function.
25616 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25617 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25618 (altivec_vmrglw_direct): Add xxmrglw insn.
25619
25620 2018-01-17 Andrew Waterman <andrew@sifive.com>
25621
25622 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25623 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25624
25625 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25626
25627 PR lto/83121
25628 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25629 call the lto_location_cache before reading the
25630 DECL_SOURCE_LOCATION of the types.
25631
25632 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25633 Richard Sandiford <richard.sandiford@linaro.org>
25634
25635 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25636 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25637 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25638 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25639 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25640 Add declaration.
25641 * config/aarch64/constraints.md (aarch64_movti_operand):
25642 Limit immediates.
25643 * config/aarch64/predicates.md (Uti): Add new constraint.
25644
25645 2018-01-17 Carl Love <cel@us.ibm.com>
25646
25647 * config/rs6000/vsx.md (define_expand xl_len_r,
25648 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25649 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25650 lxvll.
25651 (define_expand, define_insn): Move the shift left from the
25652 define_insn to the define_expand for lxvl and stxvl instructions.
25653 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25654 and XL_LEN_R definitions to PURE.
25655
25656 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25657
25658 * config/i386/i386.c (indirect_thunk_name): Declare regno
25659 as unsigned int. Compare regno with INVALID_REGNUM.
25660 (output_indirect_thunk): Ditto.
25661 (output_indirect_thunk_function): Ditto.
25662 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25663 in the call to output_indirect_thunk_function.
25664
25665 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25666
25667 PR middle-end/83884
25668 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25669 rather than the size of inner_type to determine the stack slot size
25670 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25671
25672 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25673
25674 PR target/83546
25675 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25676 to PTA_SILVERMONT.
25677
25678 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25679
25680 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25681 endian Linux systems to optionally enable multilibs for selecting
25682 the long double type if the user configured an explicit type.
25683 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25684 have no long double multilibs if not defined.
25685 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25686 warn if the user used -mabi={ieee,ibm}longdouble and we built
25687 multilibs for long double.
25688 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25689 appropriate multilib option.
25690 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25691 multilib options.
25692 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25693 for building long double multilibs.
25694 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25695
25696 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25697
25698 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25699 copies.
25700
25701 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25702 64 bits.
25703 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25704 128 bits.
25705
25706 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25707 variables.
25708
25709 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25710 return value.
25711
25712 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25713
25714 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25715 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25716
25717 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25718
25719 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25720 different rtl trees depending on TARGET_64BIT.
25721 (rs6000_gen_lvx): Likewise.
25722
25723 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25724
25725 * config/visium/visium.md (nop): Tweak comment.
25726 (hazard_nop): Likewise.
25727
25728 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25729
25730 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25731 -mspeculate-indirect-jumps.
25732 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25733 for -mno-speculate-indirect-jumps.
25734 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25735 (*call_value_indirect_elfv2<mode>): Disable for
25736 -mno-speculate-indirect-jumps.
25737 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25738 (indirect_jump): Emit different RTL for
25739 -mno-speculate-indirect-jumps.
25740 (*indirect_jump<mode>): Disable for
25741 -mno-speculate-indirect-jumps.
25742 (*indirect_jump<mode>_nospec): New define_insn.
25743 (tablejump): Emit different RTL for
25744 -mno-speculate-indirect-jumps.
25745 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25746 (tablejumpsi_nospec): New define_expand.
25747 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25748 (tablejumpdi_nospec): New define_expand.
25749 (*tablejump<mode>_internal1): Disable for
25750 -mno-speculate-indirect-jumps.
25751 (*tablejump<mode>_internal1_nospec): New define_insn.
25752 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25753 option.
25754
25755 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25756
25757 * caller-save.c (insert_save): Drop unnecessary parameter. All
25758 callers updated.
25759
25760 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25761 Richard Biener <rguenth@suse.de>
25762
25763 PR libgomp/83590
25764 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25765 return early, inline manually is_gimple_sizepos. Make sure if we
25766 call gimplify_expr we don't end up with a gimple constant.
25767 * tree.c (variably_modified_type_p): Don't return true for
25768 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25769 * gimplify.h (is_gimple_sizepos): Remove.
25770
25771 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25772
25773 PR tree-optimization/83857
25774 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25775 vectorizable_live_operation for pure SLP statements.
25776 (vectorizable_live_operation): Handle PHIs.
25777
25778 2018-01-16 Richard Biener <rguenther@suse.de>
25779
25780 PR tree-optimization/83867
25781 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25782 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25783
25784 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25785
25786 PR c/83844
25787 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25788 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25789 If off is not INTEGER_CST, issue a may not be aligned warning
25790 rather than isn't aligned. Use isn%'t rather than isn't.
25791 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25792 into MULT_EXPR.
25793 <case MULT_EXPR>: Improve the case when bottom and one of the
25794 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25795 operand, in that case check if the other operand is multiple of
25796 bottom divided by the INTEGER_CST operand.
25797
25798 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25799
25800 PR target/83858
25801 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25802 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25803 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25804 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25805 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25806 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25807 (pa_function_arg_size): New function.
25808
25809 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25810
25811 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25812 in a separate statement.
25813
25814 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25815
25816 PR tree-optimization/83847
25817 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25818 group gathers and scatters.
25819
25820 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25821
25822 PR rtl-optimization/86620
25823 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25824
25825 PR rtl-optimization/83213
25826 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25827 to last if both are JUMP_INSNs.
25828
25829 PR tree-optimization/83843
25830 * gimple-ssa-store-merging.c
25831 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25832 store_immediate_info for bswap/nop orig_stores.
25833
25834 2018-01-15 Andrew Waterman <andrew@sifive.com>
25835
25836 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25837 !TARGET_MUL.
25838 <UDIV>: Increase cost if !TARGET_DIV.
25839
25840 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25841
25842 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25843 (define_attr "cr_logical_3op"): New.
25844 (cceq_ior_compare): Adjust.
25845 (cceq_ior_compare_complement): Adjust.
25846 (*cceq_rev_compare): Adjust.
25847 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25848 (is_cracked_insn): Adjust.
25849 (insn_must_be_first_in_group): Adjust.
25850 * config/rs6000/40x.md: Adjust.
25851 * config/rs6000/440.md: Adjust.
25852 * config/rs6000/476.md: Adjust.
25853 * config/rs6000/601.md: Adjust.
25854 * config/rs6000/603.md: Adjust.
25855 * config/rs6000/6xx.md: Adjust.
25856 * config/rs6000/7450.md: Adjust.
25857 * config/rs6000/7xx.md: Adjust.
25858 * config/rs6000/8540.md: Adjust.
25859 * config/rs6000/cell.md: Adjust.
25860 * config/rs6000/e300c2c3.md: Adjust.
25861 * config/rs6000/e500mc.md: Adjust.
25862 * config/rs6000/e500mc64.md: Adjust.
25863 * config/rs6000/e5500.md: Adjust.
25864 * config/rs6000/e6500.md: Adjust.
25865 * config/rs6000/mpc.md: Adjust.
25866 * config/rs6000/power4.md: Adjust.
25867 * config/rs6000/power5.md: Adjust.
25868 * config/rs6000/power6.md: Adjust.
25869 * config/rs6000/power7.md: Adjust.
25870 * config/rs6000/power8.md: Adjust.
25871 * config/rs6000/power9.md: Adjust.
25872 * config/rs6000/rs64.md: Adjust.
25873 * config/rs6000/titan.md: Adjust.
25874
25875 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25876
25877 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25878 ix86_indirect_branch_register logic.
25879
25880 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25881
25882 * config/i386/constraints.md (Bs): Update
25883 ix86_indirect_branch_register check. Don't check
25884 ix86_indirect_branch_register with GOT_memory_operand.
25885 (Bw): Likewise.
25886 * config/i386/predicates.md (GOT_memory_operand): Don't check
25887 ix86_indirect_branch_register here.
25888 (GOT32_symbol_operand): Likewise.
25889
25890 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25891
25892 * config/i386/predicates.md (constant_call_address_operand):
25893 Rewrite ix86_indirect_branch_register logic.
25894 (sibcall_insn_operand): Likewise.
25895
25896 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25897
25898 * config/i386/constraints.md (Bs): Replace
25899 ix86_indirect_branch_thunk_register with
25900 ix86_indirect_branch_register.
25901 (Bw): Likewise.
25902 * config/i386/i386.md (indirect_jump): Likewise.
25903 (tablejump): Likewise.
25904 (*sibcall_memory): Likewise.
25905 (*sibcall_value_memory): Likewise.
25906 Peepholes of indirect call and jump via memory: Likewise.
25907 * config/i386/i386.opt: Likewise.
25908 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25909 (GOT_memory_operand): Likewise.
25910 (call_insn_operand): Likewise.
25911 (sibcall_insn_operand): Likewise.
25912 (GOT32_symbol_operand): Likewise.
25913
25914 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25915
25916 PR middle-end/83837
25917 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25918 type rather than type addr's type points to.
25919 (expand_omp_atomic_mutex): Likewise.
25920 (expand_omp_atomic): Likewise.
25921
25922 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25923
25924 PR target/83839
25925 * config/i386/i386.c (output_indirect_thunk_function): Use
25926 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25927 for __x86_return_thunk.
25928
25929 2018-01-15 Richard Biener <rguenther@suse.de>
25930
25931 PR middle-end/83850
25932 * expmed.c (extract_bit_field_1): Fix typo.
25933
25934 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25935
25936 PR target/83687
25937 * config/arm/iterators.md (VF): New mode iterator.
25938 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25939 Remove integer-related logic from pattern.
25940 (neon_vabd<mode>_3): Likewise.
25941
25942 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25943
25944 PR middle-end/82694
25945 * common.opt (fstrict-overflow): No longer an alias.
25946 (fwrapv-pointer): New option.
25947 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25948 also for pointer types based on flag_wrapv_pointer.
25949 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25950 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25951 opts->x_flag_wrapv got set.
25952 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25953 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25954 POINTER_TYPE_OVERFLOW_UNDEFINED.
25955 * match.pd: Likewise in address comparison pattern.
25956 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25957
25958 2018-01-15 Richard Biener <rguenther@suse.de>
25959
25960 PR lto/83804
25961 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25962 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25963 Reset type names to their identifier if their TYPE_DECL doesn't
25964 have linkage (and thus is used for ODR and devirt).
25965 (save_debug_info_for_decl): Remove.
25966 (save_debug_info_for_type): Likewise.
25967 (add_tree_to_fld_list): Adjust.
25968 * tree-pretty-print.c (dump_generic_node): Make dumping of
25969 type names more robust.
25970
25971 2018-01-15 Richard Biener <rguenther@suse.de>
25972
25973 * BASE-VER: Bump to 8.0.1.
25974
25975 2018-01-14 Martin Sebor <msebor@redhat.com>
25976
25977 PR other/83508
25978 * builtins.c (check_access): Avoid warning when the no-warning bit
25979 is set.
25980
25981 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25982
25983 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25984 * ira-color (allocno_hard_regs_compare): Likewise.
25985
25986 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25987
25988 PR target/83013
25989 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25990 Use .pushsection/.popsection.
25991
25992 2018-01-14 Martin Sebor <msebor@redhat.com>
25993
25994 PR c++/81327
25995 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25996
25997 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25998
25999 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
26000 entry from extra_headers.
26001 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
26002 extra_headers, make the list bitwise identical to the i?86-*-* one.
26003
26004 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26005
26006 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
26007 -mcmodel=large with -mindirect-branch=thunk,
26008 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
26009 -mfunction-return=thunk-extern.
26010 * doc/invoke.texi: Document -mcmodel=large is incompatible with
26011 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
26012 -mfunction-return=thunk and -mfunction-return=thunk-extern.
26013
26014 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26015
26016 * config/i386/i386.c (print_reg): Print the name of the full
26017 integer register without '%'.
26018 (ix86_print_operand): Handle 'V'.
26019 * doc/extend.texi: Document 'V' modifier.
26020
26021 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26022
26023 * config/i386/constraints.md (Bs): Disallow memory operand for
26024 -mindirect-branch-register.
26025 (Bw): Likewise.
26026 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26027 (GOT_memory_operand): Likewise.
26028 (call_insn_operand): Likewise.
26029 (sibcall_insn_operand): Likewise.
26030 (GOT32_symbol_operand): Likewise.
26031 * config/i386/i386.md (indirect_jump): Call convert_memory_address
26032 for -mindirect-branch-register.
26033 (tablejump): Likewise.
26034 (*sibcall_memory): Likewise.
26035 (*sibcall_value_memory): Likewise.
26036 Disallow peepholes of indirect call and jump via memory for
26037 -mindirect-branch-register.
26038 (*call_pop): Replace m with Bw.
26039 (*call_value_pop): Likewise.
26040 (*sibcall_pop_memory): Replace m with Bs.
26041 * config/i386/i386.opt (mindirect-branch-register): New option.
26042 * doc/invoke.texi: Document -mindirect-branch-register option.
26043
26044 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26045
26046 * config/i386/i386-protos.h (ix86_output_function_return): New.
26047 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
26048 set function_return_type.
26049 (indirect_thunk_name): Add ret_p to indicate thunk for function
26050 return.
26051 (output_indirect_thunk_function): Pass false to
26052 indirect_thunk_name.
26053 (ix86_output_indirect_branch_via_reg): Likewise.
26054 (ix86_output_indirect_branch_via_push): Likewise.
26055 (output_indirect_thunk_function): Create alias for function
26056 return thunk if regno < 0.
26057 (ix86_output_function_return): New function.
26058 (ix86_handle_fndecl_attribute): Handle function_return.
26059 (ix86_attribute_table): Add function_return.
26060 * config/i386/i386.h (machine_function): Add
26061 function_return_type.
26062 * config/i386/i386.md (simple_return_internal): Use
26063 ix86_output_function_return.
26064 (simple_return_internal_long): Likewise.
26065 * config/i386/i386.opt (mfunction-return=): New option.
26066 (indirect_branch): Mention -mfunction-return=.
26067 * doc/extend.texi: Document function_return function attribute.
26068 * doc/invoke.texi: Document -mfunction-return= option.
26069
26070 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26071
26072 * config/i386/i386-opts.h (indirect_branch): New.
26073 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
26074 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
26075 with local indirect jump when converting indirect call and jump.
26076 (ix86_set_indirect_branch_type): New.
26077 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
26078 (indirectlabelno): New.
26079 (indirect_thunk_needed): Likewise.
26080 (indirect_thunk_bnd_needed): Likewise.
26081 (indirect_thunks_used): Likewise.
26082 (indirect_thunks_bnd_used): Likewise.
26083 (INDIRECT_LABEL): Likewise.
26084 (indirect_thunk_name): Likewise.
26085 (output_indirect_thunk): Likewise.
26086 (output_indirect_thunk_function): Likewise.
26087 (ix86_output_indirect_branch_via_reg): Likewise.
26088 (ix86_output_indirect_branch_via_push): Likewise.
26089 (ix86_output_indirect_branch): Likewise.
26090 (ix86_output_indirect_jmp): Likewise.
26091 (ix86_code_end): Call output_indirect_thunk_function if needed.
26092 (ix86_output_call_insn): Call ix86_output_indirect_branch if
26093 needed.
26094 (ix86_handle_fndecl_attribute): Handle indirect_branch.
26095 (ix86_attribute_table): Add indirect_branch.
26096 * config/i386/i386.h (machine_function): Add indirect_branch_type
26097 and has_local_indirect_jump.
26098 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
26099 to true.
26100 (tablejump): Likewise.
26101 (*indirect_jump): Use ix86_output_indirect_jmp.
26102 (*tablejump_1): Likewise.
26103 (simple_return_indirect_internal): Likewise.
26104 * config/i386/i386.opt (mindirect-branch=): New option.
26105 (indirect_branch): New.
26106 (keep): Likewise.
26107 (thunk): Likewise.
26108 (thunk-inline): Likewise.
26109 (thunk-extern): Likewise.
26110 * doc/extend.texi: Document indirect_branch function attribute.
26111 * doc/invoke.texi: Document -mindirect-branch= option.
26112
26113 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
26114
26115 PR ipa/83051
26116 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
26117
26118 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
26119
26120 * ipa-inline.c (want_inline_small_function_p): Return false if
26121 inlining has already failed with CIF_FINAL_ERROR.
26122 (update_caller_keys): Call want_inline_small_function_p before
26123 can_inline_edge_p.
26124 (update_callee_keys): Likewise.
26125
26126 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
26127
26128 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
26129 New function.
26130 (rs6000_quadword_masked_address_p): Likewise.
26131 (quad_aligned_load_p): Likewise.
26132 (quad_aligned_store_p): Likewise.
26133 (const_load_sequence_p): Add comment to describe the outer-most loop.
26134 (mimic_memory_attributes_and_flags): New function.
26135 (rs6000_gen_stvx): Likewise.
26136 (replace_swapped_aligned_store): Likewise.
26137 (rs6000_gen_lvx): Likewise.
26138 (replace_swapped_aligned_load): Likewise.
26139 (replace_swapped_load_constant): Capitalize argument name in
26140 comment describing this function.
26141 (rs6000_analyze_swaps): Add a third pass to search for vector loads
26142 and stores that access quad-word aligned addresses and replace
26143 with stvx or lvx instructions when appropriate.
26144 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
26145 New function prototype.
26146 (rs6000_quadword_masked_address_p): Likewise.
26147 (rs6000_gen_lvx): Likewise.
26148 (rs6000_gen_stvx): Likewise.
26149 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
26150 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
26151 when memory address is aligned.
26152 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
26153 this split to select lvx instruction when memory address is aligned.
26154 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
26155 instruction when memory address is aligned.
26156 (*vsx_le_perm_load_v16qi): Likewise.
26157 (four unnamed splitters): Modify to select the stvx instruction
26158 when memory is aligned.
26159
26160 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
26161
26162 * predict.c (determine_unlikely_bbs): Handle correctly BBs
26163 which appears in the queue multiple times.
26164
26165 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26166 Alan Hayward <alan.hayward@arm.com>
26167 David Sherwood <david.sherwood@arm.com>
26168
26169 * tree-vectorizer.h (vec_lower_bound): New structure.
26170 (_loop_vec_info): Add check_nonzero and lower_bounds.
26171 (LOOP_VINFO_CHECK_NONZERO): New macro.
26172 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
26173 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
26174 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
26175 fields. Make seg_len the distance travelled, not including the
26176 access size.
26177 (dr_direction_indicator): Declare.
26178 (dr_zero_step_indicator): Likewise.
26179 (dr_known_forward_stride_p): Likewise.
26180 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
26181 tree-ssanames.h.
26182 (runtime_alias_check_p): Allow runtime alias checks with
26183 variable strides.
26184 (operator ==): Compare access_size and align.
26185 (prune_runtime_alias_test_list): Rework for new distinction between
26186 the access_size and seg_len.
26187 (create_intersect_range_checks_index): Likewise. Cope with polynomial
26188 segment lengths.
26189 (get_segment_min_max): New function.
26190 (create_intersect_range_checks): Use it.
26191 (dr_step_indicator): New function.
26192 (dr_direction_indicator): Likewise.
26193 (dr_zero_step_indicator): Likewise.
26194 (dr_known_forward_stride_p): Likewise.
26195 * tree-loop-distribution.c (data_ref_segment_size): Return
26196 DR_STEP * (niters - 1).
26197 (compute_alias_check_pairs): Update call to the dr_with_seg_len
26198 constructor.
26199 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
26200 (vect_preserves_scalar_order_p): New function, split out from...
26201 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
26202 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
26203 (vect_vfa_access_size): New function.
26204 (vect_vfa_align): Likewise.
26205 (vect_compile_time_alias): Take access_size_a and access_b arguments.
26206 (dump_lower_bound): New function.
26207 (vect_check_lower_bound): Likewise.
26208 (vect_small_gap_p): Likewise.
26209 (vectorizable_with_step_bound_p): Likewise.
26210 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
26211 depencies if the vectorization factor is 1. Convert the checks
26212 for nonzero steps into checks on the bounds of DR_STEP. Try using
26213 a bunds check for variable steps if the minimum required step is
26214 relatively small. Update calls to the dr_with_seg_len
26215 constructor and to vect_compile_time_alias.
26216 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
26217 function.
26218 (vect_loop_versioning): Call it.
26219 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
26220 when retrying.
26221 (vect_estimate_min_profitable_iters): Account for any bounds checks.
26222
26223 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26224 Alan Hayward <alan.hayward@arm.com>
26225 David Sherwood <david.sherwood@arm.com>
26226
26227 * doc/sourcebuild.texi (vect_scatter_store): Document.
26228 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
26229 optabs.
26230 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
26231 Document.
26232 * genopinit.c (main): Add supports_vec_scatter_store and
26233 supports_vec_scatter_store_cached to target_optabs.
26234 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
26235 IFN_MASK_SCATTER_STORE.
26236 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
26237 functions.
26238 * internal-fn.h (internal_store_fn_p): Declare.
26239 (internal_fn_stored_value_index): Likewise.
26240 * internal-fn.c (scatter_store_direct): New macro.
26241 (expand_scatter_store_optab_fn): New function.
26242 (direct_scatter_store_optab_supported_p): New macro.
26243 (internal_store_fn_p): New function.
26244 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26245 IFN_MASK_SCATTER_STORE.
26246 (internal_fn_mask_index): Likewise.
26247 (internal_fn_stored_value_index): New function.
26248 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26249 for scatter stores.
26250 * optabs-query.h (supports_vec_scatter_store_p): Declare.
26251 * optabs-query.c (supports_vec_scatter_store_p): New function.
26252 * tree-vectorizer.h (vect_get_store_rhs): Declare.
26253 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26254 true for scatter stores.
26255 (vect_gather_scatter_fn_p): Handle scatter stores too.
26256 (vect_check_gather_scatter): Consider using scatter stores if
26257 supports_vec_scatter_store_p.
26258 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26259 scatter stores too.
26260 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26261 internal_fn_stored_value_index.
26262 (check_load_store_masking): Handle scatter stores too.
26263 (vect_get_store_rhs): Make public.
26264 (vectorizable_call): Use internal_store_fn_p.
26265 (vectorizable_store): Handle scatter store internal functions.
26266 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26267 when deciding whether the end of the group has been reached.
26268 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26269 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26270 (mask_scatter_store<mode>): New insns.
26271
26272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26273 Alan Hayward <alan.hayward@arm.com>
26274 David Sherwood <david.sherwood@arm.com>
26275
26276 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26277 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26278 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26279 function.
26280 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26281 Use vect_truncate_gather_scatter_offset if we can't treat the
26282 operation as a normal gather load or scatter store.
26283 (get_group_load_store_type): Take the gather_scatter_info
26284 as argument. Try using a gather load or scatter store for
26285 single-element groups.
26286 (get_load_store_type): Update calls to get_group_load_store_type
26287 and vect_use_strided_gather_scatters_p.
26288
26289 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26290 Alan Hayward <alan.hayward@arm.com>
26291 David Sherwood <david.sherwood@arm.com>
26292
26293 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26294 optional tree argument.
26295 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26296 null target hooks.
26297 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26298 but continue to use the current value as a fallback.
26299 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26300 to compare the updates.
26301 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26302 (get_load_store_type): Use it when handling a strided access.
26303 (vect_get_strided_load_store_ops): New function.
26304 (vect_get_data_ptr_increment): Likewise.
26305 (vectorizable_load): Handle strided gather loads. Always pass
26306 a step to vect_create_data_ref_ptr and bump_vector_ptr.
26307
26308 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26309 Alan Hayward <alan.hayward@arm.com>
26310 David Sherwood <david.sherwood@arm.com>
26311
26312 * doc/md.texi (gather_load@var{m}): Document.
26313 (mask_gather_load@var{m}): Likewise.
26314 * genopinit.c (main): Add supports_vec_gather_load and
26315 supports_vec_gather_load_cached to target_optabs.
26316 * optabs-tree.c (init_tree_optimization_optabs): Use
26317 ggc_cleared_alloc to allocate target_optabs.
26318 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26319 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26320 functions.
26321 * internal-fn.h (internal_load_fn_p): Declare.
26322 (internal_gather_scatter_fn_p): Likewise.
26323 (internal_fn_mask_index): Likewise.
26324 (internal_gather_scatter_fn_supported_p): Likewise.
26325 * internal-fn.c (gather_load_direct): New macro.
26326 (expand_gather_load_optab_fn): New function.
26327 (direct_gather_load_optab_supported_p): New macro.
26328 (direct_internal_fn_optab): New function.
26329 (internal_load_fn_p): Likewise.
26330 (internal_gather_scatter_fn_p): Likewise.
26331 (internal_fn_mask_index): Likewise.
26332 (internal_gather_scatter_fn_supported_p): Likewise.
26333 * optabs-query.c (supports_at_least_one_mode_p): New function.
26334 (supports_vec_gather_load_p): Likewise.
26335 * optabs-query.h (supports_vec_gather_load_p): Declare.
26336 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26337 and memory_type field.
26338 (NUM_PATTERNS): Bump to 15.
26339 * tree-vect-data-refs.c: Include internal-fn.h.
26340 (vect_gather_scatter_fn_p): New function.
26341 (vect_describe_gather_scatter_call): Likewise.
26342 (vect_check_gather_scatter): Try using internal functions for
26343 gather loads. Recognize existing calls to a gather load function.
26344 (vect_analyze_data_refs): Consider using gather loads if
26345 supports_vec_gather_load_p.
26346 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26347 (vect_get_gather_scatter_offset_type): Likewise.
26348 (vect_convert_mask_for_vectype): Likewise.
26349 (vect_add_conversion_to_patterm): Likewise.
26350 (vect_try_gather_scatter_pattern): Likewise.
26351 (vect_recog_gather_scatter_pattern): New pattern recognizer.
26352 (vect_vect_recog_func_ptrs): Add it.
26353 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26354 internal_fn_mask_index and internal_gather_scatter_fn_p.
26355 (check_load_store_masking): Take the gather_scatter_info as an
26356 argument and handle gather loads.
26357 (vect_get_gather_scatter_ops): New function.
26358 (vectorizable_call): Check internal_load_fn_p.
26359 (vectorizable_load): Likewise. Handle gather load internal
26360 functions.
26361 (vectorizable_store): Update call to check_load_store_masking.
26362 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26363 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26364 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26365 (aarch64_gather_scale_operand_d): New predicates.
26366 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26367 (mask_gather_load<mode>): New insns.
26368
26369 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26370 Alan Hayward <alan.hayward@arm.com>
26371 David Sherwood <david.sherwood@arm.com>
26372
26373 * optabs.def (fold_left_plus_optab): New optab.
26374 * doc/md.texi (fold_left_plus_@var{m}): Document.
26375 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26376 * internal-fn.c (fold_left_direct): Define.
26377 (expand_fold_left_optab_fn): Likewise.
26378 (direct_fold_left_optab_supported_p): Likewise.
26379 * fold-const-call.c (fold_const_fold_left): New function.
26380 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26381 * tree-parloops.c (valid_reduction_p): New function.
26382 (gather_scalar_reductions): Use it.
26383 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26384 (vect_finish_replace_stmt): Declare.
26385 * tree-vect-loop.c (fold_left_reduction_fn): New function.
26386 (needs_fold_left_reduction_p): New function, split out from...
26387 (vect_is_simple_reduction): ...here. Accept reductions that
26388 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26389 (vect_force_simple_reduction): Also store the reduction type in
26390 the assignment's STMT_VINFO_REDUC_TYPE.
26391 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26392 (merge_with_identity): New function.
26393 (vect_expand_fold_left): Likewise.
26394 (vectorize_fold_left_reduction): Likewise.
26395 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
26396 scalar phi in place for it. Check for target support and reject
26397 cases that would reassociate the operation. Defer the transform
26398 phase to vectorize_fold_left_reduction.
26399 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26400 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26401 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26402
26403 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26404
26405 * tree-if-conv.c (predicate_mem_writes): Remove redundant
26406 call to ifc_temp_var.
26407
26408 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26409 Alan Hayward <alan.hayward@arm.com>
26410 David Sherwood <david.sherwood@arm.com>
26411
26412 * target.def (legitimize_address_displacement): Take the original
26413 offset as a poly_int.
26414 * targhooks.h (default_legitimize_address_displacement): Update
26415 accordingly.
26416 * targhooks.c (default_legitimize_address_displacement): Likewise.
26417 * doc/tm.texi: Regenerate.
26418 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26419 as an argument, moving assert of ad->disp == ad->disp_term to...
26420 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
26421 Try calling targetm.legitimize_address_displacement before expanding
26422 the address rather than afterwards, and adjust for the new interface.
26423 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26424 Match the new hook interface. Handle SVE addresses.
26425 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26426 new hook interface.
26427
26428 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26429
26430 * Makefile.in (OBJS): Add early-remat.o.
26431 * target.def (select_early_remat_modes): New hook.
26432 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26433 * doc/tm.texi: Regenerate.
26434 * targhooks.h (default_select_early_remat_modes): Declare.
26435 * targhooks.c (default_select_early_remat_modes): New function.
26436 * timevar.def (TV_EARLY_REMAT): New timevar.
26437 * passes.def (pass_early_remat): New pass.
26438 * tree-pass.h (make_pass_early_remat): Declare.
26439 * early-remat.c: New file.
26440 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26441 function.
26442 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
26443
26444 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26445 Alan Hayward <alan.hayward@arm.com>
26446 David Sherwood <david.sherwood@arm.com>
26447
26448 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26449 vfm1 with a bound_epilog parameter.
26450 (vect_do_peeling): Update calls accordingly, and move the prologue
26451 call earlier in the function. Treat the base bound_epilog as 0 for
26452 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26453 this base when peeling for gaps.
26454 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26455 with fully-masked loops.
26456 (vect_estimate_min_profitable_iters): Handle the single peeled
26457 iteration in that case.
26458
26459 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26460 Alan Hayward <alan.hayward@arm.com>
26461 David Sherwood <david.sherwood@arm.com>
26462
26463 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26464 single-element interleaving even if the size is not a power of 2.
26465 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26466 accesses for single-element interleaving if the group size is
26467 not a power of 2.
26468
26469 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26470 Alan Hayward <alan.hayward@arm.com>
26471 David Sherwood <david.sherwood@arm.com>
26472
26473 * doc/md.texi (fold_extract_last_@var{m}): Document.
26474 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26475 * optabs.def (fold_extract_last_optab): New optab.
26476 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26477 * internal-fn.c (fold_extract_direct): New macro.
26478 (expand_fold_extract_optab_fn): Likewise.
26479 (direct_fold_extract_optab_supported_p): Likewise.
26480 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26481 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26482 EXTRACT_LAST_REDUCTION.
26483 (get_initial_def_for_reduction): Do not create an initial vector
26484 for EXTRACT_LAST_REDUCTION reductions.
26485 (vectorizable_reduction): Leave the scalar phi in place for
26486 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26487 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26488 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26489 transform phase to vectorizable_condition.
26490 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26491 split out from...
26492 (vect_finish_stmt_generation): ...here.
26493 (vect_finish_replace_stmt): New function.
26494 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26495 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26496 pattern.
26497 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26498
26499 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26500 Alan Hayward <alan.hayward@arm.com>
26501 David Sherwood <david.sherwood@arm.com>
26502
26503 * doc/md.texi (extract_last_@var{m}): Document.
26504 * optabs.def (extract_last_optab): New optab.
26505 * internal-fn.def (EXTRACT_LAST): New internal function.
26506 * internal-fn.c (cond_unary_direct): New macro.
26507 (expand_cond_unary_optab_fn): Likewise.
26508 (direct_cond_unary_optab_supported_p): Likewise.
26509 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26510 loops using EXTRACT_LAST.
26511 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26512 (extract_last_<mode>): ...this optab.
26513 (vec_extract<mode><Vel>): Update accordingly.
26514
26515 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26516 Alan Hayward <alan.hayward@arm.com>
26517 David Sherwood <david.sherwood@arm.com>
26518
26519 * target.def (empty_mask_is_expensive): New hook.
26520 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26521 * doc/tm.texi: Regenerate.
26522 * targhooks.h (default_empty_mask_is_expensive): Declare.
26523 * targhooks.c (default_empty_mask_is_expensive): New function.
26524 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26525 if the target says that empty masks are expensive.
26526 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26527 New function.
26528 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26529
26530 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26531 Alan Hayward <alan.hayward@arm.com>
26532 David Sherwood <david.sherwood@arm.com>
26533
26534 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26535 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26536 (vect_use_loop_mask_for_alignment_p): New function.
26537 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26538 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26539 niters_skip argument. Make sure that the first niters_skip elements
26540 of the first iteration are inactive.
26541 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26542 Update call to vect_set_loop_masks_directly.
26543 (get_misalign_in_elems): New function, split out from...
26544 (vect_gen_prolog_loop_niters): ...here.
26545 (vect_update_init_of_dr): Take a code argument that specifies whether
26546 the adjustment should be added or subtracted.
26547 (vect_update_init_of_drs): Likewise.
26548 (vect_prepare_for_masked_peels): New function.
26549 (vect_do_peeling): Skip prologue peeling if we're using a mask
26550 instead. Update call to vect_update_inits_of_drs.
26551 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26552 mask_skip_niters.
26553 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26554 alignment. Do not include the number of peeled iterations in
26555 the minimum threshold in that case.
26556 (vectorizable_induction): Adjust the start value down by
26557 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26558 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26559 Take the number of skipped iterations into account when calculating
26560 the loop bounds.
26561 * tree-vect-stmts.c (vect_gen_while_not): New function.
26562
26563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26564 Alan Hayward <alan.hayward@arm.com>
26565 David Sherwood <david.sherwood@arm.com>
26566
26567 * doc/sourcebuild.texi (vect_fully_masked): Document.
26568 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26569 default value to 0.
26570 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26571 split out from...
26572 (vect_analyze_loop_2): ...here. Don't check the vectorization
26573 factor against the number of loop iterations if the loop is
26574 fully-masked.
26575
26576 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26577 Alan Hayward <alan.hayward@arm.com>
26578 David Sherwood <david.sherwood@arm.com>
26579
26580 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26581 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26582 (dump_groups): Update accordingly.
26583 (iv_use::mem_type): New member variable.
26584 (address_p): New function.
26585 (record_use): Add a mem_type argument and initialize the new
26586 mem_type field.
26587 (record_group_use): Add a mem_type argument. Use address_p.
26588 Remove obsolete null checks of base_object. Update call to record_use.
26589 (find_interesting_uses_op): Update call to record_group_use.
26590 (find_interesting_uses_cond): Likewise.
26591 (find_interesting_uses_address): Likewise.
26592 (get_mem_type_for_internal_fn): New function.
26593 (find_address_like_use): Likewise.
26594 (find_interesting_uses_stmt): Try find_address_like_use before
26595 calling find_interesting_uses_op.
26596 (addr_offset_valid_p): Use the iv mem_type field as the type
26597 of the addressed memory.
26598 (add_autoinc_candidates): Likewise.
26599 (get_address_cost): Likewise.
26600 (split_small_address_groups_p): Use address_p.
26601 (split_address_groups): Likewise.
26602 (add_iv_candidate_for_use): Likewise.
26603 (autoinc_possible_for_pair): Likewise.
26604 (rewrite_groups): Likewise.
26605 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26606 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26607 (get_alias_ptr_type_for_ptr_address): New function.
26608 (rewrite_use_address): Rewrite address uses in calls that were
26609 identified by find_address_like_use.
26610
26611 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26612 Alan Hayward <alan.hayward@arm.com>
26613 David Sherwood <david.sherwood@arm.com>
26614
26615 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26616 TARGET_MEM_REFs.
26617 * gimple-expr.h (is_gimple_addressable: Likewise.
26618 * gimple-expr.c (is_gimple_address): Likewise.
26619 * internal-fn.c (expand_call_mem_ref): New function.
26620 (expand_mask_load_optab_fn): Use it.
26621 (expand_mask_store_optab_fn): Likewise.
26622
26623 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26624 Alan Hayward <alan.hayward@arm.com>
26625 David Sherwood <david.sherwood@arm.com>
26626
26627 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26628 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26629 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26630 (cond_umax@var{mode}): Document.
26631 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26632 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26633 (cond_umin_optab, cond_umax_optab): New optabs.
26634 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26635 (COND_IOR, COND_XOR): New internal functions.
26636 * internal-fn.h (get_conditional_internal_fn): Declare.
26637 * internal-fn.c (cond_binary_direct): New macro.
26638 (expand_cond_binary_optab_fn): Likewise.
26639 (direct_cond_binary_optab_supported_p): Likewise.
26640 (get_conditional_internal_fn): New function.
26641 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26642 Cope with reduction statements that are vectorized as calls rather
26643 than assignments.
26644 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26645 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26646 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26647 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26648 (UNSPEC_COND_EOR): New unspecs.
26649 (optab): Add mappings for them.
26650 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26651 (sve_int_op, sve_fp_op): New int attributes.
26652
26653 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26654 Alan Hayward <alan.hayward@arm.com>
26655 David Sherwood <david.sherwood@arm.com>
26656
26657 * optabs.def (while_ult_optab): New optab.
26658 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26659 * internal-fn.def (WHILE_ULT): New internal function.
26660 * internal-fn.h (direct_internal_fn_supported_p): New override
26661 that takes two types as argument.
26662 * internal-fn.c (while_direct): New macro.
26663 (expand_while_optab_fn): New function.
26664 (convert_optab_supported_p): Likewise.
26665 (direct_while_optab_supported_p): New macro.
26666 * wide-int.h (wi::udiv_ceil): New function.
26667 * tree-vectorizer.h (rgroup_masks): New structure.
26668 (vec_loop_masks): New typedef.
26669 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26670 and fully_masked_p.
26671 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26672 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26673 (vect_max_vf): New function.
26674 (slpeel_make_loop_iterate_ntimes): Delete.
26675 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26676 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26677 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26678 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26679 internal-fn.h, stor-layout.h and optabs-query.h.
26680 (vect_set_loop_mask): New function.
26681 (add_preheader_seq): Likewise.
26682 (add_header_seq): Likewise.
26683 (interleave_supported_p): Likewise.
26684 (vect_maybe_permute_loop_masks): Likewise.
26685 (vect_set_loop_masks_directly): Likewise.
26686 (vect_set_loop_condition_masked): Likewise.
26687 (vect_set_loop_condition_unmasked): New function, split out from
26688 slpeel_make_loop_iterate_ntimes.
26689 (slpeel_make_loop_iterate_ntimes): Rename to..
26690 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26691 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26692 (vect_do_peeling): Update call accordingly.
26693 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26694 loops.
26695 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26696 mask_compare_type, can_fully_mask_p and fully_masked_p.
26697 (release_vec_loop_masks): New function.
26698 (_loop_vec_info): Use it to free the loop masks.
26699 (can_produce_all_loop_masks_p): New function.
26700 (vect_get_max_nscalars_per_iter): Likewise.
26701 (vect_verify_full_masking): Likewise.
26702 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26703 retries, and free the mask rgroups before retrying. Check loop-wide
26704 reasons for disallowing fully-masked loops. Make the final decision
26705 about whether use a fully-masked loop or not.
26706 (vect_estimate_min_profitable_iters): Do not assume that peeling
26707 for the number of iterations will be needed for fully-masked loops.
26708 (vectorizable_reduction): Disable fully-masked loops.
26709 (vectorizable_live_operation): Likewise.
26710 (vect_halve_mask_nunits): New function.
26711 (vect_double_mask_nunits): Likewise.
26712 (vect_record_loop_mask): Likewise.
26713 (vect_get_loop_mask): Likewise.
26714 (vect_transform_loop): Handle the case in which the final loop
26715 iteration might handle a partial vector. Call vect_set_loop_condition
26716 instead of slpeel_make_loop_iterate_ntimes.
26717 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26718 (check_load_store_masking): New function.
26719 (prepare_load_store_mask): Likewise.
26720 (vectorizable_store): Handle fully-masked loops.
26721 (vectorizable_load): Likewise.
26722 (supportable_widening_operation): Use vect_halve_mask_nunits for
26723 booleans.
26724 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26725 (vect_gen_while): New function.
26726 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26727 (aarch64_uqdec<mode>): New insn.
26728
26729 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26730 Alan Hayward <alan.hayward@arm.com>
26731 David Sherwood <david.sherwood@arm.com>
26732
26733 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26734 (reduc_xor_scal_optab): New optabs.
26735 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26736 (reduc_xor_scal_@var{m}): Document.
26737 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26738 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26739 internal functions.
26740 * fold-const-call.c (fold_const_call): Handle them.
26741 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26742 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26743 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26744 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26745 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26746 (UNSPEC_XORV): New unspecs.
26747 (optab): Add entries for them.
26748 (BITWISEV): New int iterator.
26749 (bit_reduc_op): New int attributes.
26750
26751 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26752 Alan Hayward <alan.hayward@arm.com>
26753 David Sherwood <david.sherwood@arm.com>
26754
26755 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26756 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26757 * optabs.def (vec_shl_insert_optab): New optab.
26758 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26759 (duplicate_and_interleave): Likewise.
26760 * tree-vect-loop.c: Include internal-fn.h.
26761 (neutral_op_for_slp_reduction): New function, split out from
26762 get_initial_defs_for_reduction.
26763 (get_initial_def_for_reduction): Handle option 2 for variable-length
26764 vectors by loading the neutral value into a vector and then shifting
26765 the initial value into element 0.
26766 (get_initial_defs_for_reduction): Replace the code argument with
26767 the neutral value calculated by neutral_op_for_slp_reduction.
26768 Use gimple_build_vector for constant-length vectors.
26769 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26770 but the first group_size elements have a neutral value.
26771 Use duplicate_and_interleave otherwise.
26772 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26773 Update call to get_initial_defs_for_reduction. Handle SLP
26774 reductions for variable-length vectors by creating one vector
26775 result for each scalar result, with the elements associated
26776 with other scalar results stubbed out with the neutral value.
26777 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26778 Require IFN_VEC_SHL_INSERT for double reductions on
26779 variable-length vectors, or SLP reductions that have
26780 a neutral value. Require can_duplicate_and_interleave_p
26781 support for variable-length unchained SLP reductions if there
26782 is no neutral value, such as for MIN/MAX reductions. Also require
26783 the number of vector elements to be a multiple of the number of
26784 SLP statements when doing variable-length unchained SLP reductions.
26785 Update call to vect_create_epilog_for_reduction.
26786 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26787 and remove initial values.
26788 (duplicate_and_interleave): Make public.
26789 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26790 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26791
26792 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26793 Alan Hayward <alan.hayward@arm.com>
26794 David Sherwood <david.sherwood@arm.com>
26795
26796 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26797 (can_duplicate_and_interleave_p): New function.
26798 (vect_get_and_check_slp_defs): Take the vector of statements
26799 rather than just the current one. Remove excess parentheses.
26800 Restriction rejectinon of vect_constant_def and vect_external_def
26801 for variable-length vectors to boolean types, or types for which
26802 can_duplicate_and_interleave_p is false.
26803 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26804 (duplicate_and_interleave): New function.
26805 (vect_get_constant_vectors): Use gimple_build_vector for
26806 constant-length vectors and suitable variable-length constant
26807 vectors. Use duplicate_and_interleave for other variable-length
26808 vectors. Don't defer the update when inserting new statements.
26809
26810 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26811 Alan Hayward <alan.hayward@arm.com>
26812 David Sherwood <david.sherwood@arm.com>
26813
26814 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26815 min_profitable_iters doesn't go negative.
26816
26817 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26818 Alan Hayward <alan.hayward@arm.com>
26819 David Sherwood <david.sherwood@arm.com>
26820
26821 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26822 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26823 * optabs.def (vec_mask_load_lanes_optab): New optab.
26824 (vec_mask_store_lanes_optab): Likewise.
26825 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26826 (MASK_STORE_LANES): Likewise.
26827 * internal-fn.c (mask_load_lanes_direct): New macro.
26828 (mask_store_lanes_direct): Likewise.
26829 (expand_mask_load_optab_fn): Handle masked operations.
26830 (expand_mask_load_lanes_optab_fn): New macro.
26831 (expand_mask_store_optab_fn): Handle masked operations.
26832 (expand_mask_store_lanes_optab_fn): New macro.
26833 (direct_mask_load_lanes_optab_supported_p): Likewise.
26834 (direct_mask_store_lanes_optab_supported_p): Likewise.
26835 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26836 parameter.
26837 (vect_load_lanes_supported): Likewise.
26838 * tree-vect-data-refs.c (strip_conversion): New function.
26839 (can_group_stmts_p): Likewise.
26840 (vect_analyze_data_ref_accesses): Use it instead of checking
26841 for a pair of assignments.
26842 (vect_store_lanes_supported): Take a masked_p parameter.
26843 (vect_load_lanes_supported): Likewise.
26844 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26845 vect_store_lanes_supported and vect_load_lanes_supported.
26846 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26847 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26848 parameter. Don't allow gaps for masked accesses.
26849 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26850 and vect_load_lanes_supported.
26851 (get_load_store_type): Take a masked_p parameter and update
26852 call to get_group_load_store_type.
26853 (vectorizable_store): Update call to get_load_store_type.
26854 Handle IFN_MASK_STORE_LANES.
26855 (vectorizable_load): Update call to get_load_store_type.
26856 Handle IFN_MASK_LOAD_LANES.
26857
26858 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26859 Alan Hayward <alan.hayward@arm.com>
26860 David Sherwood <david.sherwood@arm.com>
26861
26862 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26863 modes for SVE.
26864 * config/aarch64/aarch64-protos.h
26865 (aarch64_sve_struct_memory_operand_p): Declare.
26866 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26867 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26868 (VPRED, vpred): Handle SVE structure modes.
26869 * config/aarch64/constraints.md (Utx): New constraint.
26870 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26871 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26872 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26873 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26874 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26875 structure modes. Split into pieces after RA.
26876 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26877 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26878 New patterns.
26879 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26880 SVE structure modes.
26881 (aarch64_classify_address): Likewise.
26882 (sizetochar): Move earlier in file.
26883 (aarch64_print_operand): Handle SVE register lists.
26884 (aarch64_array_mode): New function.
26885 (aarch64_sve_struct_memory_operand_p): Likewise.
26886 (TARGET_ARRAY_MODE): Redefine.
26887
26888 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26889 Alan Hayward <alan.hayward@arm.com>
26890 David Sherwood <david.sherwood@arm.com>
26891
26892 * target.def (array_mode): New target hook.
26893 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26894 * doc/tm.texi: Regenerate.
26895 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26896 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26897 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26898 targetm.array_mode.
26899 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26900 type sizes.
26901
26902 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26903 Alan Hayward <alan.hayward@arm.com>
26904 David Sherwood <david.sherwood@arm.com>
26905
26906 * fold-const.c (fold_binary_loc): Check the argument types
26907 rather than the result type when testing for a vector operation.
26908
26909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26910
26911 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26912 * doc/tm.texi: Regenerate.
26913
26914 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26915 Alan Hayward <alan.hayward@arm.com>
26916 David Sherwood <david.sherwood@arm.com>
26917
26918 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26919 (sve): Document new AArch64 extension.
26920 * doc/md.texi (w): Extend the description of the AArch64
26921 constraint to include SVE vectors.
26922 (Upl, Upa): Document new AArch64 predicate constraints.
26923 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26924 enum.
26925 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26926 (msve-vector-bits=): New option.
26927 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26928 SVE when these are disabled.
26929 (sve): New extension.
26930 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26931 modes. Adjust their number of units based on aarch64_sve_vg.
26932 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26933 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26934 aarch64_addr_query_type.
26935 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26936 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26937 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26938 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26939 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26940 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26941 (aarch64_simd_imm_zero_p): Delete.
26942 (aarch64_check_zero_based_sve_index_immediate): Declare.
26943 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26944 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26945 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26946 (aarch64_sve_float_mul_immediate_p): Likewise.
26947 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26948 rather than an rtx.
26949 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26950 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26951 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26952 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26953 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26954 (aarch64_regmode_natural_size): Likewise.
26955 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26956 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26957 left one place.
26958 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26959 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26960 for VG and the SVE predicate registers.
26961 (V_ALIASES): Add a "z"-prefixed alias.
26962 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26963 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26964 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26965 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26966 (REG_CLASS_NAMES): Add entries for them.
26967 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26968 and the predicate registers.
26969 (aarch64_sve_vg): Declare.
26970 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26971 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26972 (REGMODE_NATURAL_SIZE): Define.
26973 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26974 SVE macros.
26975 * config/aarch64/aarch64.c: Include cfgrtl.h.
26976 (simd_immediate_info): Add a constructor for series vectors,
26977 and an associated step field.
26978 (aarch64_sve_vg): New variable.
26979 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26980 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26981 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26982 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26983 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26984 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26985 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26986 (aarch64_get_mask_mode): New functions.
26987 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26988 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26989 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26990 predicate modes and predicate registers. Explicitly restrict
26991 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26992 to store a vector mode if it is recognized by
26993 aarch64_classify_vector_mode.
26994 (aarch64_regmode_natural_size): New function.
26995 (aarch64_hard_regno_caller_save_mode): Return the original mode
26996 for predicates.
26997 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26998 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26999 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
27000 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
27001 functions.
27002 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
27003 does not overlap dest if the function is frame-related. Handle
27004 SVE constants.
27005 (aarch64_split_add_offset): New function.
27006 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
27007 them aarch64_add_offset.
27008 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
27009 and update call to aarch64_sub_sp.
27010 (aarch64_add_cfa_expression): New function.
27011 (aarch64_expand_prologue): Pass extra temporary registers to the
27012 functions above. Handle the case in which we need to emit new
27013 DW_CFA_expressions for registers that were originally saved
27014 relative to the stack pointer, but now have to be expressed
27015 relative to the frame pointer.
27016 (aarch64_output_mi_thunk): Pass extra temporary registers to the
27017 functions above.
27018 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
27019 IP0 and IP1 values for SVE frames.
27020 (aarch64_expand_vec_series): New function.
27021 (aarch64_expand_sve_widened_duplicate): Likewise.
27022 (aarch64_expand_sve_const_vector): Likewise.
27023 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
27024 Handle SVE constants. Use emit_move_insn to move a force_const_mem
27025 into the register, rather than emitting a SET directly.
27026 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
27027 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
27028 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
27029 (offset_9bit_signed_scaled_p): New functions.
27030 (aarch64_replicate_bitmask_imm): New function.
27031 (aarch64_bitmask_imm): Use it.
27032 (aarch64_cannot_force_const_mem): Reject expressions involving
27033 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
27034 (aarch64_classify_index): Handle SVE indices, by requiring
27035 a plain register index with a scale that matches the element size.
27036 (aarch64_classify_address): Handle SVE addresses. Assert that
27037 the mode of the address is VOIDmode or an integer mode.
27038 Update call to aarch64_classify_symbol.
27039 (aarch64_classify_symbolic_expression): Update call to
27040 aarch64_classify_symbol.
27041 (aarch64_const_vec_all_in_range_p): New function.
27042 (aarch64_print_vector_float_operand): Likewise.
27043 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
27044 "vN" for FP registers with SVE modes. Handle (const ...) vectors
27045 and the FP immediates 1.0 and 0.5.
27046 (aarch64_print_address_internal): Handle SVE addresses.
27047 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
27048 (aarch64_regno_regclass): Handle predicate registers.
27049 (aarch64_secondary_reload): Handle big-endian reloads of SVE
27050 data modes.
27051 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
27052 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
27053 (aarch64_convert_sve_vector_bits): New function.
27054 (aarch64_override_options): Use it to handle -msve-vector-bits=.
27055 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27056 rather than an rtx.
27057 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
27058 Handle SVE vector and predicate modes. Accept VL-based constants
27059 that need only one temporary register, and VL offsets that require
27060 no temporary registers.
27061 (aarch64_conditional_register_usage): Mark the predicate registers
27062 as fixed if SVE isn't available.
27063 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
27064 Return true for SVE vector and predicate modes.
27065 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
27066 rather than an unsigned int. Handle SVE modes.
27067 (aarch64_preferred_simd_mode): Update call accordingly. Handle
27068 SVE modes.
27069 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
27070 if SVE is enabled.
27071 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27072 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27073 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27074 (aarch64_sve_float_mul_immediate_p): New functions.
27075 (aarch64_sve_valid_immediate): New function.
27076 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
27077 Explicitly reject structure modes. Check for INDEX constants.
27078 Handle PTRUE and PFALSE constants.
27079 (aarch64_check_zero_based_sve_index_immediate): New function.
27080 (aarch64_simd_imm_zero_p): Delete.
27081 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
27082 vector modes. Accept constants in the range of CNT[BHWD].
27083 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
27084 ask for an Advanced SIMD mode.
27085 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
27086 (aarch64_simd_vector_alignment): Handle SVE predicates.
27087 (aarch64_vectorize_preferred_vector_alignment): New function.
27088 (aarch64_simd_vector_alignment_reachable): Use it instead of
27089 the vector size.
27090 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
27091 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
27092 functions.
27093 (MAX_VECT_LEN): Delete.
27094 (expand_vec_perm_d): Add a vec_flags field.
27095 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
27096 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
27097 (aarch64_evpc_ext): Don't apply a big-endian lane correction
27098 for SVE modes.
27099 (aarch64_evpc_rev): Rename to...
27100 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
27101 (aarch64_evpc_rev_global): New function.
27102 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
27103 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
27104 MAX_VECT_LEN.
27105 (aarch64_evpc_sve_tbl): New function.
27106 (aarch64_expand_vec_perm_const_1): Update after rename of
27107 aarch64_evpc_rev. Handle SVE permutes too, trying
27108 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
27109 than aarch64_evpc_tbl.
27110 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
27111 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
27112 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
27113 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
27114 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
27115 (aarch64_expand_sve_vcond): New functions.
27116 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
27117 of aarch64_vector_mode_p.
27118 (aarch64_dwarf_poly_indeterminate_value): New function.
27119 (aarch64_compute_pressure_classes): Likewise.
27120 (aarch64_can_change_mode_class): Likewise.
27121 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
27122 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
27123 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
27124 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
27125 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
27126 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
27127 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
27128 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
27129 constraints.
27130 (Dn, Dl, Dr): Accept const as well as const_vector.
27131 (Dz): Likewise. Compare against CONST0_RTX.
27132 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
27133 of "vector" where appropriate.
27134 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
27135 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
27136 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
27137 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
27138 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
27139 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
27140 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
27141 (v_int_equiv): Extend to SVE modes.
27142 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
27143 mode attributes.
27144 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
27145 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
27146 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
27147 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
27148 (SVE_COND_FP_CMP): New int iterators.
27149 (perm_hilo): Handle the new unpack unspecs.
27150 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
27151 attributes.
27152 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
27153 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
27154 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
27155 (aarch64_equality_operator, aarch64_constant_vector_operand)
27156 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
27157 (aarch64_sve_nonimmediate_operand): Likewise.
27158 (aarch64_sve_general_operand): Likewise.
27159 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
27160 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
27161 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
27162 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
27163 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
27164 (aarch64_sve_float_arith_immediate): Likewise.
27165 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
27166 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
27167 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
27168 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
27169 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
27170 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
27171 (aarch64_sve_float_arith_operand): Likewise.
27172 (aarch64_sve_float_arith_with_sub_operand): Likewise.
27173 (aarch64_sve_float_mul_operand): Likewise.
27174 (aarch64_sve_vec_perm_operand): Likewise.
27175 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
27176 (aarch64_mov_operand): Accept const_poly_int and const_vector.
27177 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
27178 as well as const_vector.
27179 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
27180 in file. Use CONST0_RTX and CONSTM1_RTX.
27181 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
27182 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
27183 Use aarch64_simd_imm_zero.
27184 * config/aarch64/aarch64-sve.md: New file.
27185 * config/aarch64/aarch64.md: Include it.
27186 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
27187 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
27188 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
27189 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
27190 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
27191 (sve): New attribute.
27192 (enabled): Disable instructions with the sve attribute unless
27193 TARGET_SVE.
27194 (movqi, movhi): Pass CONST_POLY_INT operaneds through
27195 aarch64_expand_mov_immediate.
27196 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
27197 CNT[BHSD] immediates.
27198 (movti): Split CONST_POLY_INT moves into two halves.
27199 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
27200 Split additions that need a temporary here if the destination
27201 is the stack pointer.
27202 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
27203 (*add<mode>3_poly_1): New instruction.
27204 (set_clobber_cc): New expander.
27205
27206 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27207
27208 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
27209 parameter and use it instead of GET_MODE_SIZE (innermode). Use
27210 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
27211 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
27212 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
27213 Change innermode from fixed_mode_size to machine_mode.
27214 (simplify_subreg): Update call accordingly. Handle a constant-sized
27215 subreg of a variable-length CONST_VECTOR.
27216
27217 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27218 Alan Hayward <alan.hayward@arm.com>
27219 David Sherwood <david.sherwood@arm.com>
27220
27221 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
27222 (add_offset_to_base): New function, split out from...
27223 (create_mem_ref): ...here. When handling a scale other than 1,
27224 check first whether the address is valid without the offset.
27225 Add it into the base if so, leaving the index and scale as-is.
27226
27227 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27228
27229 PR c++/83778
27230 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
27231 fold_for_warn before checking if arg2 is INTEGER_CST.
27232
27233 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
27234
27235 * config/rs6000/predicates.md (load_multiple_operation): Delete.
27236 (store_multiple_operation): Delete.
27237 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
27238 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
27239 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
27240 guarded by TARGET_STRING.
27241 (rs6000_output_load_multiple): Delete.
27242 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27243 OPTION_MASK_STRING / TARGET_STRING handling.
27244 (print_operand) <'N', 'O'>: Add comment that these are unused now.
27245 (const rs6000_opt_masks) <"string">: Change mask to 0.
27246 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27247 (MASK_STRING): Delete.
27248 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27249 parts. Simplify.
27250 (load_multiple): Delete.
27251 (*ldmsi8): Delete.
27252 (*ldmsi7): Delete.
27253 (*ldmsi6): Delete.
27254 (*ldmsi5): Delete.
27255 (*ldmsi4): Delete.
27256 (*ldmsi3): Delete.
27257 (store_multiple): Delete.
27258 (*stmsi8): Delete.
27259 (*stmsi7): Delete.
27260 (*stmsi6): Delete.
27261 (*stmsi5): Delete.
27262 (*stmsi4): Delete.
27263 (*stmsi3): Delete.
27264 (movmemsi_8reg): Delete.
27265 (corresponding unnamed define_insn): Delete.
27266 (movmemsi_6reg): Delete.
27267 (corresponding unnamed define_insn): Delete.
27268 (movmemsi_4reg): Delete.
27269 (corresponding unnamed define_insn): Delete.
27270 (movmemsi_2reg): Delete.
27271 (corresponding unnamed define_insn): Delete.
27272 (movmemsi_1reg): Delete.
27273 (corresponding unnamed define_insn): Delete.
27274 * config/rs6000/rs6000.opt (mno-string): New.
27275 (mstring): Replace by deprecation warning stub.
27276 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27277
27278 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27279
27280 * regrename.c (regrename_do_replace): If replacing the same
27281 reg multiple times, try to reuse last created gen_raw_REG.
27282
27283 PR debug/81155
27284 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27285 main to workaround a bug in GDB.
27286
27287 2018-01-12 Tom de Vries <tom@codesourcery.com>
27288
27289 PR target/83737
27290 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27291
27292 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
27293
27294 PR rtl-optimization/80481
27295 * ira-color.c (get_cap_member): New function.
27296 (allocnos_conflict_by_live_ranges_p): Use it.
27297 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27298 (setup_slot_coalesced_allocno_live_ranges): Ditto.
27299
27300 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
27301
27302 PR target/83628
27303 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27304 (*saddl_se_1): Ditto.
27305 (*ssubsi_1): Ditto.
27306 (*ssubl_se_1): Ditto.
27307
27308 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27309
27310 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27311 rather than wi::to_widest for DR_INITs.
27312 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27313 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27314 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27315 INTEGER_CSTs.
27316 (vect_analyze_group_access_1): Note that here.
27317
27318 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27319
27320 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27321 polynomial type sizes.
27322
27323 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27324
27325 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27326 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27327 (gimple_add_tmp_var): Likewise.
27328
27329 2018-01-12 Martin Liska <mliska@suse.cz>
27330
27331 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27332 (gimple_alloc_sizes): Likewise.
27333 (dump_gimple_statistics): Use PRIu64 in printf format.
27334 * gimple.h: Change uint64_t to int.
27335
27336 2018-01-12 Martin Liska <mliska@suse.cz>
27337
27338 * tree-core.h: Use uint64_t instead of int.
27339 * tree.c (tree_node_counts): Likewise.
27340 (tree_node_sizes): Likewise.
27341 (dump_tree_statistics): Use PRIu64 in printf format.
27342
27343 2018-01-12 Martin Liska <mliska@suse.cz>
27344
27345 * Makefile.in: As qsort_chk is implemented in vec.c, add
27346 vec.o to linkage of gencfn-macros.
27347 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27348 passing the info to record_node_allocation_statistics.
27349 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27350 and pass the info.
27351 * ggc-common.c (struct ggc_usage): Add operator== and use
27352 it in operator< and compare function.
27353 * mem-stats.h (struct mem_usage): Likewise.
27354 * vec.c (struct vec_usage): Remove operator< and compare
27355 function. Can be simply inherited.
27356
27357 2018-01-12 Martin Jambor <mjambor@suse.cz>
27358
27359 PR target/81616
27360 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27361 * tree-ssa-math-opts.c: Include domwalk.h.
27362 (convert_mult_to_fma_1): New function.
27363 (fma_transformation_info): New type.
27364 (fma_deferring_state): Likewise.
27365 (cancel_fma_deferring): New function.
27366 (result_of_phi): Likewise.
27367 (last_fma_candidate_feeds_initial_phi): Likewise.
27368 (convert_mult_to_fma): Added deferring logic, split actual
27369 transformation to convert_mult_to_fma_1.
27370 (math_opts_dom_walker): New type.
27371 (math_opts_dom_walker::after_dom_children): New method, body moved
27372 here from pass_optimize_widening_mul::execute, added deferring logic
27373 bits.
27374 (pass_optimize_widening_mul::execute): Moved most of code to
27375 math_opts_dom_walker::after_dom_children.
27376 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27377 * config/i386/i386.c (ix86_option_override_internal): Added
27378 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27379
27380 2018-01-12 Richard Biener <rguenther@suse.de>
27381
27382 PR debug/83157
27383 * dwarf2out.c (gen_variable_die): Do not reset old_die for
27384 inline instance vars.
27385
27386 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
27387
27388 PR target/81819
27389 * config/rx/rx.c (rx_is_restricted_memory_address):
27390 Handle SUBREG case.
27391
27392 2018-01-12 Richard Biener <rguenther@suse.de>
27393
27394 PR tree-optimization/80846
27395 * target.def (split_reduction): New target hook.
27396 * targhooks.c (default_split_reduction): New function.
27397 * targhooks.h (default_split_reduction): Declare.
27398 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27399 target requests first reduce vectors by combining low and high
27400 parts.
27401 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27402 (get_vectype_for_scalar_type_and_size): Export.
27403 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27404 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27405 * doc/tm.texi: Regenerate.
27406 * config/i386/i386.c (ix86_split_reduction): Implement
27407 TARGET_VECTORIZE_SPLIT_REDUCTION.
27408
27409 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27410
27411 PR target/83368
27412 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27413 in PIC mode except for TARGET_VXWORKS_RTP.
27414 * config/sparc/sparc.c: Include cfgrtl.h.
27415 (TARGET_INIT_PIC_REG): Define.
27416 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27417 (sparc_pic_register_p): New predicate.
27418 (sparc_legitimate_address_p): Use it.
27419 (sparc_legitimize_pic_address): Likewise.
27420 (sparc_delegitimize_address): Likewise.
27421 (sparc_mode_dependent_address_p): Likewise.
27422 (gen_load_pcrel_sym): Remove 4th parameter.
27423 (load_got_register): Adjust call to above. Remove obsolete stuff.
27424 (sparc_expand_prologue): Do not call load_got_register here.
27425 (sparc_flat_expand_prologue): Likewise.
27426 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27427 (sparc_use_pseudo_pic_reg): New function.
27428 (sparc_init_pic_reg): Likewise.
27429 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27430 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27431
27432 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
27433
27434 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27435 Add item for branch_cost.
27436
27437 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27438
27439 PR rtl-optimization/83565
27440 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27441 not extend the result to a larger mode for rotate operations.
27442 (num_sign_bit_copies1): Likewise.
27443
27444 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27445
27446 PR target/40411
27447 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27448 -symbolic.
27449 Use values-Xc.o for -pedantic.
27450 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27451
27452 2018-01-12 Martin Liska <mliska@suse.cz>
27453
27454 PR ipa/83054
27455 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27456 New function.
27457 (possible_polymorphic_call_targets): Use it.
27458 (ipa_devirt): Likewise.
27459
27460 2018-01-12 Martin Liska <mliska@suse.cz>
27461
27462 * profile-count.h (enum profile_quality): Use 0 as invalid
27463 enum value of profile_quality.
27464
27465 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27466
27467 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27468 -mext-string options.
27469
27470 2018-01-12 Richard Biener <rguenther@suse.de>
27471
27472 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27473 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27474 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27475 Likewise.
27476 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27477
27478 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27479
27480 * configure.ac (--with-long-double-format): Add support for the
27481 configuration option to change the default long double format on
27482 PowerPC systems.
27483 * config.gcc (powerpc*-linux*-*): Likewise.
27484 * configure: Regenerate.
27485 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27486 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27487 used without modification.
27488
27489 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27490
27491 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27492 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27493 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27494 MISC_BUILTIN_SPEC_BARRIER.
27495 (rs6000_init_builtins): Likewise.
27496 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27497 enum value.
27498 (speculation_barrier): New define_insn.
27499 * doc/extend.texi: Document __builtin_speculation_barrier.
27500
27501 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27502
27503 PR target/83203
27504 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27505 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27506 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27507 iterators.
27508 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27509 integral modes instead of "ss" and "sd".
27510 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27511 vectors with 32-bit and 64-bit elements.
27512 (vecdupssescalarmodesuffix): New mode attribute.
27513 (vec_dup<mode>): Use it.
27514
27515 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27516
27517 PR target/83330
27518 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27519 frame if argument is passed on stack.
27520
27521 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27522
27523 PR target/82682
27524 * ree.c (combine_reaching_defs): Optimize also
27525 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27526 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27527
27528 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27529
27530 PR middle-end/83189
27531 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27532
27533 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27534
27535 PR middle-end/83718
27536 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27537 after they are computed.
27538
27539 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27540
27541 PR tree-optimization/83695
27542 * gimple-loop-linterchange.cc
27543 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27544 reset cached scev information after interchange.
27545 (pass_linterchange::execute): Remove call to scev_reset_htab.
27546
27547 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27548
27549 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27550 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27551 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27552 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27553 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27554 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27555 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27556 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27557 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27558 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27559 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27560 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27561 (V_lane_reg): Likewise.
27562 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27563 New define_expand.
27564 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27565 (vfmal_lane_low<mode>_intrinsic,
27566 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27567 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27568 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27569 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27570 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27571 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27572
27573 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27574
27575 * config/arm/arm-cpus.in (fp16fml): New feature.
27576 (ALL_SIMD): Add fp16fml.
27577 (armv8.2-a): Add fp16fml as an option.
27578 (armv8.3-a): Likewise.
27579 (armv8.4-a): Add fp16fml as part of fp16.
27580 * config/arm/arm.h (TARGET_FP16FML): Define.
27581 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27582 when appropriate.
27583 * config/arm/arm-modes.def (V2HF): Define.
27584 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27585 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27586 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27587 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27588 vfmsl_low, vfmsl_high): New set of builtins.
27589 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27590 (vfml_op): New code attribute.
27591 (VFMLHALVES): New int iterator.
27592 (VFML, VFMLSEL): New mode attributes.
27593 (V_reg): Define mapping for V2HF.
27594 (V_hi, V_lo): New mode attributes.
27595 (VF_constraint): Likewise.
27596 (vfml_half, vfml_half_selector): New int attributes.
27597 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27598 define_expand.
27599 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27600 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27601 New define_insn.
27602 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27603 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27604 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27605 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27606 documentation.
27607 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27608 Document new effective target and option set.
27609
27610 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27611
27612 * config/arm/arm-cpus.in (armv8_4): New feature.
27613 (ARMv8_4a): New fgroup.
27614 (armv8.4-a): New arch.
27615 * config/arm/arm-tables.opt: Regenerate.
27616 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27617 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27618 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27619 Add matching rules for -march=armv8.4-a and extensions.
27620 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27621
27622 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27623
27624 PR target/81821
27625 * config/rx/rx.md (BW): New mode attribute.
27626 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27627
27628 2018-01-11 Richard Biener <rguenther@suse.de>
27629
27630 PR tree-optimization/83435
27631 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27632 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27633 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27634
27635 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27636 Alan Hayward <alan.hayward@arm.com>
27637 David Sherwood <david.sherwood@arm.com>
27638
27639 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27640 field.
27641 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27642 (aarch64_print_address_internal): Use it to check for a zero offset.
27643
27644 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27645 Alan Hayward <alan.hayward@arm.com>
27646 David Sherwood <david.sherwood@arm.com>
27647
27648 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27649 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27650 Return a poly_int64 rather than a HOST_WIDE_INT.
27651 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27652 rather than a HOST_WIDE_INT.
27653 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27654 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27655 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27656 final_offset from HOST_WIDE_INT to poly_int64.
27657 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27658 to_constant when getting the number of units in an Advanced SIMD
27659 mode.
27660 (aarch64_builtin_vectorized_function): Check for a constant number
27661 of units.
27662 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27663 GET_MODE_SIZE.
27664 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27665 attribute instead of GET_MODE_NUNITS.
27666 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27667 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27668 GET_MODE_SIZE for fixed-size registers.
27669 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27670 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27671 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27672 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27673 (aarch64_print_operand, aarch64_print_address_internal)
27674 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27675 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27676 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27677 Handle polynomial GET_MODE_SIZE.
27678 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27679 wider than SImode without modification.
27680 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27681 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27682 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27683 passing and returning SVE modes.
27684 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27685 rather than GEN_INT.
27686 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27687 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27688 (aarch64_allocate_and_probe_stack_space): Likewise.
27689 (aarch64_layout_frame): Cope with polynomial offsets.
27690 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27691 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27692 polynomial offsets.
27693 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27694 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27695 poly_int64 rather than a HOST_WIDE_INT.
27696 (aarch64_get_separate_components, aarch64_process_components)
27697 (aarch64_expand_prologue, aarch64_expand_epilogue)
27698 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27699 (aarch64_anchor_offset): New function, split out from...
27700 (aarch64_legitimize_address): ...here.
27701 (aarch64_builtin_vectorization_cost): Handle polynomial
27702 TYPE_VECTOR_SUBPARTS.
27703 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27704 GET_MODE_NUNITS.
27705 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27706 number of elements from the PARALLEL rather than the mode.
27707 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27708 rather than GET_MODE_BITSIZE.
27709 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27710 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27711 (aarch64_expand_vec_perm_const_1): Handle polynomial
27712 d->perm.length () and d->perm elements.
27713 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27714 Apply to_constant to d->perm elements.
27715 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27716 polynomial CONST_VECTOR_NUNITS.
27717 (aarch64_move_pointer): Take amount as a poly_int64 rather
27718 than an int.
27719 (aarch64_progress_pointer): Avoid temporary variable.
27720 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27721 the mode attribute instead of GET_MODE.
27722
27723 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27724 Alan Hayward <alan.hayward@arm.com>
27725 David Sherwood <david.sherwood@arm.com>
27726
27727 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27728 x exists before using it.
27729 (aarch64_add_constant_internal): Rename to...
27730 (aarch64_add_offset_1): ...this. Replace regnum with separate
27731 src and dest rtxes. Handle the case in which they're different,
27732 including when the offset is zero. Replace scratchreg with an rtx.
27733 Use 2 additions if there is no spare register into which we can
27734 move a 16-bit constant.
27735 (aarch64_add_constant): Delete.
27736 (aarch64_add_offset): Replace reg with separate src and dest
27737 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27738 Use aarch64_add_offset_1.
27739 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27740 an rtx rather than an int. Take the delta as a poly_int64
27741 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27742 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27743 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27744 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27745 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27746 and aarch64_add_sp.
27747 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27748 aarch64_add_constant.
27749
27750 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27751
27752 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27753 Use scalar_float_mode.
27754
27755 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27756
27757 * config/aarch64/aarch64-simd.md
27758 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27759 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27760 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27761 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27762 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27763 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27764 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27765 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27766 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27767 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27768
27769 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27770
27771 PR target/83514
27772 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27773 targ_options->x_arm_arch_string is non NULL.
27774
27775 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27776
27777 * config/aarch64/aarch64.h
27778 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27779
27780 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27781
27782 PR target/82096
27783 * expmed.c (emit_store_flag_force): Swap if const op0
27784 and change VOIDmode to mode of op0.
27785
27786 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27787
27788 PR rtl-optimization/83761
27789 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27790 than bytes to mode_for_size.
27791
27792 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27793
27794 PR middle-end/83189
27795 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27796 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27797 profile.
27798
27799 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27800
27801 PR middle-end/83575
27802 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27803 when in layout mode.
27804 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27805 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27806 partition fixup.
27807
27808 2018-01-10 Michael Collison <michael.collison@arm.com>
27809
27810 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27811 * config/aarch64/aarch64-option-extension.def: Add
27812 AARCH64_OPT_EXTENSION of 'fp16fml'.
27813 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27814 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27815 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27816 * config/aarch64/constraints.md (Ui7): New constraint.
27817 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27818 (VFMLA_SEL_W): Ditto.
27819 (f16quad): Ditto.
27820 (f16mac1): Ditto.
27821 (VFMLA16_LOW): New int iterator.
27822 (VFMLA16_HIGH): Ditto.
27823 (UNSPEC_FMLAL): New unspec.
27824 (UNSPEC_FMLSL): Ditto.
27825 (UNSPEC_FMLAL2): Ditto.
27826 (UNSPEC_FMLSL2): Ditto.
27827 (f16mac): New code attribute.
27828 * config/aarch64/aarch64-simd-builtins.def
27829 (aarch64_fmlal_lowv2sf): Ditto.
27830 (aarch64_fmlsl_lowv2sf): Ditto.
27831 (aarch64_fmlalq_lowv4sf): Ditto.
27832 (aarch64_fmlslq_lowv4sf): Ditto.
27833 (aarch64_fmlal_highv2sf): Ditto.
27834 (aarch64_fmlsl_highv2sf): Ditto.
27835 (aarch64_fmlalq_highv4sf): Ditto.
27836 (aarch64_fmlslq_highv4sf): Ditto.
27837 (aarch64_fmlal_lane_lowv2sf): Ditto.
27838 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27839 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27840 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27841 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27842 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27843 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27844 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27845 (aarch64_fmlal_lane_highv2sf): Ditto.
27846 (aarch64_fmlsl_lane_highv2sf): Ditto.
27847 (aarch64_fmlal_laneq_highv2sf): Ditto.
27848 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27849 (aarch64_fmlalq_lane_highv4sf): Ditto.
27850 (aarch64_fmlsl_lane_highv4sf): Ditto.
27851 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27852 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27853 * config/aarch64/aarch64-simd.md:
27854 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27855 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27856 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27857 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27858 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27859 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27860 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27861 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27862 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27863 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27864 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27865 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27866 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27867 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27868 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27869 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27870 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27871 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27872 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27873 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27874 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27875 (vfmlsl_low_u32): Ditto.
27876 (vfmlalq_low_u32): Ditto.
27877 (vfmlslq_low_u32): Ditto.
27878 (vfmlal_high_u32): Ditto.
27879 (vfmlsl_high_u32): Ditto.
27880 (vfmlalq_high_u32): Ditto.
27881 (vfmlslq_high_u32): Ditto.
27882 (vfmlal_lane_low_u32): Ditto.
27883 (vfmlsl_lane_low_u32): Ditto.
27884 (vfmlal_laneq_low_u32): Ditto.
27885 (vfmlsl_laneq_low_u32): Ditto.
27886 (vfmlalq_lane_low_u32): Ditto.
27887 (vfmlslq_lane_low_u32): Ditto.
27888 (vfmlalq_laneq_low_u32): Ditto.
27889 (vfmlslq_laneq_low_u32): Ditto.
27890 (vfmlal_lane_high_u32): Ditto.
27891 (vfmlsl_lane_high_u32): Ditto.
27892 (vfmlal_laneq_high_u32): Ditto.
27893 (vfmlsl_laneq_high_u32): Ditto.
27894 (vfmlalq_lane_high_u32): Ditto.
27895 (vfmlslq_lane_high_u32): Ditto.
27896 (vfmlalq_laneq_high_u32): Ditto.
27897 (vfmlslq_laneq_high_u32): Ditto.
27898 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27899 (AARCH64_FL_FOR_ARCH8_4): New.
27900 (AARCH64_ISA_F16FML): New ISA flag.
27901 (TARGET_F16FML): New feature flag for fp16fml.
27902 (doc/invoke.texi): Document new fp16fml option.
27903
27904 2018-01-10 Michael Collison <michael.collison@arm.com>
27905
27906 * config/aarch64/aarch64-builtins.c:
27907 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27908 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27909 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27910 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27911 (AARCH64_ISA_SHA3): New ISA flag.
27912 (TARGET_SHA3): New feature flag for sha3.
27913 * config/aarch64/iterators.md (sha512_op): New int attribute.
27914 (CRYPTO_SHA512): New int iterator.
27915 (UNSPEC_SHA512H): New unspec.
27916 (UNSPEC_SHA512H2): Ditto.
27917 (UNSPEC_SHA512SU0): Ditto.
27918 (UNSPEC_SHA512SU1): Ditto.
27919 * config/aarch64/aarch64-simd-builtins.def
27920 (aarch64_crypto_sha512hqv2di): New builtin.
27921 (aarch64_crypto_sha512h2qv2di): Ditto.
27922 (aarch64_crypto_sha512su0qv2di): Ditto.
27923 (aarch64_crypto_sha512su1qv2di): Ditto.
27924 (aarch64_eor3qv8hi): Ditto.
27925 (aarch64_rax1qv2di): Ditto.
27926 (aarch64_xarqv2di): Ditto.
27927 (aarch64_bcaxqv8hi): Ditto.
27928 * config/aarch64/aarch64-simd.md:
27929 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27930 (aarch64_crypto_sha512su0qv2di): Ditto.
27931 (aarch64_crypto_sha512su1qv2di): Ditto.
27932 (aarch64_eor3qv8hi): Ditto.
27933 (aarch64_rax1qv2di): Ditto.
27934 (aarch64_xarqv2di): Ditto.
27935 (aarch64_bcaxqv8hi): Ditto.
27936 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27937 (vsha512h2q_u64): Ditto.
27938 (vsha512su0q_u64): Ditto.
27939 (vsha512su1q_u64): Ditto.
27940 (veor3q_u16): Ditto.
27941 (vrax1q_u64): Ditto.
27942 (vxarq_u64): Ditto.
27943 (vbcaxq_u16): Ditto.
27944 * config/arm/types.md (crypto_sha512): New type attribute.
27945 (crypto_sha3): Ditto.
27946 (doc/invoke.texi): Document new sha3 option.
27947
27948 2018-01-10 Michael Collison <michael.collison@arm.com>
27949
27950 * config/aarch64/aarch64-builtins.c:
27951 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27952 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27953 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27954 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27955 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27956 (AARCH64_ISA_SM4): New ISA flag.
27957 (TARGET_SM4): New feature flag for sm4.
27958 * config/aarch64/aarch64-simd-builtins.def
27959 (aarch64_sm3ss1qv4si): Ditto.
27960 (aarch64_sm3tt1aq4si): Ditto.
27961 (aarch64_sm3tt1bq4si): Ditto.
27962 (aarch64_sm3tt2aq4si): Ditto.
27963 (aarch64_sm3tt2bq4si): Ditto.
27964 (aarch64_sm3partw1qv4si): Ditto.
27965 (aarch64_sm3partw2qv4si): Ditto.
27966 (aarch64_sm4eqv4si): Ditto.
27967 (aarch64_sm4ekeyqv4si): Ditto.
27968 * config/aarch64/aarch64-simd.md:
27969 (aarch64_sm3ss1qv4si): Ditto.
27970 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27971 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27972 (aarch64_sm4eqv4si): Ditto.
27973 (aarch64_sm4ekeyqv4si): Ditto.
27974 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27975 (sm3part_op): Ditto.
27976 (CRYPTO_SM3TT): Ditto.
27977 (CRYPTO_SM3PART): Ditto.
27978 (UNSPEC_SM3SS1): New unspec.
27979 (UNSPEC_SM3TT1A): Ditto.
27980 (UNSPEC_SM3TT1B): Ditto.
27981 (UNSPEC_SM3TT2A): Ditto.
27982 (UNSPEC_SM3TT2B): Ditto.
27983 (UNSPEC_SM3PARTW1): Ditto.
27984 (UNSPEC_SM3PARTW2): Ditto.
27985 (UNSPEC_SM4E): Ditto.
27986 (UNSPEC_SM4EKEY): Ditto.
27987 * config/aarch64/constraints.md (Ui2): New constraint.
27988 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27989 * config/arm/types.md (crypto_sm3): New type attribute.
27990 (crypto_sm4): Ditto.
27991 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27992 (vsm3tt1aq_u32): Ditto.
27993 (vsm3tt1bq_u32): Ditto.
27994 (vsm3tt2aq_u32): Ditto.
27995 (vsm3tt2bq_u32): Ditto.
27996 (vsm3partw1q_u32): Ditto.
27997 (vsm3partw2q_u32): Ditto.
27998 (vsm4eq_u32): Ditto.
27999 (vsm4ekeyq_u32): Ditto.
28000 (doc/invoke.texi): Document new sm4 option.
28001
28002 2018-01-10 Michael Collison <michael.collison@arm.com>
28003
28004 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
28005 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
28006 (AARCH64_FL_FOR_ARCH8_4): New.
28007 (AARCH64_FL_V8_4): New flag.
28008 (doc/invoke.texi): Document new armv8.4-a option.
28009
28010 2018-01-10 Michael Collison <michael.collison@arm.com>
28011
28012 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28013 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
28014 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
28015 * config/aarch64/aarch64-option-extension.def: Add
28016 AARCH64_OPT_EXTENSION of 'sha2'.
28017 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
28018 (crypto): Disable sha2 and aes if crypto disabled.
28019 (crypto): Enable aes and sha2 if enabled.
28020 (simd): Disable sha2 and aes if simd disabled.
28021 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
28022 New flags.
28023 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
28024 (TARGET_SHA2): New feature flag for sha2.
28025 (TARGET_AES): New feature flag for aes.
28026 * config/aarch64/aarch64-simd.md:
28027 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
28028 conditional on TARGET_AES.
28029 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
28030 (aarch64_crypto_sha1hsi): Make pattern conditional
28031 on TARGET_SHA2.
28032 (aarch64_crypto_sha1hv4si): Ditto.
28033 (aarch64_be_crypto_sha1hv4si): Ditto.
28034 (aarch64_crypto_sha1su1v4si): Ditto.
28035 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
28036 (aarch64_crypto_sha1su0v4si): Ditto.
28037 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
28038 (aarch64_crypto_sha256su0v4si): Ditto.
28039 (aarch64_crypto_sha256su1v4si): Ditto.
28040 (doc/invoke.texi): Document new aes and sha2 options.
28041
28042 2018-01-10 Martin Sebor <msebor@redhat.com>
28043
28044 PR tree-optimization/83781
28045 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
28046 as string arrays.
28047
28048 2018-01-11 Martin Sebor <msebor@gmail.com>
28049 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28050
28051 PR tree-optimization/83501
28052 PR tree-optimization/81703
28053
28054 * tree-ssa-strlen.c (get_string_cst): Rename...
28055 (get_string_len): ...to this. Handle global constants.
28056 (handle_char_store): Adjust.
28057
28058 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
28059 Jim Wilson <jimw@sifive.com>
28060
28061 * config/riscv/riscv-protos.h (riscv_output_return): New.
28062 * config/riscv/riscv.c (struct machine_function): New naked_p field.
28063 (riscv_attribute_table, riscv_output_return),
28064 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
28065 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
28066 (riscv_compute_frame_info): Only compute frame->mask if not a naked
28067 function.
28068 (riscv_expand_prologue): Add early return for naked function.
28069 (riscv_expand_epilogue): Likewise.
28070 (riscv_function_ok_for_sibcall): Return false for naked function.
28071 (riscv_set_current_function): New.
28072 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
28073 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
28074 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
28075 * doc/extend.texi (RISC-V Function Attributes): New.
28076
28077 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
28078
28079 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
28080 check for 128-bit long double before checking TCmode.
28081 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
28082 128-bit long doubles before checking TFmode or TCmode.
28083 (FLOAT128_IBM_P): Likewise.
28084
28085 2018-01-10 Martin Sebor <msebor@redhat.com>
28086
28087 PR tree-optimization/83671
28088 * builtins.c (c_strlen): Unconditionally return zero for the empty
28089 string.
28090 Use -Warray-bounds for warnings.
28091 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
28092 for non-constant array indices with COMPONENT_REF, arrays of
28093 arrays, and pointers to arrays.
28094 (gimple_fold_builtin_strlen): Determine and set length range for
28095 non-constant character arrays.
28096
28097 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
28098
28099 PR middle-end/81897
28100 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
28101 empty blocks.
28102
28103 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
28104
28105 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
28106
28107 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28108
28109 PR target/83399
28110 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
28111 VECTOR_MEM_ALTIVEC_OR_VSX_P.
28112 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
28113 indexed_or_indirect_operand predicate.
28114 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
28115 (*vsx_le_perm_load_v8hi): Likewise.
28116 (*vsx_le_perm_load_v16qi): Likewise.
28117 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
28118 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
28119 (*vsx_le_perm_store_v8hi): Likewise.
28120 (*vsx_le_perm_store_v16qi): Likewise.
28121 (eight unnamed splitters): Likewise.
28122
28123 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28124
28125 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
28126 * config/rs6000/emmintrin.h: Likewise.
28127 * config/rs6000/mmintrin.h: Likewise.
28128 * config/rs6000/xmmintrin.h: Likewise.
28129
28130 2018-01-10 David Malcolm <dmalcolm@redhat.com>
28131
28132 PR c++/43486
28133 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
28134 "public_flag".
28135 * tree.c (tree_nop_conversion): Return true for location wrapper
28136 nodes.
28137 (maybe_wrap_with_location): New function.
28138 (selftest::check_strip_nops): New function.
28139 (selftest::test_location_wrappers): New function.
28140 (selftest::tree_c_tests): Call it.
28141 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
28142 (maybe_wrap_with_location): New decl.
28143 (EXPR_LOCATION_WRAPPER_P): New macro.
28144 (location_wrapper_p): New inline function.
28145 (tree_strip_any_location_wrapper): New inline function.
28146
28147 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
28148
28149 PR target/83735
28150 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
28151 stack_realign_offset for the largest alignment of stack slot
28152 actually used.
28153 (ix86_find_max_used_stack_alignment): New function.
28154 (ix86_finalize_stack_frame_flags): Use it. Set
28155 max_used_stack_alignment if we don't realign stack.
28156 * config/i386/i386.h (machine_function): Add
28157 max_used_stack_alignment.
28158
28159 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
28160
28161 * config/arm/arm.opt (-mbranch-cost): New option.
28162 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
28163 account.
28164
28165 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
28166
28167 PR target/83629
28168 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
28169 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
28170
28171 2018-01-10 Richard Biener <rguenther@suse.de>
28172
28173 PR debug/83765
28174 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
28175 early out so it also covers the case where we have a non-NULL
28176 origin.
28177
28178 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28179
28180 PR tree-optimization/83753
28181 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
28182 for non-strided grouped accesses if the number of elements is 1.
28183
28184 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28185
28186 PR target/81616
28187 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
28188 * i386.h (TARGET_USE_GATHER): Define.
28189 * x86-tune.def (X86_TUNE_USE_GATHER): New.
28190
28191 2018-01-10 Martin Liska <mliska@suse.cz>
28192
28193 PR bootstrap/82831
28194 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
28195 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
28196 partitioning.
28197 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
28198 CLEANUP_NO_PARTITIONING is not set.
28199
28200 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28201
28202 * doc/rtl.texi: Remove documentation of (const ...) wrappers
28203 for vectors, as a partial revert of r254296.
28204 * rtl.h (const_vec_p): Delete.
28205 (const_vec_duplicate_p): Don't test for vector CONSTs.
28206 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
28207 * expmed.c (make_tree): Likewise.
28208
28209 Revert:
28210 * common.md (E, F): Use CONSTANT_P instead of checking for
28211 CONST_VECTOR.
28212 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
28213 checking for CONST_VECTOR.
28214
28215 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28216
28217 PR middle-end/83575
28218 * predict.c (force_edge_cold): Handle in more sane way edges
28219 with no prediction.
28220
28221 2018-01-09 Carl Love <cel@us.ibm.com>
28222
28223 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
28224 V4SI, V4SF types.
28225 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
28226 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
28227 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
28228 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
28229 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
28230 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
28231 * config/rs6000/rs6000-protos.h: Add extern defition for
28232 rs6000_generate_float2_double_code.
28233 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
28234 function.
28235 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
28236 (float2_v2df): Add define_expand.
28237
28238 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
28239
28240 PR target/83628
28241 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28242 op_mode in the force_to_mode call.
28243
28244 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28245
28246 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28247 instead of checking each element individually.
28248 (aarch64_evpc_uzp): Likewise.
28249 (aarch64_evpc_zip): Likewise.
28250 (aarch64_evpc_ext): Likewise.
28251 (aarch64_evpc_rev): Likewise.
28252 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28253 instead of checking each element individually. Return true without
28254 generating rtl if
28255 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28256 whether all selected elements come from the same input, instead of
28257 checking each element individually. Remove calls to gen_rtx_REG,
28258 start_sequence and end_sequence and instead assert that no rtl is
28259 generated.
28260
28261 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28262
28263 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28264 order of HIGH and CONST checks.
28265
28266 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28267
28268 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28269 if the destination isn't an SSA_NAME.
28270
28271 2018-01-09 Richard Biener <rguenther@suse.de>
28272
28273 PR tree-optimization/83668
28274 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28275 move prologue...
28276 (canonicalize_loop_form): ... here, renamed from ...
28277 (canonicalize_loop_closed_ssa_form): ... this and amended to
28278 swap successor edges for loop exit blocks to make us use
28279 the RPO order we need for initial schedule generation.
28280
28281 2018-01-09 Joseph Myers <joseph@codesourcery.com>
28282
28283 PR tree-optimization/64811
28284 * match.pd: When optimizing comparisons with Inf, avoid
28285 introducing or losing exceptions from comparisons with NaN.
28286
28287 2018-01-09 Martin Liska <mliska@suse.cz>
28288
28289 PR sanitizer/82517
28290 * asan.c (shadow_mem_size): Add gcc_assert.
28291
28292 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
28293
28294 Don't save registers in main().
28295
28296 PR target/83738
28297 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28298 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28299 * config/avr/avr.c (avr_set_current_function): Don't error if
28300 naked, OS_task or OS_main are specified at the same time.
28301 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28302 OS_main.
28303 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28304 attribute.
28305 * common/config/avr/avr-common.c (avr_option_optimization_table):
28306 Switch on -mmain-is-OS_task for optimizing compilations.
28307
28308 2018-01-09 Richard Biener <rguenther@suse.de>
28309
28310 PR tree-optimization/83572
28311 * graphite.c: Include cfganal.h.
28312 (graphite_transform_loops): Connect infinite loops to exit
28313 and remove fake edges at the end.
28314
28315 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28316
28317 * ipa-inline.c (edge_badness): Revert accidental checkin.
28318
28319 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28320
28321 PR ipa/80763
28322 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28323 symbols; not inline clones.
28324
28325 2018-01-09 Jakub Jelinek <jakub@redhat.com>
28326
28327 PR target/83507
28328 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28329 hard registers. Formatting fixes.
28330
28331 PR preprocessor/83722
28332 * gcc.c (try_generate_repro): Pass
28333 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28334 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28335 do_report_bug.
28336
28337 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
28338 Kito Cheng <kito.cheng@gmail.com>
28339
28340 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28341 (riscv_leaf_function_p): Delete.
28342 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28343
28344 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28345
28346 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28347 function.
28348 (do_ifelse): New function.
28349 (do_isel): New function.
28350 (do_sub3): New function.
28351 (do_add3): New function.
28352 (do_load_mask_compare): New function.
28353 (do_overlap_load_compare): New function.
28354 (expand_compare_loop): New function.
28355 (expand_block_compare): Call expand_compare_loop() when appropriate.
28356 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28357 option description.
28358 (-mblock-compare-inline-loop-limit): New option.
28359
28360 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28361
28362 PR target/83677
28363 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28364 Reverse order of second and third operands in first alternative.
28365 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28366 of first and second elements in UNSPEC_VPERMR vector.
28367 (altivec_expand_vec_perm_le): Likewise.
28368
28369 2018-01-08 Jeff Law <law@redhat.com>
28370
28371 PR rtl-optimizatin/81308
28372 * tree-switch-conversion.c (cfg_altered): New file scoped static.
28373 (process_switch): If group_case_labels makes a change, then set
28374 cfg_altered.
28375 (pass_convert_switch::execute): If a switch is converted, then
28376 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
28377
28378 PR rtl-optimization/81308
28379 * recog.c (split_all_insns): Conditionally cleanup the CFG after
28380 splitting insns.
28381
28382 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
28383
28384 PR target/83663 - Revert r255946
28385 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28386 generation for cases where splatting a value is not useful.
28387 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28388 across a vec_duplicate and a paradoxical subreg forming a vector
28389 mode to a vec_concat.
28390
28391 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28392
28393 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28394 -march=armv8.3-a variants.
28395 * config/arm/t-multilib: Likewise.
28396 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
28397
28398 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28399
28400 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28401 to generate rtl.
28402 (cceq_ior_compare_complement): Give it a name so I can use it, and
28403 change boolean_or_operator predicate to boolean_operator so it can
28404 be used to generate a crand.
28405 (eqne): New code iterator.
28406 (bd/bd_neg): New code_attrs.
28407 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28408 a single define_insn.
28409 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28410 decrement (bdnzt/bdnzf/bdzt/bdzf).
28411 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28412 with the new names of the branch decrement patterns, and added the
28413 names of the branch decrement conditional patterns.
28414
28415 2018-01-08 Richard Biener <rguenther@suse.de>
28416
28417 PR tree-optimization/83563
28418 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28419 cache.
28420
28421 2018-01-08 Richard Biener <rguenther@suse.de>
28422
28423 PR middle-end/83713
28424 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28425
28426 2018-01-08 Richard Biener <rguenther@suse.de>
28427
28428 PR tree-optimization/83685
28429 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28430 references to abnormals.
28431
28432 2018-01-08 Richard Biener <rguenther@suse.de>
28433
28434 PR lto/83719
28435 * dwarf2out.c (output_indirect_strings): Handle empty
28436 skeleton_debug_str_hash.
28437 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28438
28439 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28440
28441 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28442 (emit_store_direct): Likewise.
28443 (arc_trampoline_adjust_address): Likewise.
28444 (arc_asm_trampoline_template): New function.
28445 (arc_initialize_trampoline): Use asm_trampoline_template.
28446 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28447 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28448 * config/arc/arc.md (flush_icache): Delete pattern.
28449
28450 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28451
28452 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28453 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28454 munaligned-access.
28455
28456 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28457
28458 PR target/83681
28459 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28460 by not USED_FOR_TARGET.
28461 (make_pass_resolve_sw_modes): Likewise.
28462
28463 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28464
28465 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28466 USED_FOR_TARGET.
28467
28468 2018-01-08 Richard Biener <rguenther@suse.de>
28469
28470 PR middle-end/83580
28471 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28472
28473 2018-01-08 Richard Biener <rguenther@suse.de>
28474
28475 PR middle-end/83517
28476 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28477
28478 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28479
28480 PR middle-end/81897
28481 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28482 basic blocks with a small number of successors.
28483 (convert_control_dep_chain_into_preds): Improve handling of
28484 forwarder blocks.
28485 (dump_predicates): Split apart into...
28486 (dump_pred_chain): ...here...
28487 (dump_pred_info): ...and here.
28488 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28489 (can_chain_union_be_invalidated_p): Improve check for invalidation
28490 of paths.
28491 (uninit_uses_cannot_happen): Avoid unnecessary if
28492 convert_control_dep_chain_into_preds yielded nothing.
28493
28494 2018-01-06 Martin Sebor <msebor@redhat.com>
28495
28496 PR tree-optimization/83640
28497 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28498 subtracting negative offset from size.
28499 (builtin_access::overlap): Adjust offset bounds of the access to fall
28500 within the size of the object if possible.
28501
28502 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28503
28504 PR rtl-optimization/83699
28505 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28506 extract_bit_field_as_subreg to cases in which the extracted
28507 value is also a vector.
28508
28509 * lra-constraints.c (process_alt_operands): Test for the equivalence
28510 substitutions when detecting a possible reload cycle.
28511
28512 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28513
28514 PR debug/83480
28515 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28516 by default if flag_selective_schedling{,2}. Formatting fixes.
28517
28518 PR rtl-optimization/83682
28519 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28520 if it has non-VECTOR_MODE element mode.
28521 (vec_duplicate_p): Likewise.
28522
28523 PR middle-end/83694
28524 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28525 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28526
28527 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28528
28529 PR target/83604
28530 * config/i386/i386-builtin.def
28531 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28532 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28533 Require also OPTION_MASK_ISA_AVX512F in addition to
28534 OPTION_MASK_ISA_GFNI.
28535 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28536 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28537 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28538 to OPTION_MASK_ISA_GFNI.
28539 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28540 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28541 OPTION_MASK_ISA_AVX512BW.
28542 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28543 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28544 addition to OPTION_MASK_ISA_GFNI.
28545 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28546 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28547 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28548 to OPTION_MASK_ISA_GFNI.
28549 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28550 a requirement for all ISAs rather than any of them with a few
28551 exceptions.
28552 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28553 processing.
28554 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28555 bitmasks to be enabled with 3 exceptions, instead of requiring any
28556 enabled ISA with lots of exceptions.
28557 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28558 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28559 Change avx512bw in isa attribute to avx512f.
28560 * config/i386/sgxintrin.h: Add license boilerplate.
28561 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28562 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28563 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28564 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28565 defined.
28566 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28567 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28568 temporarily sse2 rather than sse if not enabled already.
28569
28570 PR target/83604
28571 * config/i386/sse.md (VI248_VLBW): Rename to ...
28572 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28573 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28574 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28575 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28576 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28577 mode iterator instead of VI248_VLBW.
28578
28579 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28580
28581 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28582 (record_modified): Skip clobbers; add debug output.
28583 (param_change_prob): Use sreal frequencies.
28584
28585 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28586
28587 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28588 punt for user-aligned variables.
28589
28590 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28591
28592 * tree-chrec.c (chrec_contains_symbols): Return true for
28593 POLY_INT_CST.
28594
28595 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28596
28597 PR target/82439
28598 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28599 of (x|y) == x for BICS pattern.
28600
28601 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28602
28603 PR tree-optimization/83605
28604 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28605 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28606 can throw.
28607
28608 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28609
28610 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28611 * config/epiphany/rtems.h: New file.
28612
28613 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28614 Uros Bizjak <ubizjak@gmail.com>
28615
28616 PR target/83554
28617 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28618 QIreg_operand instead of register_operand predicate.
28619 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28620 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28621 comments instead of -fmitigate[-_]rop.
28622
28623 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28624
28625 PR bootstrap/81926
28626 * cgraphunit.c (symbol_table::compile): Switch to text_section
28627 before calling assembly_start debug hook.
28628 * run-rtl-passes.c (run_rtl_passes): Likewise.
28629 Include output.h.
28630
28631 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28632
28633 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28634 range_int_cst_p rather than !symbolic_range_p before calling
28635 extract_range_from_multiplicative_op_1.
28636
28637 2018-01-04 Jeff Law <law@redhat.com>
28638
28639 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28640 redundant test in assertion.
28641
28642 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28643
28644 * doc/rtl.texi: Document machine_mode wrapper classes.
28645
28646 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28647
28648 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28649 using tree_to_uhwi.
28650
28651 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28652
28653 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28654 the VEC_PERM_EXPR fold to fail.
28655
28656 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28657
28658 PR debug/83585
28659 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28660 to switched_sections.
28661
28662 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28663
28664 PR target/83680
28665 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28666 test for d.testing.
28667
28668 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28669
28670 PR target/83387
28671 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28672 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28673
28674 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28675
28676 PR debug/83666
28677 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28678 is BLKmode and bitpos not zero or mode change is needed.
28679
28680 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28681
28682 PR target/83675
28683 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28684 TARGET_VIS2.
28685
28686 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28687
28688 PR target/83628
28689 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28690 instead of MULT rtx. Update all corresponding splitters.
28691 (*saddl_se): Ditto.
28692 (*ssub<modesuffix>): Ditto.
28693 (*ssubl_se): Ditto.
28694 (*cmp_sadd_di): Update split patterns.
28695 (*cmp_sadd_si): Ditto.
28696 (*cmp_sadd_sidi): Ditto.
28697 (*cmp_ssub_di): Ditto.
28698 (*cmp_ssub_si): Ditto.
28699 (*cmp_ssub_sidi): Ditto.
28700 * config/alpha/predicates.md (const23_operand): New predicate.
28701 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28702 Look for ASHIFT, not MULT inner operand.
28703 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28704
28705 2018-01-04 Martin Liska <mliska@suse.cz>
28706
28707 PR gcov-profile/83669
28708 * gcov.c (output_intermediate_file): Add version to intermediate
28709 gcov file.
28710 * doc/gcov.texi: Document new field 'version' in intermediate
28711 file format. Fix location of '-k' option of gcov command.
28712
28713 2018-01-04 Martin Liska <mliska@suse.cz>
28714
28715 PR ipa/82352
28716 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28717
28718 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28719
28720 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28721
28722 2018-01-03 Martin Sebor <msebor@redhat.com>
28723
28724 PR tree-optimization/83655
28725 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28726 checking calls with invalid arguments.
28727
28728 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28729
28730 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28731 (vectorizable_mask_load_store): Delete.
28732 (vectorizable_call): Return false for masked loads and stores.
28733 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28734 instead of gimple_assign_rhs1.
28735 (vectorizable_load): Handle IFN_MASK_LOAD.
28736 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28737
28738 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28739
28740 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28741 split out from..,
28742 (vectorizable_mask_load_store): ...here.
28743 (vectorizable_load): ...and here.
28744
28745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28746
28747 * tree-vect-stmts.c (vect_build_all_ones_mask)
28748 (vect_build_zero_merge_argument): New functions, split out from...
28749 (vectorizable_load): ...here.
28750
28751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28752
28753 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28754 split out from...
28755 (vectorizable_mask_load_store): ...here.
28756 (vectorizable_store): ...and here.
28757
28758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28759
28760 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28761 split out from...
28762 (vectorizable_mask_load_store): ...here.
28763
28764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28765
28766 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28767 (vect_model_store_cost): Take a vec_load_store_type instead of a
28768 vect_def_type.
28769 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28770 (vect_model_store_cost): Take a vec_load_store_type instead of a
28771 vect_def_type.
28772 (vectorizable_mask_load_store): Update accordingly.
28773 (vectorizable_store): Likewise.
28774 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28775
28776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28777
28778 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28779 IFN_MASK_LOAD calls here rather than...
28780 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28781
28782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28783 Alan Hayward <alan.hayward@arm.com>
28784 David Sherwood <david.sherwood@arm.com>
28785
28786 * expmed.c (extract_bit_field_1): For vector extracts,
28787 fall back to extract_bit_field_as_subreg if vec_extract
28788 isn't available.
28789
28790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28791 Alan Hayward <alan.hayward@arm.com>
28792 David Sherwood <david.sherwood@arm.com>
28793
28794 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28795 they are variable or constant sized.
28796 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28797 slots for constant-sized data.
28798
28799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28800 Alan Hayward <alan.hayward@arm.com>
28801 David Sherwood <david.sherwood@arm.com>
28802
28803 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28804 handling COND_EXPRs with boolean comparisons, try to find a better
28805 basis for the mask type than the boolean itself.
28806
28807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28808
28809 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28810 is calculated and how it can be overridden.
28811 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28812 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28813 if defined.
28814 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28815 if nonzero.
28816
28817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28818 Alan Hayward <alan.hayward@arm.com>
28819 David Sherwood <david.sherwood@arm.com>
28820
28821 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28822 Remove the mode argument.
28823 (aarch64_simd_valid_immediate): Remove the mode and inverse
28824 arguments.
28825 * config/aarch64/iterators.md (bitsize): New iterator.
28826 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28827 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28828 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28829 aarch64_simd_valid_immediate.
28830 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28831 (aarch64_reg_or_bic_imm): Likewise.
28832 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28833 with an insn_type enum and msl with a modifier_type enum.
28834 Replace element_width with a scalar_mode. Change the shift
28835 to unsigned int. Add constructors for scalar_float_mode and
28836 scalar_int_mode elements.
28837 (aarch64_vect_float_const_representable_p): Delete.
28838 (aarch64_can_const_movi_rtx_p)
28839 (aarch64_simd_scalar_immediate_valid_for_move)
28840 (aarch64_simd_make_constant): Update call to
28841 aarch64_simd_valid_immediate.
28842 (aarch64_advsimd_valid_immediate_hs): New function.
28843 (aarch64_advsimd_valid_immediate): Likewise.
28844 (aarch64_simd_valid_immediate): Remove mode and inverse
28845 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28846 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28847 and aarch64_float_const_representable_p on the result.
28848 (aarch64_output_simd_mov_immediate): Remove mode argument.
28849 Update call to aarch64_simd_valid_immediate and use of
28850 simd_immediate_info.
28851 (aarch64_output_scalar_simd_mov_immediate): Update call
28852 accordingly.
28853
28854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28855 Alan Hayward <alan.hayward@arm.com>
28856 David Sherwood <david.sherwood@arm.com>
28857
28858 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28859 (mode_nunits): Likewise CONST_MODE_NUNITS.
28860 * machmode.def (ADJUST_NUNITS): Document.
28861 * genmodes.c (mode_data::need_nunits_adj): New field.
28862 (blank_mode): Update accordingly.
28863 (adj_nunits): New variable.
28864 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28865 parameter.
28866 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28867 listed in adj_nunits.
28868 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28869 listed in adj_nunits. Don't emit case statements for such modes.
28870 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28871 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28872 nothing if adj_nunits is nonnull.
28873 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28874 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28875 (emit_mode_fbit): Update use of print_maybe_const_decl.
28876 (emit_move_size): Likewise. Treat the array as non-const
28877 if adj_nunits.
28878 (emit_mode_adjustments): Handle adj_nunits.
28879
28880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28881
28882 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28883 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28884 (VECTOR_MODES): Use it.
28885 (make_vector_modes): Take the prefix as an argument.
28886
28887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28888 Alan Hayward <alan.hayward@arm.com>
28889 David Sherwood <david.sherwood@arm.com>
28890
28891 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28892 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28893 for MODE_VECTOR_BOOL.
28894 * machmode.def (VECTOR_BOOL_MODE): Document.
28895 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28896 (make_vector_bool_mode): New function.
28897 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28898 MODE_VECTOR_BOOL.
28899 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28900 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28901 Likewise.
28902 * stor-layout.c (int_mode_for_mode): Likewise.
28903 * tree.c (build_vector_type_for_mode): Likewise.
28904 * varasm.c (output_constant_pool_2): Likewise.
28905 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28906 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28907 for MODE_VECTOR_BOOL.
28908 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28909 of mode class checks.
28910 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28911 instead of a list of mode class checks.
28912 (expand_vector_scalar_condition): Likewise.
28913 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28914
28915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28916 Alan Hayward <alan.hayward@arm.com>
28917 David Sherwood <david.sherwood@arm.com>
28918
28919 * machmode.h (mode_size): Change from unsigned short to
28920 poly_uint16_pod.
28921 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28922 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28923 or if measurement_type is not polynomial.
28924 (fixed_size_mode::includes_p): Check for constant-sized modes.
28925 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28926 return a poly_uint16 rather than an unsigned short.
28927 (emit_mode_size): Change the type of mode_size from unsigned short
28928 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28929 (emit_mode_adjustments): Cope with polynomial vector sizes.
28930 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28931 for GET_MODE_SIZE.
28932 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28933 for GET_MODE_SIZE.
28934 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28935 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28936 * caller-save.c (setup_save_areas): Likewise.
28937 (replace_reg_with_saved_mem): Likewise.
28938 * calls.c (emit_library_call_value_1): Likewise.
28939 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28940 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28941 (gen_lowpart_for_combine): Likewise.
28942 * convert.c (convert_to_integer_1): Likewise.
28943 * cse.c (equiv_constant, cse_insn): Likewise.
28944 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28945 (cselib_subst_to_values): Likewise.
28946 * dce.c (word_dce_process_block): Likewise.
28947 * df-problems.c (df_word_lr_mark_ref): Likewise.
28948 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28949 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28950 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28951 (rtl_for_decl_location): Likewise.
28952 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28953 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28954 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28955 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28956 (expand_expr_real_1): Likewise.
28957 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28958 (pad_below): Likewise.
28959 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28960 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28961 * ira.c (get_subreg_tracking_sizes): Likewise.
28962 * ira-build.c (ira_create_allocno_objects): Likewise.
28963 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28964 (ira_sort_regnos_for_alter_reg): Likewise.
28965 * ira-costs.c (record_operand_costs): Likewise.
28966 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28967 (resolve_simple_move): Likewise.
28968 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28969 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28970 (lra_constraints): Likewise.
28971 (CONST_POOL_OK_P): Reject variable-sized modes.
28972 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28973 (add_pseudo_to_slot, lra_spill): Likewise.
28974 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28975 * optabs-query.c (get_best_extraction_insn): Likewise.
28976 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28977 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28978 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28979 * recog.c (offsettable_address_addr_space_p): Likewise.
28980 * regcprop.c (maybe_mode_change): Likewise.
28981 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28982 * regrename.c (build_def_use): Likewise.
28983 * regstat.c (dump_reg_info): Likewise.
28984 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28985 (find_reloads, find_reloads_subreg_address): Likewise.
28986 * reload1.c (eliminate_regs_1): Likewise.
28987 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28988 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28989 (simplify_binary_operation_1, simplify_subreg): Likewise.
28990 * targhooks.c (default_function_arg_padding): Likewise.
28991 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28992 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28993 (verify_gimple_assign_ternary): Likewise.
28994 * tree-inline.c (estimate_move_cost): Likewise.
28995 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28996 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28997 (get_address_cost_ainc): Likewise.
28998 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28999 (vect_supportable_dr_alignment): Likewise.
29000 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29001 (vectorizable_reduction): Likewise.
29002 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
29003 (vectorizable_operation, vectorizable_load): Likewise.
29004 * tree.c (build_same_sized_truth_vector_type): Likewise.
29005 * valtrack.c (cleanup_auto_inc_dec): Likewise.
29006 * var-tracking.c (emit_note_insn_var_location): Likewise.
29007 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
29008 (ADDR_VEC_ALIGN): Likewise.
29009
29010 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29011 Alan Hayward <alan.hayward@arm.com>
29012 David Sherwood <david.sherwood@arm.com>
29013
29014 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
29015 unsigned short.
29016 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29017 or if measurement_type is polynomial.
29018 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
29019 * combine.c (make_extraction): Likewise.
29020 * dse.c (find_shift_sequence): Likewise.
29021 * dwarf2out.c (mem_loc_descriptor): Likewise.
29022 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
29023 (extract_bit_field, extract_low_bits): Likewise.
29024 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
29025 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
29026 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
29027 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
29028 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29029 * reload.c (find_reloads): Likewise.
29030 * reload1.c (alter_reg): Likewise.
29031 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
29032 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
29033 * tree-if-conv.c (predicate_mem_writes): Likewise.
29034 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
29035 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
29036 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
29037 * valtrack.c (dead_debug_insert_temp): Likewise.
29038 * varasm.c (mergeable_constant_section): Likewise.
29039 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
29040
29041 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29042 Alan Hayward <alan.hayward@arm.com>
29043 David Sherwood <david.sherwood@arm.com>
29044
29045 * expr.c (expand_assignment): Cope with polynomial mode sizes
29046 when assigning to a CONCAT.
29047
29048 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29049 Alan Hayward <alan.hayward@arm.com>
29050 David Sherwood <david.sherwood@arm.com>
29051
29052 * machmode.h (mode_precision): Change from unsigned short to
29053 poly_uint16_pod.
29054 (mode_to_precision): Return a poly_uint16 rather than an unsigned
29055 short.
29056 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
29057 or if measurement_type is not polynomial.
29058 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
29059 in which the mode is already known to be a scalar_int_mode.
29060 * genmodes.c (emit_mode_precision): Change the type of mode_precision
29061 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
29062 initializer.
29063 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29064 for GET_MODE_PRECISION.
29065 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29066 for GET_MODE_PRECISION.
29067 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
29068 as polynomial.
29069 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
29070 (expand_field_assignment, make_extraction): Likewise.
29071 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
29072 (get_last_value): Likewise.
29073 * convert.c (convert_to_integer_1): Likewise.
29074 * cse.c (cse_insn): Likewise.
29075 * expr.c (expand_expr_real_1): Likewise.
29076 * lra-constraints.c (simplify_operand_subreg): Likewise.
29077 * optabs-query.c (can_atomic_load_p): Likewise.
29078 * optabs.c (expand_atomic_load): Likewise.
29079 (expand_atomic_store): Likewise.
29080 * ree.c (combine_reaching_defs): Likewise.
29081 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
29082 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
29083 * tree.h (type_has_mode_precision_p): Likewise.
29084 * ubsan.c (instrument_si_overflow): Likewise.
29085
29086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29087 Alan Hayward <alan.hayward@arm.com>
29088 David Sherwood <david.sherwood@arm.com>
29089
29090 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
29091 polynomial numbers of units.
29092 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
29093 (valid_vector_subparts_p): New function.
29094 (build_vector_type): Remove temporary shim and take the number
29095 of units as a poly_uint64 rather than an int.
29096 (build_opaque_vector_type): Take the number of units as a
29097 poly_uint64 rather than an int.
29098 * tree.c (build_vector_from_ctor): Handle polynomial
29099 TYPE_VECTOR_SUBPARTS.
29100 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
29101 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
29102 (build_vector_from_val): If the number of units is variable,
29103 use build_vec_duplicate_cst for constant operands and
29104 VEC_DUPLICATE_EXPR otherwise.
29105 (make_vector_type): Remove temporary is_constant ().
29106 (build_vector_type, build_opaque_vector_type): Take the number of
29107 units as a poly_uint64 rather than an int.
29108 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
29109 VECTOR_CST_NELTS.
29110 * cfgexpand.c (expand_debug_expr): Likewise.
29111 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
29112 (store_constructor, expand_expr_real_1): Likewise.
29113 (const_scalar_mask_from_tree): Likewise.
29114 * fold-const-call.c (fold_const_reduction): Likewise.
29115 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
29116 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
29117 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
29118 (fold_relational_const): Likewise.
29119 (native_interpret_vector): Likewise. Change the size from an
29120 int to an unsigned int.
29121 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
29122 TYPE_VECTOR_SUBPARTS.
29123 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
29124 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
29125 duplicating a non-constant operand into a variable-length vector.
29126 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
29127 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
29128 * ipa-icf.c (sem_variable::equals): Likewise.
29129 * match.pd: Likewise.
29130 * omp-simd-clone.c (simd_clone_subparts): Likewise.
29131 * print-tree.c (print_node): Likewise.
29132 * stor-layout.c (layout_type): Likewise.
29133 * targhooks.c (default_builtin_vectorization_cost): Likewise.
29134 * tree-cfg.c (verify_gimple_comparison): Likewise.
29135 (verify_gimple_assign_binary): Likewise.
29136 (verify_gimple_assign_ternary): Likewise.
29137 (verify_gimple_assign_single): Likewise.
29138 * tree-pretty-print.c (dump_generic_node): Likewise.
29139 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29140 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
29141 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
29142 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
29143 (vect_shift_permute_load_chain): Likewise.
29144 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
29145 (expand_vector_condition, optimize_vector_constructor): Likewise.
29146 (lower_vec_perm, get_compute_type): Likewise.
29147 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29148 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
29149 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
29150 (vect_recog_mask_conversion_pattern): Likewise.
29151 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
29152 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
29153 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29154 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
29155 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
29156 (vectorizable_shift, vectorizable_operation, vectorizable_store)
29157 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
29158 (supportable_widening_operation): Likewise.
29159 (supportable_narrowing_operation): Likewise.
29160 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
29161 Likewise.
29162 * varasm.c (output_constant): Likewise.
29163
29164 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29165 Alan Hayward <alan.hayward@arm.com>
29166 David Sherwood <david.sherwood@arm.com>
29167
29168 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
29169 so that both the length == 3 and length != 3 cases set up their
29170 own permute vectors. Add comments explaining why we know the
29171 number of elements is constant.
29172 (vect_permute_load_chain): Likewise.
29173
29174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29175 Alan Hayward <alan.hayward@arm.com>
29176 David Sherwood <david.sherwood@arm.com>
29177
29178 * machmode.h (mode_nunits): Change from unsigned char to
29179 poly_uint16_pod.
29180 (ONLY_FIXED_SIZE_MODES): New macro.
29181 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
29182 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
29183 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
29184 New typedefs.
29185 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
29186 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
29187 or if measurement_type is not polynomial.
29188 * genmodes.c (ZERO_COEFFS): New macro.
29189 (emit_mode_nunits_inline): Make mode_nunits_inline return a
29190 poly_uint16.
29191 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
29192 Use ZERO_COEFFS when emitting initializers.
29193 * data-streamer.h (bp_pack_poly_value): New function.
29194 (bp_unpack_poly_value): Likewise.
29195 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29196 for GET_MODE_NUNITS.
29197 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29198 for GET_MODE_NUNITS.
29199 * tree.c (make_vector_type): Remove temporary shim and make
29200 the real function take the number of units as a poly_uint64
29201 rather than an int.
29202 (build_vector_type_for_mode): Handle polynomial nunits.
29203 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
29204 * emit-rtl.c (const_vec_series_p_1): Likewise.
29205 (gen_rtx_CONST_VECTOR): Likewise.
29206 * fold-const.c (test_vec_duplicate_folding): Likewise.
29207 * genrecog.c (validate_pattern): Likewise.
29208 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
29209 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29210 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
29211 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
29212 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
29213 * rtlanal.c (subreg_get_info): Likewise.
29214 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29215 (vect_grouped_load_supported): Likewise.
29216 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
29217 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
29218 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
29219 (simplify_const_unary_operation, simplify_binary_operation_1)
29220 (simplify_const_binary_operation, simplify_ternary_operation)
29221 (test_vector_ops_duplicate, test_vector_ops): Likewise.
29222 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
29223 instead of CONST_VECTOR_NUNITS.
29224 * varasm.c (output_constant_pool_2): Likewise.
29225 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
29226 explicit-encoded elements in the XVEC for variable-length vectors.
29227
29228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29229
29230 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
29231
29232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29233 Alan Hayward <alan.hayward@arm.com>
29234 David Sherwood <david.sherwood@arm.com>
29235
29236 * coretypes.h (fixed_size_mode): Declare.
29237 (fixed_size_mode_pod): New typedef.
29238 * builtins.h (target_builtins::x_apply_args_mode)
29239 (target_builtins::x_apply_result_mode): Change type to
29240 fixed_size_mode_pod.
29241 * builtins.c (apply_args_size, apply_result_size, result_vector)
29242 (expand_builtin_apply_args_1, expand_builtin_apply)
29243 (expand_builtin_return): Update accordingly.
29244
29245 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29246
29247 * cse.c (hash_rtx_cb): Hash only the encoded elements.
29248 * cselib.c (cselib_hash_rtx): Likewise.
29249 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29250 CONST_VECTOR encoding.
29251
29252 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29253 Jeff Law <law@redhat.com>
29254
29255 PR target/83641
29256 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29257 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29258 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29259 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29260
29261 PR target/83641
29262 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29263 explicitly probe *sp in a noreturn function if there were any callee
29264 register saves or frame pointer is needed.
29265
29266 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29267
29268 PR debug/83621
29269 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29270 BLKmode for ternary, binary or unary expressions.
29271
29272 PR debug/83645
29273 * var-tracking.c (delete_vta_debug_insn): New inline function.
29274 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29275 insns from get_insns () to NULL instead of each bb separately.
29276 Use delete_vta_debug_insn. No longer static.
29277 (vt_debug_insns_local, variable_tracking_main_1): Adjust
29278 delete_vta_debug_insns callers.
29279 * rtl.h (delete_vta_debug_insns): Declare.
29280 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29281 instead of variable_tracking_main.
29282
29283 2018-01-03 Martin Sebor <msebor@redhat.com>
29284
29285 PR tree-optimization/83603
29286 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29287 arguments past the endof the argument list in functions declared
29288 without a prototype.
29289 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29290 Avoid checking when arguments are null.
29291
29292 2018-01-03 Martin Sebor <msebor@redhat.com>
29293
29294 PR c/83559
29295 * doc/extend.texi (attribute const): Fix a typo.
29296 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29297 issuing -Wsuggest-attribute for void functions.
29298
29299 2018-01-03 Martin Sebor <msebor@redhat.com>
29300
29301 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29302 offset_int::from instead of wide_int::to_shwi.
29303 (maybe_diag_overlap): Remove assertion.
29304 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29305 * gimple-ssa-sprintf.c (format_directive): Same.
29306 (parse_directive): Same.
29307 (sprintf_dom_walker::compute_format_length): Same.
29308 (try_substitute_return_value): Same.
29309
29310 2018-01-03 Jeff Law <law@redhat.com>
29311
29312 PR middle-end/83654
29313 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29314 non-constant residual for zero at runtime and avoid probing in
29315 that case. Reorganize code for trailing problem to mirror handling
29316 of the residual.
29317
29318 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29319
29320 PR tree-optimization/83501
29321 * tree-ssa-strlen.c (get_string_cst): New.
29322 (handle_char_store): Call get_string_cst.
29323
29324 2018-01-03 Martin Liska <mliska@suse.cz>
29325
29326 PR tree-optimization/83593
29327 * tree-ssa-strlen.c: Include tree-cfg.h.
29328 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29329 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29330 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29331 to false.
29332 (strlen_dom_walker::before_dom_children): Call
29333 gimple_purge_dead_eh_edges. Dump tranformation with details
29334 dump flags.
29335 (strlen_dom_walker::before_dom_children): Update call by adding
29336 new argument cleanup_eh.
29337 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29338
29339 2018-01-03 Martin Liska <mliska@suse.cz>
29340
29341 PR ipa/83549
29342 * cif-code.def (VARIADIC_THUNK): New enum value.
29343 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29344 thunks.
29345
29346 2018-01-03 Jan Beulich <jbeulich@suse.com>
29347
29348 * sse.md (mov<mode>_internal): Tighten condition for when to use
29349 vmovdqu<ssescalarsize> for TI and OI modes.
29350
29351 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29352
29353 Update copyright years.
29354
29355 2018-01-03 Martin Liska <mliska@suse.cz>
29356
29357 PR ipa/83594
29358 * ipa-visibility.c (function_and_variable_visibility): Skip
29359 functions with noipa attribure.
29360
29361 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29362
29363 * gcc.c (process_command): Update copyright notice dates.
29364 * gcov-dump.c (print_version): Ditto.
29365 * gcov.c (print_version): Ditto.
29366 * gcov-tool.c (print_version): Ditto.
29367 * gengtype.c (create_file): Ditto.
29368 * doc/cpp.texi: Bump @copying's copyright year.
29369 * doc/cppinternals.texi: Ditto.
29370 * doc/gcc.texi: Ditto.
29371 * doc/gccint.texi: Ditto.
29372 * doc/gcov.texi: Ditto.
29373 * doc/install.texi: Ditto.
29374 * doc/invoke.texi: Ditto.
29375
29376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29377
29378 * vector-builder.h (vector_builder::m_full_nelts): Change from
29379 unsigned int to poly_uint64.
29380 (vector_builder::full_nelts): Update prototype accordingly.
29381 (vector_builder::new_vector): Likewise.
29382 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29383 (vector_builder::operator ==): Likewise.
29384 (vector_builder::finalize): Likewise.
29385 * int-vector-builder.h (int_vector_builder::int_vector_builder):
29386 Take the number of elements as a poly_uint64 rather than an
29387 unsigned int.
29388 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29389 from unsigned int to poly_uint64.
29390 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29391 (vec_perm_indices::new_vector): Likewise.
29392 (vec_perm_indices::length): Likewise.
29393 (vec_perm_indices::nelts_per_input): Likewise.
29394 (vec_perm_indices::input_nelts): Likewise.
29395 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29396 number of elements per input as a poly_uint64 rather than an
29397 unsigned int. Use the original encoding for variable-length
29398 vectors, rather than clamping each individual element.
29399 For the second and subsequent elements in each pattern,
29400 clamp the step and base before clamping their sum.
29401 (vec_perm_indices::series_p): Handle polynomial element counts.
29402 (vec_perm_indices::all_in_range_p): Likewise.
29403 (vec_perm_indices_to_tree): Likewise.
29404 (vec_perm_indices_to_rtx): Likewise.
29405 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29406 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29407 (tree_vector_builder::new_binary_operation): Handle polynomial
29408 element counts. Return false if we need to know the number
29409 of elements at compile time.
29410 * fold-const.c (fold_vec_perm): Punt if the number of elements
29411 isn't known at compile time.
29412
29413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29414
29415 * vec-perm-indices.h (vec_perm_builder): Change element type
29416 from HOST_WIDE_INT to poly_int64.
29417 (vec_perm_indices::element_type): Update accordingly.
29418 (vec_perm_indices::clamp): Handle polynomial element_types.
29419 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29420 (vec_perm_indices::all_in_range_p): Likewise.
29421 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29422 than shwi trees.
29423 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29424 polynomial vec_perm_indices element types.
29425 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29426 * fold-const.c (fold_vec_perm): Likewise.
29427 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29428 * tree-vect-generic.c (lower_vec_perm): Likewise.
29429 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29430 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29431 element type to HOST_WIDE_INT.
29432
29433 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29434 Alan Hayward <alan.hayward@arm.com>
29435 David Sherwood <david.sherwood@arm.com>
29436
29437 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29438 rather than an int. Use plus_constant.
29439 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29440 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29441
29442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29443 Alan Hayward <alan.hayward@arm.com>
29444 David Sherwood <david.sherwood@arm.com>
29445
29446 * calls.c (emit_call_1, expand_call): Change struct_value_size from
29447 a HOST_WIDE_INT to a poly_int64.
29448
29449 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29450 Alan Hayward <alan.hayward@arm.com>
29451 David Sherwood <david.sherwood@arm.com>
29452
29453 * calls.c (load_register_parameters): Cope with polynomial
29454 mode sizes. Require a constant size for BLKmode parameters
29455 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29456 forces a parameter to be padded at the lsb end in order to
29457 fill a complete number of words, require the parameter size
29458 to be ordered wrt UNITS_PER_WORD.
29459
29460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29461 Alan Hayward <alan.hayward@arm.com>
29462 David Sherwood <david.sherwood@arm.com>
29463
29464 * reload1.c (spill_stack_slot_width): Change element type
29465 from unsigned int to poly_uint64_pod.
29466 (alter_reg): Treat mode sizes as polynomial.
29467
29468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29469 Alan Hayward <alan.hayward@arm.com>
29470 David Sherwood <david.sherwood@arm.com>
29471
29472 * reload.c (complex_word_subreg_p): New function.
29473 (reload_inner_reg_of_subreg, push_reload): Use it.
29474
29475 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29476 Alan Hayward <alan.hayward@arm.com>
29477 David Sherwood <david.sherwood@arm.com>
29478
29479 * lra-constraints.c (process_alt_operands): Reject matched
29480 operands whose sizes aren't ordered.
29481 (match_reload): Refer to this check here.
29482
29483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29484 Alan Hayward <alan.hayward@arm.com>
29485 David Sherwood <david.sherwood@arm.com>
29486
29487 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29488 that the mode size is in the set {1, 2, 4, 8, 16}.
29489
29490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29491 Alan Hayward <alan.hayward@arm.com>
29492 David Sherwood <david.sherwood@arm.com>
29493
29494 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29495 Use plus_constant instead of gen_rtx_PLUS.
29496
29497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29498 Alan Hayward <alan.hayward@arm.com>
29499 David Sherwood <david.sherwood@arm.com>
29500
29501 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29502 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29503 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29504 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29505 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29506 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29507 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29508 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29509 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29510 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29511 a poly_int64.
29512 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29513 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29514 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29515 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29516 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29517 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29518 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29519 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29520 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29521 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29522 function.
29523 * expr.c (emit_move_resolve_push): Treat the input and result
29524 of PUSH_ROUNDING as a poly_int64.
29525 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29526 (emit_push_insn): Likewise.
29527 * lra-eliminations.c (mark_not_eliminable): Likewise.
29528 * recog.c (push_operand): Likewise.
29529 * reload1.c (elimination_effects): Likewise.
29530 * rtlanal.c (nonzero_bits1): Likewise.
29531 * calls.c (store_one_arg): Likewise. Require the padding to be
29532 known at compile time.
29533
29534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29535 Alan Hayward <alan.hayward@arm.com>
29536 David Sherwood <david.sherwood@arm.com>
29537
29538 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29539 Use plus_constant instead of gen_rtx_PLUS.
29540
29541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29542 Alan Hayward <alan.hayward@arm.com>
29543 David Sherwood <david.sherwood@arm.com>
29544
29545 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29546 rather than an int.
29547
29548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29549 Alan Hayward <alan.hayward@arm.com>
29550 David Sherwood <david.sherwood@arm.com>
29551
29552 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29553 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29554 via stack temporaries. Treat the mode size as polynomial too.
29555
29556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29557 Alan Hayward <alan.hayward@arm.com>
29558 David Sherwood <david.sherwood@arm.com>
29559
29560 * expr.c (expand_expr_real_2): When handling conversions involving
29561 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29562 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29563 as a poly_uint64 too.
29564
29565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29566 Alan Hayward <alan.hayward@arm.com>
29567 David Sherwood <david.sherwood@arm.com>
29568
29569 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29570
29571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29572 Alan Hayward <alan.hayward@arm.com>
29573 David Sherwood <david.sherwood@arm.com>
29574
29575 * combine.c (can_change_dest_mode): Handle polynomial
29576 REGMODE_NATURAL_SIZE.
29577 * expmed.c (store_bit_field_1): Likewise.
29578 * expr.c (store_constructor): Likewise.
29579 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29580 and polynomial REGMODE_NATURAL_SIZE.
29581 (gen_lowpart_common): Likewise.
29582 * reginfo.c (record_subregs_of_mode): Likewise.
29583 * rtlanal.c (read_modify_subreg_p): Likewise.
29584
29585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29586 Alan Hayward <alan.hayward@arm.com>
29587 David Sherwood <david.sherwood@arm.com>
29588
29589 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29590 numbers of elements.
29591
29592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29593 Alan Hayward <alan.hayward@arm.com>
29594 David Sherwood <david.sherwood@arm.com>
29595
29596 * match.pd: Cope with polynomial numbers of vector elements.
29597
29598 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29599 Alan Hayward <alan.hayward@arm.com>
29600 David Sherwood <david.sherwood@arm.com>
29601
29602 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29603 in a POINTER_PLUS_EXPR.
29604
29605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29606 Alan Hayward <alan.hayward@arm.com>
29607 David Sherwood <david.sherwood@arm.com>
29608
29609 * omp-simd-clone.c (simd_clone_subparts): New function.
29610 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29611 (ipa_simd_modify_function_body): Likewise.
29612
29613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29614 Alan Hayward <alan.hayward@arm.com>
29615 David Sherwood <david.sherwood@arm.com>
29616
29617 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29618 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29619 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29620 (expand_vector_condition, vector_element): Likewise.
29621 (subparts_gt): New function.
29622 (get_compute_type): Use subparts_gt.
29623 (count_type_subparts): Delete.
29624 (expand_vector_operations_1): Use subparts_gt instead of
29625 count_type_subparts.
29626
29627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29628 Alan Hayward <alan.hayward@arm.com>
29629 David Sherwood <david.sherwood@arm.com>
29630
29631 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29632 (vect_compile_time_alias): ...this new function. Do the calculation
29633 on poly_ints rather than trees.
29634 (vect_prune_runtime_alias_test_list): Update call accordingly.
29635
29636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29637 Alan Hayward <alan.hayward@arm.com>
29638 David Sherwood <david.sherwood@arm.com>
29639
29640 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29641 numbers of units.
29642 (vect_schedule_slp_instance): Likewise.
29643
29644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29645 Alan Hayward <alan.hayward@arm.com>
29646 David Sherwood <david.sherwood@arm.com>
29647
29648 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29649 constant and extern definitions for variable-length vectors.
29650 (vect_get_constant_vectors): Note that the number of units
29651 is known to be constant.
29652
29653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29654 Alan Hayward <alan.hayward@arm.com>
29655 David Sherwood <david.sherwood@arm.com>
29656
29657 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29658 of units as polynomial. Choose between WIDE and NARROW based
29659 on multiple_p.
29660
29661 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29662 Alan Hayward <alan.hayward@arm.com>
29663 David Sherwood <david.sherwood@arm.com>
29664
29665 * tree-vect-stmts.c (simd_clone_subparts): New function.
29666 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29667
29668 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29669 Alan Hayward <alan.hayward@arm.com>
29670 David Sherwood <david.sherwood@arm.com>
29671
29672 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29673 vectors as polynomial. Use build_index_vector for
29674 IFN_GOMP_SIMD_LANE.
29675
29676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29677 Alan Hayward <alan.hayward@arm.com>
29678 David Sherwood <david.sherwood@arm.com>
29679
29680 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29681 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29682 for variable-length vectors.
29683 (vectorizable_mask_load_store): Treat the number of units as
29684 polynomial, asserting that it is constant if the condition has
29685 already been enforced.
29686 (vectorizable_store, vectorizable_load): Likewise.
29687
29688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29689 Alan Hayward <alan.hayward@arm.com>
29690 David Sherwood <david.sherwood@arm.com>
29691
29692 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29693 of units as polynomial. Punt if we can't tell at compile time
29694 which vector contains the final result.
29695
29696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29697 Alan Hayward <alan.hayward@arm.com>
29698 David Sherwood <david.sherwood@arm.com>
29699
29700 * tree-vect-loop.c (vectorizable_induction): Treat the number
29701 of units as polynomial. Punt on SLP inductions. Use an integer
29702 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29703 cast of such a series for variable-length floating-point
29704 reductions.
29705
29706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29707 Alan Hayward <alan.hayward@arm.com>
29708 David Sherwood <david.sherwood@arm.com>
29709
29710 * tree.h (build_index_vector): Declare.
29711 * tree.c (build_index_vector): New function.
29712 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29713 of units as polynomial, forcibly converting it to a constant if
29714 vectorizable_reduction has already enforced the condition.
29715 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29716 to create a {1,2,3,...} vector.
29717 (vectorizable_reduction): Treat the number of units as polynomial.
29718 Choose vectype_in based on the largest scalar element size rather
29719 than the smallest number of units. Enforce the restrictions
29720 relied on above.
29721
29722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29723 Alan Hayward <alan.hayward@arm.com>
29724 David Sherwood <david.sherwood@arm.com>
29725
29726 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29727 number of units as polynomial.
29728
29729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29730 Alan Hayward <alan.hayward@arm.com>
29731 David Sherwood <david.sherwood@arm.com>
29732
29733 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29734 * target.def (autovectorize_vector_sizes): Return the vector sizes
29735 by pointer, using vector_sizes rather than a bitmask.
29736 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29737 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29738 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29739 Likewise.
29740 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29741 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29742 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29743 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29744 * omp-general.c (omp_max_vf): Likewise.
29745 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29746 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29747 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29748 * tree-vect-slp.c (vect_slp_bb): Likewise.
29749 * doc/tm.texi: Regenerate.
29750 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29751 to a poly_uint64.
29752 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29753 the vector size as a poly_uint64 rather than an unsigned int.
29754 (current_vector_size): Change from an unsigned int to a poly_uint64.
29755 (get_vectype_for_scalar_type): Update accordingly.
29756 * tree.h (build_truth_vector_type): Take the size and number of
29757 units as a poly_uint64 rather than an unsigned int.
29758 (build_vector_type): Add a temporary overload that takes
29759 the number of units as a poly_uint64 rather than an unsigned int.
29760 * tree.c (make_vector_type): Likewise.
29761 (build_truth_vector_type): Take the number of units as a poly_uint64
29762 rather than an unsigned int.
29763
29764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29765 Alan Hayward <alan.hayward@arm.com>
29766 David Sherwood <david.sherwood@arm.com>
29767
29768 * target.def (get_mask_mode): Take the number of units and length
29769 as poly_uint64s rather than unsigned ints.
29770 * targhooks.h (default_get_mask_mode): Update accordingly.
29771 * targhooks.c (default_get_mask_mode): Likewise.
29772 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29773 * doc/tm.texi: Regenerate.
29774
29775 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29776 Alan Hayward <alan.hayward@arm.com>
29777 David Sherwood <david.sherwood@arm.com>
29778
29779 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29780 * omp-general.c (omp_max_vf): Likewise.
29781 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29782 (expand_omp_simd): Handle polynomial safelen.
29783 * omp-low.c (omplow_simd_context): Add a default constructor.
29784 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29785 (lower_rec_simd_input_clauses): Update accordingly.
29786 (lower_rec_input_clauses): Likewise.
29787
29788 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29789 Alan Hayward <alan.hayward@arm.com>
29790 David Sherwood <david.sherwood@arm.com>
29791
29792 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29793 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29794 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29795 (vect_analyze_slp_cost): Likewise.
29796 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29797 (vect_model_load_cost): Likewise.
29798
29799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29800 Alan Hayward <alan.hayward@arm.com>
29801 David Sherwood <david.sherwood@arm.com>
29802
29803 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29804 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29805 from an unsigned int * to a poly_uint64_pod *.
29806 (calculate_unrolling_factor): New function.
29807 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29808
29809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29810 Alan Hayward <alan.hayward@arm.com>
29811 David Sherwood <david.sherwood@arm.com>
29812
29813 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29814 from an unsigned int to a poly_uint64.
29815 (_loop_vec_info::slp_unrolling_factor): Likewise.
29816 (_loop_vec_info::vectorization_factor): Change from an int
29817 to a poly_uint64.
29818 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29819 (vect_get_num_vectors): New function.
29820 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29821 (vect_get_num_copies): Use vect_get_num_vectors.
29822 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29823 to an unsigned int *.
29824 (vect_analyze_data_refs): Change min_vf from an int * to a
29825 poly_uint64 *.
29826 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29827 than an unsigned HOST_WIDE_INT.
29828 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29829 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29830 to an unsigned int *.
29831 (vect_analyze_data_ref_dependences): Likewise.
29832 (vect_compute_data_ref_alignment): Handle polynomial vf.
29833 (vect_enhance_data_refs_alignment): Likewise.
29834 (vect_prune_runtime_alias_test_list): Likewise.
29835 (vect_shift_permute_load_chain): Likewise.
29836 (vect_supportable_dr_alignment): Likewise.
29837 (dependence_distance_ge_vf): Take the vectorization factor as a
29838 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29839 (vect_analyze_data_refs): Change min_vf from an int * to a
29840 poly_uint64 *.
29841 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29842 vfm1 as a poly_uint64 rather than an int. Make the same change
29843 for the returned bound_scalar.
29844 (vect_gen_vector_loop_niters): Handle polynomial vf.
29845 (vect_do_peeling): Likewise. Update call to
29846 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29847 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29848 be constant.
29849 * tree-vect-loop.c (vect_determine_vectorization_factor)
29850 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29851 (vect_get_known_peeling_cost): Likewise.
29852 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29853 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29854 (vect_transform_loop): Likewise. Use the lowest possible VF when
29855 updating the upper bounds of the loop.
29856 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29857 rather than an int.
29858 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29859 polynomial unroll factors.
29860 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29861 (vect_make_slp_decision): Likewise.
29862 (vect_supported_load_permutation_p): Likewise, and polynomial
29863 vf too.
29864 (vect_analyze_slp_cost): Handle polynomial vf.
29865 (vect_slp_analyze_node_operations): Likewise.
29866 (vect_slp_analyze_bb_1): Likewise.
29867 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29868 than an unsigned HOST_WIDE_INT.
29869 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29870 (vectorizable_load): Handle polynomial vf.
29871 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29872 a poly_uint64.
29873 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29874
29875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29876 Alan Hayward <alan.hayward@arm.com>
29877 David Sherwood <david.sherwood@arm.com>
29878
29879 * match.pd: Handle bit operations involving three constants
29880 and try to fold one pair.
29881
29882 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29883
29884 * tree-vect-loop-manip.c: Include gimple-fold.h.
29885 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29886 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29887 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29888 Add a path that uses a step of VF instead of 1, but disable it
29889 for now.
29890 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29891 and niters_no_overflow parameters. Update calls to
29892 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29893 Create a new SSA name if the latter choses to use a ste other
29894 than zero, and return it via niters_vector_mult_vf_var.
29895 * tree-vect-loop.c (vect_transform_loop): Update calls to
29896 vect_do_peeling, vect_gen_vector_loop_niters and
29897 slpeel_make_loop_iterate_ntimes.
29898 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29899 (vect_gen_vector_loop_niters): Update declarations after above changes.
29900
29901 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29902
29903 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29904 128-bit round to integer instructions.
29905 (ceil<mode>2): Likewise.
29906 (btrunc<mode>2): Likewise.
29907 (round<mode>2): Likewise.
29908
29909 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29910
29911 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29912 unaligned VSX load/store on P8/P9.
29913 (expand_block_clear): Allow the use of unaligned VSX
29914 load/store on P8/P9.
29915
29916 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29917
29918 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29919 New function.
29920 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29921 swap associated with both a load and a store.
29922
29923 2018-01-02 Andrew Waterman <andrew@sifive.com>
29924
29925 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29926 * config/riscv/riscv.md (clear_cache): Use it.
29927
29928 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29929
29930 * web.c: Remove out-of-date comment.
29931
29932 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29933
29934 * expr.c (fixup_args_size_notes): Check that any existing
29935 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29936 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29937 (emit_single_push_insn): ...here.
29938
29939 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29940
29941 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29942 (const_vector_encoded_nelts): New function.
29943 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29944 (const_vector_int_elt, const_vector_elt): Declare.
29945 * emit-rtl.c (const_vector_int_elt_1): New function.
29946 (const_vector_elt): Likewise.
29947 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29948 of CONST_VECTOR_ELT.
29949
29950 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29951
29952 * expr.c: Include rtx-vector-builder.h.
29953 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29954 directly on the tree encoding.
29955 (const_vector_from_tree): Likewise.
29956 * optabs.c: Include rtx-vector-builder.h.
29957 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29958 sequence of "u" values.
29959 * vec-perm-indices.c: Include rtx-vector-builder.h.
29960 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29961 directly on the vec_perm_indices encoding.
29962
29963 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29964
29965 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29966 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29967 * rtx-vector-builder.h: New file.
29968 * rtx-vector-builder.c: Likewise.
29969 * rtl.h (rtx_def::u2): Add a const_vector field.
29970 (CONST_VECTOR_NPATTERNS): New macro.
29971 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29972 (CONST_VECTOR_DUPLICATE_P): Likewise.
29973 (CONST_VECTOR_STEPPED_P): Likewise.
29974 (CONST_VECTOR_ENCODED_ELT): Likewise.
29975 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29976 (unwrap_const_vec_duplicate): Likewise.
29977 (const_vec_series_p): Check for a non-duplicated vector encoding.
29978 Say that the function only returns true for integer vectors.
29979 * emit-rtl.c: Include rtx-vector-builder.h.
29980 (gen_const_vec_duplicate_1): Delete.
29981 (gen_const_vector): Call gen_const_vec_duplicate instead of
29982 gen_const_vec_duplicate_1.
29983 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29984 (gen_const_vec_duplicate): Use rtx_vector_builder.
29985 (gen_const_vec_series): Likewise.
29986 (gen_rtx_CONST_VECTOR): Likewise.
29987 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29988 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29989 Build a new vector rather than modifying a CONST_VECTOR in-place.
29990 (handle_special_swappables): Update call accordingly.
29991 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29992 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29993 Build a new vector rather than modifying a CONST_VECTOR in-place.
29994 (handle_special_swappables): Update call accordingly.
29995
29996 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29997
29998 * simplify-rtx.c (simplify_const_binary_operation): Use
29999 CONST_VECTOR_ELT instead of XVECEXP.
30000
30001 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30002
30003 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
30004 the selector elements to be different from the data elements
30005 if the selector is a VECTOR_CST.
30006 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
30007 ssizetype for the selector.
30008
30009 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30010
30011 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
30012 before testing each element individually.
30013 * tree-vect-generic.c (lower_vec_perm): Likewise.
30014
30015 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30016
30017 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
30018 * selftest-run-tests.c (selftest::run_tests): Call it.
30019 * vector-builder.h (vector_builder::operator ==): New function.
30020 (vector_builder::operator !=): Likewise.
30021 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
30022 (vec_perm_indices::all_from_input_p): New function.
30023 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30024 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
30025 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
30026 instead of reading the VECTOR_CST directly. Detect whether both
30027 vector inputs are the same before constructing the vec_perm_indices,
30028 and update the number of inputs argument accordingly. Use the
30029 utility functions added above. Only construct sel2 if we need to.
30030
30031 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30032
30033 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
30034 the broadcast of the low byte.
30035 (expand_mult_highpart): Use an explicit encoding for the permutes.
30036 * optabs-query.c (can_mult_highpart_p): Likewise.
30037 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
30038 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30039 (vectorizable_bswap): Likewise.
30040 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
30041 explicit encoding for the power-of-2 permutes.
30042 (vect_permute_store_chain): Likewise.
30043 (vect_grouped_load_supported): Likewise.
30044 (vect_permute_load_chain): Likewise.
30045
30046 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30047
30048 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
30049 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
30050 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
30051 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30052 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
30053 (vect_gen_perm_mask_any): Likewise.
30054
30055 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30056
30057 * int-vector-builder.h: New file.
30058 * vec-perm-indices.h: Include int-vector-builder.h.
30059 (vec_perm_indices): Redefine as an int_vector_builder.
30060 (auto_vec_perm_indices): Delete.
30061 (vec_perm_builder): Redefine as a stand-alone class.
30062 (vec_perm_indices::vec_perm_indices): New function.
30063 (vec_perm_indices::clamp): Likewise.
30064 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
30065 (vec_perm_indices::new_vector): New function.
30066 (vec_perm_indices::new_expanded_vector): Update for new
30067 vec_perm_indices class.
30068 (vec_perm_indices::rotate_inputs): New function.
30069 (vec_perm_indices::all_in_range_p): Operate directly on the
30070 encoded form, without computing elided elements.
30071 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
30072 encoding. Update for new vec_perm_indices class.
30073 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
30074 the given vec_perm_builder.
30075 (expand_vec_perm_var): Update vec_perm_builder constructor.
30076 (expand_mult_highpart): Use vec_perm_builder instead of
30077 auto_vec_perm_indices.
30078 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
30079 vec_perm_indices instead of auto_vec_perm_indices. Use a single
30080 or double series encoding as appropriate.
30081 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
30082 vec_perm_indices instead of auto_vec_perm_indices.
30083 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30084 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30085 (vect_permute_store_chain): Likewise.
30086 (vect_grouped_load_supported): Likewise.
30087 (vect_permute_load_chain): Likewise.
30088 (vect_shift_permute_load_chain): Likewise.
30089 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30090 (vect_transform_slp_perm_load): Likewise.
30091 (vect_schedule_slp_instance): Likewise.
30092 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30093 (vectorizable_mask_load_store): Likewise.
30094 (vectorizable_bswap): Likewise.
30095 (vectorizable_store): Likewise.
30096 (vectorizable_load): Likewise.
30097 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
30098 vec_perm_indices instead of auto_vec_perm_indices. Use
30099 tree_to_vec_perm_builder to read the vector from a tree.
30100 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
30101 vec_perm_builder instead of a vec_perm_indices.
30102 (have_whole_vector_shift): Use vec_perm_builder and
30103 vec_perm_indices instead of auto_vec_perm_indices. Leave the
30104 truncation to calc_vec_perm_mask_for_shift.
30105 (vect_create_epilog_for_reduction): Likewise.
30106 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
30107 from auto_vec_perm_indices to vec_perm_indices.
30108 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30109 instead of changing individual elements.
30110 (aarch64_vectorize_vec_perm_const): Use new_vector to install
30111 the vector in d.perm.
30112 * config/arm/arm.c (expand_vec_perm_d::perm): Change
30113 from auto_vec_perm_indices to vec_perm_indices.
30114 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30115 instead of changing individual elements.
30116 (arm_vectorize_vec_perm_const): Use new_vector to install
30117 the vector in d.perm.
30118 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
30119 Update vec_perm_builder constructor.
30120 (rs6000_expand_interleave): Likewise.
30121 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
30122 (rs6000_expand_interleave): Likewise.
30123
30124 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30125
30126 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
30127 to qimode could truncate the indices.
30128 * optabs.c (expand_vec_perm_var): Likewise.
30129
30130 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30131
30132 * Makefile.in (OBJS): Add vec-perm-indices.o.
30133 * vec-perm-indices.h: New file.
30134 * vec-perm-indices.c: Likewise.
30135 * target.h (vec_perm_indices): Replace with a forward class
30136 declaration.
30137 (auto_vec_perm_indices): Move to vec-perm-indices.h.
30138 * optabs.h: Include vec-perm-indices.h.
30139 (expand_vec_perm): Delete.
30140 (selector_fits_mode_p, expand_vec_perm_var): Declare.
30141 (expand_vec_perm_const): Declare.
30142 * target.def (vec_perm_const_ok): Replace with...
30143 (vec_perm_const): ...this new hook.
30144 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
30145 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
30146 * doc/tm.texi: Regenerate.
30147 * optabs.def (vec_perm_const): Delete.
30148 * doc/md.texi (vec_perm_const): Likewise.
30149 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
30150 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
30151 expand_vec_perm for constant permutation vectors. Assert that
30152 the mode of variable permutation vectors is the integer equivalent
30153 of the mode that is being permuted.
30154 * optabs-query.h (selector_fits_mode_p): Declare.
30155 * optabs-query.c: Include vec-perm-indices.h.
30156 (selector_fits_mode_p): New function.
30157 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
30158 is defined, instead of checking whether the vec_perm_const_optab
30159 exists. Use targetm.vectorize.vec_perm_const instead of
30160 targetm.vectorize.vec_perm_const_ok. Check whether the indices
30161 fit in the vector mode before using a variable permute.
30162 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
30163 vec_perm_indices instead of an rtx.
30164 (expand_vec_perm): Replace with...
30165 (expand_vec_perm_const): ...this new function. Take the selector
30166 as a vec_perm_indices rather than an rtx. Also take the mode of
30167 the selector. Update call to shift_amt_for_vec_perm_mask.
30168 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
30169 Use vec_perm_indices::new_expanded_vector to expand the original
30170 selector into bytes. Check whether the indices fit in the vector
30171 mode before using a variable permute.
30172 (expand_vec_perm_var): Make global.
30173 (expand_mult_highpart): Use expand_vec_perm_const.
30174 * fold-const.c: Includes vec-perm-indices.h.
30175 * tree-ssa-forwprop.c: Likewise.
30176 * tree-vect-data-refs.c: Likewise.
30177 * tree-vect-generic.c: Likewise.
30178 * tree-vect-loop.c: Likewise.
30179 * tree-vect-slp.c: Likewise.
30180 * tree-vect-stmts.c: Likewise.
30181 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
30182 Delete.
30183 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
30184 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
30185 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
30186 (aarch64_vectorize_vec_perm_const): ...this new function.
30187 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30188 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30189 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
30190 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
30191 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30192 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30193 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
30194 into...
30195 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
30196 check for NEON modes.
30197 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
30198 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
30199 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
30200 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
30201 into...
30202 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
30203 the old VEC_PERM_CONST conditions.
30204 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
30205 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
30206 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
30207 (ia64_vectorize_vec_perm_const_ok): Merge into...
30208 (ia64_vectorize_vec_perm_const): ...this new function.
30209 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
30210 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
30211 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
30212 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
30213 * config/mips/mips.c (mips_expand_vec_perm_const)
30214 (mips_vectorize_vec_perm_const_ok): Merge into...
30215 (mips_vectorize_vec_perm_const): ...this new function.
30216 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
30217 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
30218 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
30219 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
30220 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
30221 (rs6000_expand_vec_perm_const): Delete.
30222 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
30223 Delete.
30224 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30225 (altivec_expand_vec_perm_const_le): Take each operand individually.
30226 Operate on constant selectors rather than rtxes.
30227 (altivec_expand_vec_perm_const): Likewise. Update call to
30228 altivec_expand_vec_perm_const_le.
30229 (rs6000_expand_vec_perm_const): Delete.
30230 (rs6000_vectorize_vec_perm_const_ok): Delete.
30231 (rs6000_vectorize_vec_perm_const): New function.
30232 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30233 an element count and rtx array.
30234 (rs6000_expand_extract_even): Update call accordingly.
30235 (rs6000_expand_interleave): Likewise.
30236 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
30237 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
30238 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
30239 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
30240 (rs6000_expand_vec_perm_const): Delete.
30241 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30242 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30243 (altivec_expand_vec_perm_const_le): Take each operand individually.
30244 Operate on constant selectors rather than rtxes.
30245 (altivec_expand_vec_perm_const): Likewise. Update call to
30246 altivec_expand_vec_perm_const_le.
30247 (rs6000_expand_vec_perm_const): Delete.
30248 (rs6000_vectorize_vec_perm_const_ok): Delete.
30249 (rs6000_vectorize_vec_perm_const): New function. Remove stray
30250 reference to the SPE evmerge intructions.
30251 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30252 an element count and rtx array.
30253 (rs6000_expand_extract_even): Update call accordingly.
30254 (rs6000_expand_interleave): Likewise.
30255 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30256 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30257 new function.
30258 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30259
30260 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30261
30262 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30263 vector mode and that that mode matches the mode of the data
30264 being permuted.
30265 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30266 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
30267 directly using expand_vec_perm_1 when forcing selectors into
30268 registers.
30269 (expand_vec_perm_var): New function, split out from expand_vec_perm.
30270
30271 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30272
30273 * optabs-query.h (can_vec_perm_p): Delete.
30274 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30275 * optabs-query.c (can_vec_perm_p): Split into...
30276 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30277 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30278 particular selector is valid.
30279 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30280 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30281 (vect_grouped_load_supported): Likewise.
30282 (vect_shift_permute_load_chain): Likewise.
30283 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30284 (vect_transform_slp_perm_load): Likewise.
30285 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30286 (vectorizable_bswap): Likewise.
30287 (vect_gen_perm_mask_checked): Likewise.
30288 * fold-const.c (fold_ternary_loc): Likewise. Don't take
30289 implementations of variable permutation vectors into account
30290 when deciding which selector to use.
30291 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30292 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30293 with a false third argument.
30294 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30295 to test whether the constant selector is valid and can_vec_perm_var_p
30296 to test whether a variable selector is valid.
30297
30298 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30299
30300 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30301 * optabs-query.c (can_vec_perm_p): Likewise.
30302 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30303 instead of vec_perm_indices.
30304 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30305 (vect_gen_perm_mask_checked): Likewise,
30306 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30307 (vect_gen_perm_mask_checked): Likewise,
30308
30309 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30310
30311 * optabs-query.h (qimode_for_vec_perm): Declare.
30312 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30313 (qimode_for_vec_perm): ...this new function.
30314 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30315
30316 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30317
30318 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30319 does not have a conditional at the top.
30320
30321 2018-01-02 Richard Biener <rguenther@suse.de>
30322
30323 * ipa-inline.c (big_speedup_p): Fix expression.
30324
30325 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30326
30327 PR target/81616
30328 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30329 for generic 4->6.
30330
30331 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30332
30333 PR target/81616
30334 Generic tuning.
30335 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30336 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30337 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30338 cond_taken_branch_cost 3->4.
30339
30340 2018-01-01 Jakub Jelinek <jakub@redhat.com>
30341
30342 PR tree-optimization/83581
30343 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30344 TODO_cleanup_cfg if any changes have been made.
30345
30346 PR middle-end/83608
30347 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30348 convert_modes if target mode has the right side, but different mode
30349 class.
30350
30351 PR middle-end/83609
30352 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30353 last argument when extracting from CONCAT. If either from_real or
30354 from_imag is NULL, use expansion through memory. If result is not
30355 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30356 the parts directly to inner mode, if even that fails, use expansion
30357 through memory.
30358
30359 PR middle-end/83623
30360 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30361 check for bswap in mode rather than HImode and use that in expand_unop
30362 too.
30363 \f
30364 Copyright (C) 2018 Free Software Foundation, Inc.
30365
30366 Copying and distribution of this file, with or without modification,
30367 are permitted in any medium without royalty provided the copyright
30368 notice and this notice are preserved.