gOlogy: fix debug binds in auto-inc-dec
[gcc.git] / gcc / ChangeLog
1 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2
3 * auto-inc-dec.c: Include valtrack.h. Improve comments.
4 (reg_next_debug_use): New.
5 (attempt_change): Propagate adjusted expression into affected
6 debug insns.
7 (merge_in_block): Track uses in debug insns.
8 (pass_inc_dec::execute): Allocate and release
9 reg_next_debug_use.
10
11 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
12
13 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
14 (_mm512_fixupimm_round_pd): Update parameters and builtin.
15 (_mm512_maskz_fixupimm_round_pd): Ditto.
16 (_mm512_fixupimm_round_ps): Ditto.
17 (_mm512_maskz_fixupimm_round_ps): Ditto.
18 (_mm_fixupimm_round_sd): Ditto.
19 (_mm_maskz_fixupimm_round_sd): Ditto.
20 (_mm_fixupimm_round_ss): Ditto.
21 (_mm_maskz_fixupimm_round_ss): Ditto.
22 (_mm512_fixupimm_pd): Ditto.
23 (_mm512_maskz_fixupimm_pd): Ditto.
24 (_mm512_fixupimm_ps): Ditto.
25 (_mm512_maskz_fixupimm_ps): Ditto.
26 (_mm_fixupimm_sd): Ditto.
27 (_mm_maskz_fixupimm_sd): Ditto.
28 (_mm_fixupimm_ss): Ditto.
29 (_mm_maskz_fixupimm_ss): Ditto.
30 (_mm512_mask_fixupimm_round_pd): Update builtin.
31 (_mm512_mask_fixupimm_round_ps): Ditto.
32 (_mm_mask_fixupimm_round_sd): Ditto.
33 (_mm_mask_fixupimm_round_ss): Ditto.
34 (_mm512_mask_fixupimm_pd): Ditto.
35 (_mm512_mask_fixupimm_ps): Ditto.
36 (_mm_mask_fixupimm_sd): Ditto.
37 (_mm_mask_fixupimm_ss): Ditto.
38 * config/i386/avx512vlintrin.h:
39 (_mm256_fixupimm_pd): Update parameters and builtin.
40 (_mm256_maskz_fixupimm_pd): Ditto.
41 (_mm256_fixupimm_ps): Ditto.
42 (_mm256_maskz_fixupimm_ps): Ditto.
43 (_mm_fixupimm_pd): Ditto.
44 (_mm_maskz_fixupimm_pd): Ditto.
45 (_mm_fixupimm_ps): Ditto.
46 (_mm_maskz_fixupimm_ps): Ditto.
47 (_mm256_mask_fixupimm_pd): Update builtin.
48 (_mm256_mask_fixupimm_ps): Ditto.
49 (_mm_mask_fixupimm_pd): Ditto.
50 (_mm_mask_fixupimm_ps): Ditto.
51 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
52 * config/i386/i386-builtin.def: Update builtin definitions.
53 * config/i386/i386.c: Handle new builtin types and remove useless ones.
54 * config/i386/sse.md: Update VFIXUPIMM* patterns.
55 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
56 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
57 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
58 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
59 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
60 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
61 * config/i386/subst.md:
62 (round_saeonly_sd_mask_operand4): Add new subst_attr.
63 (round_saeonly_sd_mask_op4): Ditto.
64 (round_saeonly_expand_operand5): Ditto.
65 (round_saeonly_expand): Update.
66
67 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
68
69 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
70
71 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
72
73 PR rtl-optimization/87871
74 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
75
76 2018-11-05 Paul Koning <ni1d@arrl.net>
77
78 * doc/sourcebuild.texi (target attributes): Document new "inf"
79 effective target keyword.
80
81 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
82
83 * config/s390/s390.c (s390_register_move_cost): Increase costs for
84 moves involving the CC reg.
85
86 2018-11-05 Richard Biener <rguenther@suse.de>
87
88 PR tree-optimization/87873
89 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
90 argument.
91 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
92 * tree-vect-loop.c (vect_transform_loop): When splitting the
93 loop exit also create forwarder PHIs for constants.
94 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
95 Handle constant to_arg, add extra checking we match up the correct
96 PHIs.
97
98 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
99
100 * config/s390/s390.md: QImode and HImode for load on condition.
101
102 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
103
104 * config/s390/predicates.md: Fix typo.
105 * config/s390/s390.md: Allow immediates for load on condition.
106
107 2018-11-05 Martin Liska <mliska@suse.cz>
108
109 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
110 * bitmap.h (struct bitmap_usage): Likewise.
111 * ggc-common.c (SCALE): Remove.
112 (LABEL): Likewise.
113 (struct ggc_usage): Use SIZE_AMOUNT. And update
114 compare method.
115 * ggc-page.c (SCALE): Remove.
116 (STAT_LABEL): Remove.
117 (ggc_print_statistics): Use SIZE_AMOUNT.
118 * gimple.h (SCALE): Remove.
119 (LABEL): Likewise.
120 * input.c (ONE_K): Remove.
121 (ONE_M): Likewise.
122 (SCALE): Likewise.
123 (STAT_LABEL): Likewise.
124 (FORMAT_AMOUNT): Likewise.
125 (dump_line_table_statistics): Use SIZE_AMOUNT.
126 * mem-stats.h (struct mem_usage): Likewise.
127 * rtl.c (dump_rtx_statistics): Likewise.
128 (rtx_alloc_counts): Change type to size_t.
129 (rtx_alloc_sizes): Likewise.
130 (rtx_count_cmp): New.
131 (dump_rtx_statistics): Sort first based on counts.
132 * tree.c (tree_nodes_cmp): New.
133 (tree_codes_cmp): New.
134 (dump_tree_statistics): Sort first based on counts.
135 * system.h (ONE_K): New.
136 (ONE_M): Likewise.
137 (SIZE_SCALE): Likewise.
138 (SIZE_LABEL): Likewise.
139 (SIZE_AMOUNT): Likewise.
140 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
141 * tree-dfa.c (dump_dfa_stats): Likewise.
142 * tree-phinodes.c (phinodes_print_statistics): Likewise.
143 * tree-ssanames.c (ssanames_print_statistics): Likewise.
144 * tree.c (dump_tree_statistics): Likewise.
145 * vec.c (struct vec_usage): Likewise.
146 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
147 trigger a -Werror=format-overflow with
148 --enable-gather-detailed-stats.
149
150 2018-11-05 Martin Liska <mliska@suse.cz>
151
152 * mem-stats.h (mem_alloc_description::release_instance_overhead):
153 Return T *.
154 * vec.c (struct vec_usage): Register m_element_size.
155 (vec_prefix::register_overhead): New arguments: elements and
156 element_size.
157 (vec_prefix::release_overhead): Subtract elements.
158 * vec.h (struct vec_prefix): Change signature.
159 (va_heap::reserve): Pass proper arguments.
160 (va_heap::release): Likewise.
161
162 2018-11-05 Martin Liska <mliska@suse.cz>
163
164 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
165 style.
166 * vec.c: Likewise.
167
168 2018-11-05 Richard Biener <rguenther@suse.de>
169
170 * tree-scalar-evolution.h (final_value_replacement_loop): Update
171 prototype.
172 * tree-scalar-evolution.c (final_value_replacement_loop): Return
173 whether anything was done.
174 (scev_const_prop): Remove constant propagation part, fold
175 remains into ...
176 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
177 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
178 conditionally.
179
180 2018-11-05 Jakub Jelinek <jakub@redhat.com>
181
182 PR tree-optimization/87859
183 * gimple-ssa-store-merging.c (struct merged_store_group): Add
184 only_constants and first_nonmergeable_order members.
185 (merged_store_group::merged_store_group): Initialize them.
186 (merged_store_group::do_merge): Clear only_constants member if
187 adding something other than INTEGER_CST store.
188 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
189 stores with order >= first_nonmergeable_order. Use
190 merged_store->only_constants instead of always recomputing it.
191 Set merged_store->first_nonmergeable_order if we've skipped any
192 stores. Attempt to merge overlapping INTEGER_CST stores that
193 we would otherwise skip.
194
195 PR sanitizer/87837
196 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
197
198 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
199
200 PR target/87853
201 * config/i386/emmintrin.h (__v16qs): New to cope with option
202 -funsigned-char.
203 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
204 (_mm_cmplt_epi8): Likewise.
205 (_mm_cmpgt_epi8): Likewise.
206
207 2018-11-05 Richard Biener <rguenther@suse.de>
208
209 PR rtl-optimization/87852
210 * fwprop.c (use_killed_between): Only consider single-defs of the
211 use whose definition statement dominates the use.
212
213 2018-11-05 Martin Liska <mliska@suse.cz>
214
215 PR web/87829
216 * doc/invoke.texi: Remove options that are
217 not disabled with -Os.
218
219 2018-11-05 Martin Liska <mliska@suse.cz>
220
221 PR c/87811
222 * doc/extend.texi: Update constrain about the last argument
223 of __builtin_expect_with_probability.
224
225 2018-11-05 Martin Liska <mliska@suse.cz>
226
227 PR c/87811
228 * predict.c (expr_expected_value_1): Verify
229 that last argument is a real constants and emit
230 error.
231
232 2018-11-05 Martin Liska <mliska@suse.cz>
233
234 PR gcov-profile/77698
235 * ipa-profile.c (ipa_profile): Adjust hotness threshold
236 only in LTO mode.
237
238 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
239
240 PR tree-optimization/86572
241 * builtins.c (c_strlen): Handle negative offsets in a safe way.
242
243 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
244
245 PR tree-optimization/87672
246 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
247 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
248
249 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
250
251 PR middle-end/58372
252 * cfgexpand.c (pass_expand::execute): Move the call to
253 finish_eh_generation in front of the call to expand_stack_alignment.
254
255 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
256
257 * common/config/i386/i386-common.c (processor_alias_table): Add
258 znver2 entry.
259 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
260 (case ${target}): Add znver2.
261 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
262 -march=native recognize znver2 processors.
263 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
264 * config/i386/i386.c (m_znver2): New definition.
265 (m_ZNVER): New definition.
266 (m_AMD_MULTIPLE): Includes m_znver2.
267 (processor_cost_table): Add znver2 entry.
268 (processor_target_table): Add znver2 entry.
269 (get_builtin_code_for_version): Set priority for
270 PROCESSOR_ZNVER2.
271 (processor_model): Add M_AMDFAM17H_ZNVER2.
272 (arch_names_table): Ditto.
273 (ix86_reassociation_width): Include znver2.
274 * config/i386/i386.h (TARGET_znver2): New definition.
275 (struct ix86_size_cost): Add TARGET_ZNVER2.
276 (enum processor_type): Add PROCESSOR_ZNVER2.
277 * config/i386/i386.md (define_attr "cpu"): Add znver2.
278 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
279 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
280 (ix86_adjust_cost): Add znver2.
281 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
282 * gcc/doc/extend.texi: Add details about znver2.
283 * gcc/doc/invoke.texi: Add details about znver2.
284
285 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
286
287 PR target/87079
288
289 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
290 pattern.
291
292 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
293
294 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
295 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
296
297 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
298
299 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
300 shrink-wrapping when -mtrack-speculation.
301
302 2018-11-02 Richard Biener <rguenther@suse.de>
303
304 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
305 (pop_cost_one_pair): Do not free pair.
306 (pop_best_coalesce): Likewise.
307 (create_coalesce_list): Initialize obstack.
308 (delete_coalesce_list): Free obstack.
309 (find_coalesce_pair): Obstack-allocate coalesce pairs.
310 (add_cost_one_coalesce): Likewise.
311 (struct live_track): Remove bitmap pointer indirections.
312 (new_live_track): Adjust.
313 (delete_live_track): Likewise.
314 (live_track_remove_partition): Likewise.
315 (live_track_add_partition): Likewise.
316 (live_track_live_p): Likewise.
317 (live_track_process_def): Likewise.
318 (live_track_clear_base_vars): Likewise.
319
320 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
321
322 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
323 * configure: Regenerate.
324 * config.in: Regenerate.
325 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
326 HAVE_AS_REGISTER_PSEUDO_OP guard.
327 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
328 !HAVE_AS_REGISTER_PSEUDO_OP support.
329 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
330 guard.
331
332 2018-11-02 Richard Biener <rguenther@suse.de>
333
334 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
335 with is_type_die.
336
337 2018-11-02 Richard Biener <rguenther@suse.de>
338
339 PR tree-optimization/87776
340 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
341 executable when iterating but running into rpo-vn-max-loop-depth
342 and not eliding the iteration.
343
344 2018-11-30 Jan Hubicka <jh@suse.cz>
345
346 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
347 TYPE_DECL.
348
349 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
350
351 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
352 prototype.
353 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
354 Combine with rs6000_address_for_fpconvert.
355 (rs6000_address_for_fpconvert): Combine with
356 rs6000_force_indexed_or_indirect_mem.
357 (rs6000_expand_vector_init): Change function call from
358 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
359 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
360 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
361 (floatsi<mode>2_lfiwax_mem): Ditto.
362 (floatunssi<mode>2_lfiwzx): Ditto.
363 (floatunssi<mode>2_lfiwzx_mem): Ditto.
364 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
365 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
366 (fix_trunc<mode>si2_stfiwx): Ditto.
367 (fixuns_trunc<mode>si2_stfiwx): Ditto.
368 (float_<mode>si2_hw): Ditto.
369 (floatuns_<mode>si2_hw): Ditto.
370 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
371 (vsx_splat_<mode>): Ditto.
372
373 2018-11-01 Joseph Myers <joseph@codesourcery.com>
374
375 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
376 at end of assembler input text.
377 * configure: Regenerate.
378
379 2018-11-01 Jakub Jelinek <jakub@redhat.com>
380
381 PR tree-optimization/87826
382 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
383 negative or larger or equal to type's precision.
384
385 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
386
387 * opts.c (default_options_table): Do not enable
388 OPT_fdelayed_branch at -Og.
389 * doc/invoke.texi (-fdelayed-branch): Document it.
390
391 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
392
393 * optabs-libfuncs.c (build_libfunc_function_visibility):
394 New, split out from...
395 (build_libfunc_function): ... here.
396 (init_one_libfunc_visibility): New, split out from ...
397 (init_one_libfunc): ... here.
398
399 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
400 scratch register need not be early-clobber. Document the reason
401 why we cannot use ST<OP>.
402
403 2018-10-31 Joseph Myers <joseph@codesourcery.com>
404
405 PR bootstrap/82856
406 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
407 line for second argument of AC_DEFINE_UNQUOTED.
408 * doc/install.texi (Tools/packages necessary for modifying GCC):
409 Update to autoconf 2.69 and automake 1.15.1.
410 * aclocal.m4, config.in, configure: Regenerate.
411
412 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
413
414 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
415 initialization.
416
417 2018-10-31 Martin Liska <mliska@suse.cz>
418
419 PR driver/83193
420 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
421 Add new argument invalid_extension.
422 (aarch64_get_all_extension_candidates): New function.
423 (aarch64_rewrite_selected_cpu): Add NULL to function call.
424 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
425 new argument.
426 (aarch64_get_all_extension_candidates): New function.
427 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
428 argument invalid_extension.
429 (aarch64_parse_cpu): Likewise.
430 (aarch64_print_hint_for_extensions): New function.
431 (aarch64_validate_mcpu): Provide hint about invalid extension.
432 (aarch64_validate_march): Likewise.
433 (aarch64_handle_attr_arch): Pass new argument.
434 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
435 (aarch64_handle_attr_isa_flags): Likewise.
436
437 2018-10-31 Richard Biener <rguenther@suse.de>
438
439 PR middle-end/70359
440 PR middle-end/86270
441 * tree-outof-ssa.c (insert_backedge_copies): Restrict
442 copy generation to useful cases. Place the copy before
443 the definition of the backedge value when possible.
444
445 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
446
447 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
448 * config/arc/arc.c (arc_active_insn): New function.
449 (check_store_cacheline_hazard): Likewise.
450 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
451 (arc_override_options): Disable delay slot scheduler for older
452 A7.
453 (arc_store_addr_hazard_p): New implementation, old one renamed to
454 ...
455 (arc_store_addr_hazard_internal_p): Renamed.
456 (arc_reorg): Don't combine into brcc instructions which are part
457 of hardware hazard solution.
458 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
459 (tune_arc700): Likewise.
460 * config/arc/arc.opt (arc7xx): New tune value.
461 * config/arc/arc700.md: Improve A7 scheduler.
462
463 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
464
465 * config/arc/arc.c (arc_override_options): Remove
466 TARGET_COMPACT_CASESI.
467 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
468 (CASE_VECTOR_MODE): Likewise.
469 (CASE_VECTOR_PC_RELATIVE): Likewise.
470 (CASE_VECTOR_SHORTEN_MODE): Likewise.
471 (CASE_VECTOR_SHORTEN_MODE1): Delete.
472 (ADDR_VEC_ALIGN): Update.
473 (ASM_OUTPUT_CASE_LABEL): Undefine.
474 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
475 (TARGET_BI_BIH): Define.
476 (DEFAULT_BRANCH_INDEX): Likewise.
477 * config/arc/arc.md (casesi): Rework to accept BI/BIH
478 instructions, remove compact_casesi use case.
479 (casesi_compact_jump): Remove.
480 (casesi_dispatch): New pattern.
481 * config/arc/arc.opt: Add mbranch-index option. Deprecate
482 compact_casesi option.
483 * doc/invoke.texi: Document mbranch-index option.
484
485 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
486
487 * config/arc/arc.c (arc_get_tp): Remove function.
488 (arc_emit_call_tls_get_addr): Likewise.
489 (arc_call_tls_get_addr): New function.
490 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
491 * config/arc/arc.md (tls_load_tp_soft): Remove.
492 (tls_gd_get_addr): Likewise.
493
494 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
495
496 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
497 (mulsi3_600_lib): Remove pattern.
498 (umulsi3_highpart_600_lib_le): Likewise.
499 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
500 (umulsidi3): Remove call to umulsidi3_600_lib.
501 (umulsidi3_600_lib): Remove pattern.
502 (peephole2): Remove peephole using the above deprecated patterns.
503
504 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
505
506 PR target/87374
507 * config/arm/arm.c (arm_option_check_internal): Disable the combined
508 use of -mslow-flash-data and -mword-relocations.
509 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
510 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
511 flag_pic.
512 * doc/invoke.texi (-mword-relocations): Mention conflict with
513 -mslow-flash-data.
514 (-mslow-flash-data): Reciprocally.
515
516 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
517
518 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
519 16-byte modes held in GP registers to use an even regno.
520
521 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
522 (aarch64_atomic_ldop_supported_p): Remove.
523 (aarch64_gen_atomic_ldop): Remove.
524 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
525 Fully expand LSE operations here.
526 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
527 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
528 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
529 and use ATOMIC_LDOP instead; use register_operand for the input;
530 drop the split and emit insns directly.
531 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
532 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
533 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
534
535 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
536 (aarch64_gen_atomic_ldop): Don't call it.
537 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
538 Use aarch64_reg_or_zero.
539 (aarch64_atomic_exchange<ALLI>): Likewise.
540 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
541 operand 0; use aarch64_reg_or_zero for input; merge ...
542 (@aarch64_atomic_swp<ALLI>): ... this and remove.
543
544 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
545 (aarch64_split_compare_and_swap): Use it.
546 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
547 test oldval against the proper predicate.
548 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
549 Use nonmemory_operand for expected.
550 (cas_short_expected_pred): New.
551 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
552 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
553 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
554 (aarch64_plushi_operand): New.
555
556 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
557 Force oldval into the rval register for TARGET_LSE; emit the compare
558 during initial expansion so that it may be deleted if unused.
559 (aarch64_gen_atomic_cas): Remove.
560 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
561 Change =&r to +r for operand 0; use match_dup for operand 2;
562 remove is_weak and mod_f operands as unused. Drop the split
563 and merge with...
564 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
565 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
566 (@aarch64_atomic_cas<GPI>): Similarly.
567
568 2018-10-31 Richard Biener <rguenther@suse.de>
569
570 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
571 using ABSU_EXPR.
572
573 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
574
575 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
576 * config/aarch64/aarch64.md: Include saphira.md
577 * config/aarch64/saphira.md: New file for pipeline description.
578
579 2018-10-30 Martin Sebor <msebor@redhat.com>
580
581 PR middle-end/87041
582 * gimple-ssa-sprintf.c (format_directive): Use %G to include
583 inlining context.
584 (sprintf_dom_walker::compute_format_length):
585 Avoid setting POSUNDER4K here.
586 (get_destination_size): Handle null argument values.
587 (get_user_idx_format): New function.
588 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
589 functions, including user-defined with attribute format printf.
590 Use %G to include inlining context.
591 Set POSUNDER4K here.
592
593 2018-10-30 Jan Hubicka <jh@suse.cz>
594
595 * params.def (lto-partitions): Bump from 32 to 128.
596
597 2018-10-30 Jan Hubicka <jh@suse.cz>
598
599 * tree.c
600 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
601 head in file.
602 (free_lang_data_in_type): Forward declare.
603 (fld_type_variant_equal_p): New function.
604 (fld_type_variant): New function
605 (fld_incomplete_types): New hash.
606 (fld_incomplete_type_of): New function
607 (fld_simplfied-type): New function.
608 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
609 (free_lang_data): Allocate and free fld_incomplete_type; update call
610 of free_lang_data_in_decl.
611
612 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
613
614 * gcov.c (output_lines): Remove duplicate line.
615
616 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
617
618 * config/rs6000/rs6000.md (bswapdi2): Force address into register
619 if not in indexed or indirect form.
620 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
621 (bswapdi2_store): Ditto.
622 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
623 helper function.
624 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
625 Prototype for helper function.
626
627 2018-10-30 Martin Sebor <msebor@redhat.com>
628
629 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
630 (target, pragma GCC optimize, pragma GCC target): Ditto.
631
632 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
633
634 * doc/extend.texi: Fix prototype and description of
635 __builtin_expect_with_probability.
636
637 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
638
639 * cgraph.h (clone_function_name_1): Replaced by new
640 clone_function_name_numbered that takes name as string; for
641 privatize_symbol_name_1 use only.
642 (clone_function_name): Renamed to
643 clone_function_name_numbered to be explicit about numbering.
644 (clone_function_name): New two-argument function that does
645 not number its output.
646 (clone_function_name): New three-argument function that
647 takes a number to append to its output.
648 * cgraphclones.c (duplicate_thunk_for_node):
649 (clone_function_name_1): Renamed.
650 (clone_function_name_numbered): Two new functions.
651 (clone_function_name): Improved documentation.
652 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
653 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
654 * final.c (final_scan_insn_1): Use the new clone_function_name
655 without numbering.
656 * multiple_target.c (create_dispatcher_calls): Ditto.
657 (create_target_clone): Ditto.
658 * omp-expand.c (grid_expand_target_grid_body): Ditto.
659 * omp-low.c (create_omp_child_function_name): Ditto.
660 * omp-simd-clone.c (simd_clone_create): Ditto.
661 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
662 new clone_function_name without numbering.
663
664 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
665
666 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
667 Assert that the allocation size is not zero.
668
669 2018-10-30 Richard Biener <rguenther@suse.de>
670
671 PR tree-optimization/87800
672 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
673 non-induction or reduction PHIs.
674
675 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
676
677 * config/aarch64/falkor-tag-collision-avoidance.c
678 (execute_tag_collision_avoidance): Call df_note_add_problem.
679
680 2018-10-30 Martin Liska <mliska@suse.cz>
681
682 * doc/extend.texi: Fix typo in documentation
683 of __builtin_expect_with_probability.
684
685 2018-10-29 David Malcolm <dmalcolm@redhat.com>
686
687 PR c++/87721
688 * input.c (get_substring_ranges_for_loc): Detect if
689 linemap_resolve_location gives us a NULL map, and reject
690 this case.
691
692 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
693
694 * config.gcc (xstormy16-*-elf): Set tm_d_file.
695
696 2018-10-29 David Malcolm <dmalcolm@redhat.com>
697 Martin Sebor <msebor@redhat.com>
698 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
699
700 * doc/ux.texi (Quoting): New subsection, adapted from material at
701 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
702 MartinSebor and ManuelLopezIbanez.
703 (Fix-it hints): Note that fix-it hints shouldn't be marked for
704 translation.
705
706 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
707
708 PR middle-end/87469
709 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
710 max value.
711
712 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
713
714 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
715
716 2018-10-29 Paul Koning <ni1d@arrl.net>
717
718 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
719
720 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
721
722 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
723 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
724 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
725 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
726 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
727 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
728 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
729 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
730 Change 'vector' to '__vector'.
731 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
732 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
733 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
734 _mm_avg_pu16): Likewise. And, whitespace corrections.
735
736 2018-10-29 Richard Biener <rguenther@suse.de>
737
738 PR tree-optimization/87785
739 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
740 internal defs.
741
742 2018-10-29 Olivier Hainque <hainque@adacore.com>
743
744 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
745
746 2018-10-29 Olivier Hainque <hainque@adacore.com>
747
748 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
749 ports configuration macro, defaults to "gnu".
750 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
751 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
752
753 2018-10-29 Olivier Hainque <hainque@adacore.com>
754
755 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
756
757 2018-10-29 Richard Biener <rguenther@suse.de>
758
759 PR tree-optimization/87790
760 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
761 (vect_make_slp_decision): Adjust.
762 (vect_slp_analyze_bb_1): Likewise.
763 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
764 edges.
765
766 2018-10-29 Richard Biener <rguenther@suse.de>
767
768 PR tree-optimization/87785
769 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
770 and processing.
771 (vect_build_slp_tree): Likewise.
772 (vect_gather_slp_loads): New function.
773 (vect_analyze_slp_instance): Gather loads separately from the
774 SLP tree build.
775
776 2018-10-29 Martin Liska <mliska@suse.cz>
777
778 * Makefile.in: Make dependency to json.o.
779 * doc/gcov.texi: Document new JSON format, remove
780 old intermediate format documentation.
781 * gcov.c (struct function_info): Come up with m_name and
782 m_demangled_name.
783 (function_info::function_info): Initialize it.
784 (function_info::~function_info): Release it.
785 (main): Rename flag_intermediate_format to flag_json_format.
786 (print_usage): Describe --json-format.
787 (process_args): Set flag_json_format.
788 (output_intermediate_line): Remove.
789 (output_intermediate_json_line): Likewise.
790 (get_gcov_intermediate_filename): Return new extension
791 ".gcov.json.gz".
792 (output_intermediate_file): Implement JSON emission.
793 (output_json_intermediate_file): Implement JSON emission.
794 (generate_results): Use ::get_name for function name.
795 Handle JSON output file.
796 (read_graph_file): Use ::get_name instead of cplus_demangle.
797 (read_count_file): Likewise.
798 (solve_flow_graph): Likewise.
799 (add_line_counts): Likewise.
800 (accumulate_line_counts): Use new flag_json_format.
801 (output_function_details): Use ::get_name instead of cplus_demangle.
802 (output_lines): Likewise.
803 * json.cc (test_writing_literals): Add new tests.
804 * json.h (class literal): Add new boolean constructor.
805
806 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
807
808 PR rtl-optimization/87701
809 PR rtl-optimization/87780
810 * combine.c (make_more_copies): Rewrite.
811
812 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
813
814 * doc/generic.texi (ABSU_EXPR): Document.
815 * match.pd (absu(x)*absu(x) -> x*x): Handle.
816 (absu(absu(X)) -> absu(X)): Likewise.
817 (absu(-X) -> absu(X)): Likewise.
818 (absu(X) where X is nonnegative -> X): Likewise.
819
820 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
821
822 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
823 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
824 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
825 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
826 (s-tm-texi): Also check timestamp on d-target.def.
827 (generated_files): Add TM_D_H and d-target-hooks-def.h.
828 (build/genhooks.o): Also depend on D_TARGET_DEF.
829 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
830 variables.
831 * config/aarch64/aarch64-d.c: New file.
832 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
833 Define.
834 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
835 prototype.
836 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
837 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
838 * config/arm/arm-d.c: New file.
839 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
840 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
841 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
842 * config/arm/t-arm (arm-d.o): New rule.
843 * config/default-d.c: New file.
844 * config/glibc-d.c: New file.
845 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
846 * config/i386/i386-d.c: New file.
847 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
848 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
849 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
850 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
851 * config/i386/t-i386 (i386-d.o): New rule.
852 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
853 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
854 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
855 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
856 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
857 * config/mips/mips-d.c: New file.
858 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
859 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
860 * config/mips/t-mips (mips-d.o): New rule.
861 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
862 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
863 * config/powerpcspe/powerpcspe-d.c: New file.
864 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
865 New prototype.
866 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
867 Support GNU D by using 0 as the language type.
868 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
869 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
870 * config/riscv/riscv-d.c: New file.
871 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
872 prototype.
873 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
874 * config/riscv/t-riscv (riscv-d.o): New rule.
875 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
876 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
877 * config/rs6000/rs6000-d.c: New file.
878 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
879 prototype.
880 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
881 Support GNU D by using 0 as the language type.
882 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
883 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
884 * config/s390/s390-d.c: New file.
885 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
886 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
887 * config/s390/t-s390 (s390-d.o): New rule.
888 * config/sparc/sparc-d.c: New file.
889 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
890 prototype.
891 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
892 * config/sparc/t-sparc (sparc-d.o): New rule.
893 * config/t-glibc (glibc-d.o): New rule.
894 * configure: Regenerated.
895 * configure.ac (tm_d_file): New variable.
896 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
897 * doc/contrib.texi (Contributors): Add self for the D frontend.
898 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
899 * doc/install.texi (Configuration): Mention libphobos as an option for
900 --enable-shared. Mention d as an option for --enable-languages.
901 (Testing): Mention check-d as a target.
902 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
903 name suffixes. Mention d as a -x option.
904 * doc/sourcebuild.texi (Top Level): Mention libphobos.
905 * doc/standards.texi (Standards): Add section on D language.
906 * doc/tm.texi: Regenerated.
907 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
908 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
909 * dwarf2out.c (is_dlang): New function.
910 (gen_compile_unit_die): Use DW_LANG_D for D.
911 (declare_in_namespace): Return module die for D, instead of adding
912 extra declarations into the namespace.
913 (gen_namespace_die): Generate DW_TAG_module for D.
914 (gen_decl_die): Handle CONST_DECLSs for D.
915 (dwarf2out_decl): Likewise.
916 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
917 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
918 kinds of aggregates.
919 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
920 * genhooks.c: Include d/d-target.def.
921
922 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
923
924 PR target/85669
925 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
926 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
927 (STACK_DYNAMIC_OFFSET): Likewise.
928
929 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
930
931 PR target/80024
932 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
933 error message.
934
935 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
936
937 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
938 return type and other typos.
939
940 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
941
942 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
943 a shorter sequence with fewer branches.
944 (emit_final_str_compare_gpr): Ditto.
945
946 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
947
948 * config/rs6000/tmmintrin.h: New file.
949 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
950
951 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
952
953 * config/rs6000/mmintrin.h: Enable 32bit compilation.
954 * config/rs6000/xmmintrin.h: Likewise.
955
956 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
957
958 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
959
960 2018-10-26 Richard Biener <rguenther@suse.de>
961
962 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
963 and wrapper.
964 (vect_mark_slp_stmts_relevant): Likewise.
965 (vect_detect_hybrid_slp_stmts): Likewise.
966 (vect_bb_slp_scalar_cost): Likewise.
967 (vect_remove_slp_scalar_calls): Likewise.
968
969 2018-10-26 Jan Hubicka <jh@suse.cz>
970
971 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
972 (warn_types_mismatch): Fix walk of DECL_NAME.
973 (odr_types_equivalent_p): Fix overactive assert.
974
975 2018-10-26 Richard Biener <rguenther@suse.de>
976
977 PR tree-optimization/87105
978 * tree-vectorizer.h (_slp_tree::refcnt): New member.
979 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
980 refcnt.
981 (vect_create_new_slp_node): Initialize refcnt to one.
982 (bst_traits): Move.
983 (scalar_stmts_set_t, bst_fail): Remove.
984 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
985 (vect_build_slp_tree): Add bst_map argument and lookup
986 already created SLP nodes.
987 (vect_print_slp_tree): Handle a SLP graph, print SLP node
988 addresses.
989 (vect_slp_rearrange_stmts): Handle a SLP graph.
990 (vect_analyze_slp_instance): Adjust and free SLP nodes from
991 the CSE map. Fix indenting.
992 (vect_schedule_slp_instance): Add short-cut.
993
994 2018-10-26 Martin Liska <mliska@suse.cz>
995
996 PR testsuite/86158
997 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
998 addr_expr and not with pointers.
999
1000 2018-10-26 Jan Hubicka <jh@suse.cz>
1001
1002 * tree.c (free_lang_data_in_type): Only check main variants.
1003 * ipa-devirt.c (warn_odr): Make static.
1004 (types_same_for_odr): Drop strict variant.
1005 (types_odr_comparable): Likewise.
1006 (odr_or_derived_type_p): Look for main variants.
1007 (odr_name_hasher::equal): Cleanup comment.
1008 (odr_subtypes_equivalent): Add warn and warned arguments; check main
1009 variants.
1010 (type_variants_equivalent_p): break out from ...
1011 (odr_types_equivalent): ... here; go for main variants where needed.
1012 (warn_odr): ... here; turn static.
1013 (warn_types_mismatch): Compare mangled names of main variants.
1014 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
1015 (type_with_linkage_p): Sanity check that we look at main variant.
1016 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
1017 * tree.h (types_same_for_odr): Drop strict argument.
1018
1019 2018-10-26 Richard Biener <rguenther@suse.de>
1020
1021 PR tree-optimization/87746
1022 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
1023 Simplify and fix WRT strided store groups with size not
1024 equal to step in element count.
1025 (vect_analyze_group_access_1): Dump the whole group.
1026
1027 2018-10-25 Carl Love <cel@us.ibm.com>
1028
1029 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
1030 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
1031 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
1032 precicion entry for each overloaded builtin.
1033 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
1034 VSCEDPUO): Rename overloaded name.
1035 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
1036 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
1037 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
1038 define_expand for xscmpexqp instruction.
1039 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
1040
1041 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1042 Jinsong Ji <jji@us.ibm.com>
1043
1044 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
1045 function with vec_sl.
1046 (_mm_slli_epi32): Likewise.
1047 (_mm_slli_epi64): Likewise.
1048 (_mm_srai_epi16): Replace deprecated function with vec_sra.
1049 (_mm_srai_epi32): Likewise.
1050 (_mm_srli_epi16): Replace deprecated function with vec_sr.
1051 (_mm_srli_epi32): Likewise.
1052 (_mm_srli_epi64): Likewise.
1053 (_mm_sll_epi16): Replace deprecated function with vec_sl.
1054 (_mm_sll_epi32): Likewise.
1055 (_mm_sll_epi64): Likewise.
1056 (_mm_sra_epi16): Replace deprecated function with vec_sra.
1057 (_mm_sra_epi32): Likewise.
1058 (_mm_srl_epi16): Replace deprecated function with vec_sr.
1059 (_mm_srl_epi32): Likewise.
1060 (_mm_srl_epi64): Likewise.
1061
1062 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1063 Jinsong Ji <jji@us.ibm.com>
1064
1065 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
1066 comparison operators with vec_cmp* for compatibility due to
1067 unfortunate history; clean up formatting and use types more
1068 appropriately.
1069 (_mm_sll_epi32): Likewise.
1070 (_mm_sll_epi64): Likewise.
1071 (_mm_srl_epi16): Likewise.
1072 (_mm_srl_epi32): Likewise.
1073 (_mm_srl_epi64): Likewise.
1074
1075 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1076 Jinsong Ji <jji@us.ibm.com>
1077
1078 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
1079 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
1080 __vector __bool int. Use vec_cmpgt in preference to deprecated
1081 function vec_vcmpgtfp.
1082 (_mm_max_ps): Likewise.
1083
1084 2018-10-25 Jeff Law <law@redhat.com>
1085
1086 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
1087 if returning false.
1088
1089 2018-10-25 Martin Sebor <msebor@redhat.com>
1090
1091 * doc/extend.texi (aligned): Expand attribute description.
1092 (Alignment): Rename section. Discuss function arguments.
1093
1094 2018-10-25 Jan Hubicka <jh@suse.cz>
1095
1096 * ipa-devirt.c (main_odr_variant): Remove.
1097 (hash_odr_name, types_same_for_odr, types_odr_comparable,
1098 odr_name_hasher::equal, odr_subtypes_equivalent_p):
1099 Drop use of main_odr_variant.
1100 (add_type_duplicate): Silence confused warnings on integer types.
1101 (get_odr_type): Always look for main variant.
1102 (register_odr_type): Simplify.
1103
1104 2018-10-25 Richard Biener <rguenther@suse.de>
1105
1106 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
1107 Initialize ng to silence error with release checking bootstrap.
1108
1109 2018-10-25 Richard Biener <rguenther@suse.de>
1110
1111 * tree-if-conv.c: Include tree-ssa-sccvn.h.
1112 (tree_if_conversion): Run CSE on the if-converted loop body.
1113
1114 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1115
1116 * config/s390/constraints.md (ZL): New constraint.
1117 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
1118 operands.
1119 * config/s390/s390.md (movdi_larl): Remove.
1120 (movdi_64): Add the LARL alternative.
1121
1122 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1123
1124 PR bootstrap/87747
1125 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
1126 (RTX_CODE_HWINT_P): New macro.
1127 (rtx_code_size): Use RTX_CODE_HWINT_P ().
1128
1129 2018-10-25 Jan Hubicka <jh@suse.cz>
1130
1131 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
1132 is anonymous.
1133
1134 2018-10-25 Richard Biener <rguenther@suse.de>
1135
1136 PR tree-optimization/87665
1137 PR tree-optimization/87745
1138 * tree-vectorizer.h (get_earlier_stmt): Remove.
1139 (get_later_stmt): Pick up UID from the original non-pattern stmt.
1140
1141 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
1142
1143 * options.texi (Deprecated): Move list to Var section.
1144
1145 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
1146 Jinsong Ji <jji@us.ibm.com>
1147
1148 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
1149 __vector long to __vector long long.
1150 (_mm_cvtpd_ps): Likewise.
1151 (_mm_cvttpd_epi32): Likewise.
1152 (_mm_cvtpi32_pd): Likewise.
1153 (_mm_unpackhi_epi64): Likewise.
1154 (_mm_unpacklo_epi64): Likewise.
1155
1156 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
1157
1158 PR rtl-optimization/87720
1159 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
1160
1161 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
1162
1163 * gimple-ssa-isolate-paths.c
1164 (find_implicit_erroneous_behavior): Do not change code if the
1165 pass is running for warnings only.
1166 (find_explicit_erroneous_behavior): Likewise.
1167
1168 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
1169
1170 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1171 Define as rs6000_mangle_decl_assembler_name.
1172 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1173 long double to IEEE long double, switch the names of the long
1174 double built-in functions to be <func>f128 instead of <func>l.
1175
1176 2018-10-24 Martin Sebor <msebor@redhat.com>
1177
1178 * doc/extend.texi (nonnull): List no-argument form. Reference
1179 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1180
1181 2018-10-24 Richard Biener <rguenther@suse.de>
1182
1183 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1184
1185 2018-10-24 Martin Liska <mliska@suse.cz>
1186
1187 PR tree-optimization/84436
1188 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1189 Remove.
1190 (switch_conversion::contains_linear_function_p): New.
1191 (switch_conversion::build_one_array): Support linear
1192 transformation on input.
1193 * tree-switch-conversion.h (struct switch_conversion): Add
1194 contains_linear_function_p declaration.
1195
1196 2018-10-24 Richard Biener <rguenther@suse.de>
1197
1198 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1199 if its argument is CONSTANT_CLASS_P.
1200
1201 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1202
1203 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1204 it is wrong for forward declarations.
1205
1206 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
1207
1208 * config/s390/s390.c (s390_check_qrst_address): Add the missing
1209 SYMBOL_REF_P () check.
1210
1211 2018-10-24 Richard Biener <rguenther@suse.de>
1212
1213 PR tree-optimization/87105
1214 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1215 dump classification.
1216 (vect_analyze_data_ref_accesses): Handle duplicate loads and
1217 stores by splitting the affected group after the fact.
1218 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1219 fail the SLP build because of size constraints.
1220
1221 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1222
1223 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1224 * configure: Regenerate.
1225 * config.in: Regenerate.
1226 * varasm.c (mergeable_string_section): Use readonly_data_section
1227 if linker doesn't support SHF_MERGE with alignment > 8.
1228 (mergeable_constant_section): Likewise.
1229
1230 2018-10-24 Richard Biener <rguenther@suse.de>
1231
1232 PR tree-optimization/84013
1233 * tree-ssa-structalias.c (struct msdi_data): New struct for
1234 marshalling data to walk_stmt_load_store_ops.
1235 (maybe_set_dependence_info): Refactor as callback for
1236 walk_stmt_load_store_ops.
1237 (compute_dependence_clique): Set restrict info on all stmt kinds.
1238
1239 2018-10-24 Martin Liska <mliska@suse.cz>
1240
1241 * cgraph.c (cgraph_node::dump):
1242 Remove reduntant dumps and make tp_first_run dump more compact.
1243
1244 2018-10-24 Richard Biener <rguenther@suse.de>
1245
1246 PR tree-optimization/87665
1247 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1248 to reflect reality.
1249
1250 2018-10-12 Jeff Law <law@redhat.com>
1251
1252 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1253 for H8/S.
1254
1255 2018-10-23 Richard Biener <rguenther@suse.de>
1256
1257 * tree-vrp.c (add_assert_info): Guard dump_printf with
1258 dump_enabled_p.
1259 * gimple-ssa-evrp-analyze.c
1260 (evrp_range_analyzer::record_ranges_from_incoming_edge):
1261 Use value_range::ignore_equivs_equal_p.
1262
1263 2018-10-23 Richard Biener <rguenther@suse.de>
1264
1265 PR tree-optimization/87105
1266 PR tree-optimization/87608
1267 * passes.def (pass_all_early_optimizations): Add early phi-opt
1268 after dce.
1269 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1270 addition to debug stmts.
1271 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1272 and abs replacement early.
1273 * tree-cfg.c (gimple_empty_block_p): Likewise.
1274
1275 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
1276
1277 PR target/86383
1278 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1279 specified to configure.
1280 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1281
1282 2018-10-23 Richard Biener <rguenther@suse.de>
1283
1284 PR tree-optimization/87700
1285 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1286
1287 2018-10-23 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR target/87674
1290 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1291 second argument from __mmask16 to __mmask8.
1292 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1293 _mm_mask_packs_epi32): Likewise.
1294 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1295 Likewise.
1296 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
1297
1298 2018-10-23 Richard Biener <rguenther@suse.de>
1299
1300 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1301
1302 2018-10-23 Richard Biener <rguenther@suse.de>
1303
1304 PR tree-optimization/86144
1305 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1306 over simd attribute.
1307
1308 2018-10-23 Richard Biener <rguenther@suse.de>
1309
1310 PR tree-optimization/87693
1311 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1312 the case we do not find the taken edge.
1313
1314 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
1315 Jinsong Ji <jji@us.ibm.com>
1316
1317 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1318 (_mm_store_pd): Use unaligned vector type for pointer cast.
1319 (_mm_maskmoveu_si128): Likewise.
1320 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1321 (_mm_store_ps): Use unaligned vector type for pointer cast.
1322
1323 2018-10-22 Paul Koning <ni1d@arrl.net>
1324
1325 * symtab.c (symtab_node::increase_alignment): Correct max
1326 alignment check.
1327
1328 2018-10-22 Yury Gribov <tetra2005@gmail.com>
1329
1330 PR tree-optimization/87633
1331 * match.pd: Do not generate unordered integer comparisons.
1332
1333 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1334
1335 PR rtl-optimization/87600
1336 * combine.c: Add include of expr.h.
1337 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1338 register to a pseudo.
1339 (make_more_copies): New function, add a copy to a new pseudo after
1340 the moves from hard registers into pseudos.
1341 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1342 later. Call make_more_copies.
1343
1344 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
1345
1346 * lra-constraints.c (process_alt_operands): New local array,
1347 matching_early_clobber. Check matching_early_clobber before
1348 decrementing reject, and set matching_early_clobber after.
1349
1350 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1351
1352 PR target/87598
1353 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1354 call output_addr_const and hope for the best.
1355
1356 2018-10-22 Richard Biener <rguenther@suse.de>
1357
1358 * gimple-ssa-evrp-analyze.c
1359 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1360 smarter about what ranges to use.
1361 * tree-vrp.c (add_assert_info): Dump here.
1362 (register_edge_assert_for_2): Instead of here at multiple but
1363 not all places.
1364
1365 * gcc.dg/tree-ssa/evrp12.c: New testcase.
1366 * gcc.dg/predict-6.c: Adjust.
1367 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1368 * gcc.dg/tree-ssa/vrp02.c: Likewise.
1369 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1370
1371 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
1372 Richard Biener <rguenther@suse.de>
1373
1374 * bitmap.h: Update data structure documentation, including a
1375 description of bitmap views as either linked-lists or splay trees.
1376 (struct bitmap_element_def): Update comments for splay tree bitmaps.
1377 (struct bitmap_head_def): Likewise.
1378 (bitmap_list_view, bitmap_tree_view): New prototypes.
1379 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1380 tree_form fields.
1381 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1382 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1383 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1384 released bitmap element here.
1385 (bitmap_element_free): Remove.
1386 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1387 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1388 this function similar ones such that linked-list bitmap implementation
1389 functions are grouped.
1390 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1391 and moved for grouping.
1392 (bitmap_list_insert_element_after): Renamed from
1393 bitmap_elt_insert_after, and moved for grouping.
1394 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1395 (bitmap_tree_link_left, bitmap_tree_link_right,
1396 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1397 bitmap_tree_link_element, bitmap_tree_unlink_element,
1398 bitmap_tree_find_element): New functions for splay-tree bitmap
1399 implementation.
1400 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1401 Renamed and moved, see above entries.
1402 (bitmap_tree_listify_from): New function to convert part of a splay
1403 tree bitmap to a linked-list bitmap.
1404 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1405 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1406 (bitmap_find_bit): Remove.
1407 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1408 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1409 Handle splay tree bitmaps.
1410 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1411 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1412 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1413 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1414 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1415 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1416 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1417 corresponding changes to use linked-list specific bitmap_element
1418 manipulation functions as applicable for efficiency.
1419 (bitmap_tree_to_vec): New function.
1420 (debug_bitmap_elt_file): New function split out from ...
1421 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1422 (bitmap_print): Likewise.
1423
1424 PR tree-optimization/63155
1425 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1426 SSA edge worklists.
1427 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1428 in tree-view.
1429
1430 2018-10-22 Martin Liska <mliska@suse.cz>
1431
1432 PR tree-optimization/87686
1433 Revert
1434 2018-08-29 Martin Liska <mliska@suse.cz>
1435
1436 * tree-switch-conversion.c (switch_conversion::expand):
1437 Strenghten assumption about gswitch statements.
1438
1439 2018-10-22 Martin Liska <mliska@suse.cz>
1440
1441 * ipa-icf.c (sem_item::compare_attributes): Remove.
1442 (sem_item::compare_referenced_symbol_properties): Use
1443 attribute_list_equal instead.
1444 (sem_function::equals_wpa): Likewise.
1445 * ipa-icf.h: Remove compare_attributes.
1446
1447 2018-10-22 Richard Biener <rguenther@suse.de>
1448
1449 PR middle-end/87682
1450 * mem-stats.h (mem_usage::operator==): Fix pasto.
1451
1452 2018-10-22 Richard Biener <rguenther@suse.de>
1453
1454 PR tree-optimization/87640
1455 * tree-vrp.c (set_value_range_with_overflow): Decompose
1456 incomplete result.
1457 (extract_range_from_binary_expr_1): Adjust.
1458
1459 2018-10-22 Martin Jambor <mjambor@suse.cz>
1460
1461 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1462 (stmt_can_throw_external): Likewise.
1463 (stmt_can_throw_internal): Likewise.
1464 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1465 (lower_eh_constructs_2): Likewise.
1466 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1467 (stmt_can_throw_external): Likewise.
1468 (stmt_can_throw_internal): Likewise.
1469 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1470 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1471 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1472 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1473 (pass_lower_eh_dispatch::execute): Pass cfun to
1474 stmt_can_throw_external.
1475 (cleanup_empty_eh): Likewise.
1476 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1477 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1478 stmt_can_throw_external instead of pushing it to cfun.
1479 (symbol_table::create_edge): Likewise.
1480 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1481 stmt_can_throw_internal.
1482 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1483 to stmt_could_throw_p.
1484 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1485 stmt_can_throw_internal.
1486 (pass_store_merging::execute): Likewise.
1487 * gimple-ssa-strength-reduction.c
1488 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1489 stmt_could_throw_p.
1490 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1491 stmt_can_throw_internal.
1492 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1493 to stmt_can_throw_external.
1494 (check_stmt): Pass cfun to stmt_could_throw_p.
1495 (check_stmt): Pass cfun to stmt_can_throw_external.
1496 (pass_nothrow::execute): Likewise.
1497 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1498 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1499 stmt_can_throw_internal.
1500 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1501 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1502 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1503 * tree-complex.c (expand_complex_libcall): Pass cfun to
1504 stmt_could_throw_p and to stmt_can_throw_internal.
1505 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1506 * tree-inline.c (copy_edges_for_bb): Likewise.
1507 (maybe_move_debug_stmts_to_successors): Likewise.
1508 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1509 stmt_could_throw_p.
1510 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1511 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1512 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1513 stmt_can_throw_internal.
1514 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1515 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1516 stmt_could_throw_p.
1517 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1518 stmt_can_throw_internal.
1519 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1520 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1521 stmt_could_throw_p.
1522 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1523 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1524 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1525 (convert_mult_to_fma_1): Likewise.
1526 (convert_to_divmod): Likewise.
1527 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1528 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1529 * tree-ssa-propagate.c
1530 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1531 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1532 (maybe_optimize_range_tests): Likewise.
1533 (linearize_expr_tree): Likewise.
1534 (reassociate_bb): Likewise.
1535 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1536 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1537 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1538 (handle_char_store): Likewise.
1539 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1540 stmt_can_throw_internal.
1541 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1542 stmt_could_throw_p.
1543 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1544 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1545 (vectorizable_simd_clone_call): Likewise.
1546 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1547 (gimple_stringop_fixed_value): Likewise.
1548
1549 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1550
1551 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1552 literal pool references.
1553 (s390_check_qrst_address): Adapt to the new behavior of
1554 s390_loadrelative_operand_p ().
1555
1556 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1557
1558 PR target/72782
1559 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1560
1561 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1562
1563 PR target/72782
1564 * config/i386/sse.md (*<code><mode>3_bcst): New.
1565
1566 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1567
1568 PR target/72782
1569 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1570 V4DI, V16SI and V8DI.
1571 (*sub<mode>3<mask_name>_bcst): New.
1572 (*add<mode>3<mask_name>_bcst): Likewise.
1573
1574 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1575 Jinsong Ji <jji@us.ibm.com>
1576
1577 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1578 __m64 with __vector unsigned long long for compatibility.
1579 (_mm_movemask_epi8): Likewise.
1580 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1581 (_mm_cvttps_pi32): Likewise.
1582 (_mm_cvtpi32_ps): Likewise.
1583 (_mm_cvtps_pi16): Likewise.
1584 (_mm_loadh_pi): Likewise.
1585 (_mm_storeh_pi): Likewise.
1586 (_mm_movehl_ps): Likewise.
1587 (_mm_movelh_ps): Likewise.
1588 (_mm_loadl_pi): Likewise.
1589 (_mm_storel_pi): Likewise.
1590 (_mm_movemask_ps): Likewise.
1591 (_mm_shuffle_pi16): Likewise.
1592
1593 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1594
1595 PR target/72782
1596 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1597 __builtin_ia32_vfnmsubpd512_mask.
1598 (_mm512_mask_fnmsub_round_pd): Likewise.
1599 (_mm512_fnmsub_pd): Likewise.
1600 (_mm512_mask_fnmsub_pd): Likewise.
1601 (_mm512_maskz_fnmsub_round_pd): Use
1602 __builtin_ia32_vfnmsubpd512_maskz.
1603 (_mm512_maskz_fnmsub_pd): Likewise.
1604 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1605 (_mm512_mask_fnmsub_round_ps): Likewise.
1606 (_mm512_fnmsub_ps): Likewise.
1607 (_mm512_mask_fnmsub_ps): Likewise.
1608 (_mm512_maskz_fnmsub_round_ps): Use
1609 __builtin_ia32_vfnmsubps512_maskz.
1610 (_mm512_maskz_fnmsub_ps): Likewise.
1611 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1612 __builtin_ia32_vfnmsubpd256_mask.
1613 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1614 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1615 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1616 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1617 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1618 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1619 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1620 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1621 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1622 __builtin_ia32_vfnmsubpd.
1623 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1624 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1625 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1626 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1627 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1628 * config/i386/i386-builtin.def: Add
1629 __builtin_ia32_vfnmsubpd256_mask,
1630 __builtin_ia32_vfnmsubpd256_maskz,
1631 __builtin_ia32_vfnmsubpd128_mask,
1632 __builtin_ia32_vfnmsubpd128_maskz,
1633 __builtin_ia32_vfnmsubps256_mask,
1634 __builtin_ia32_vfnmsubps256_maskz,
1635 __builtin_ia32_vfnmsubps128_mask,
1636 __builtin_ia32_vfnmsubps128_maskz,
1637 __builtin_ia32_vfnmsubpd512_mask,
1638 __builtin_ia32_vfnmsubpd512_maskz,
1639 __builtin_ia32_vfnmsubps512_mask,
1640 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1641 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1642 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1643 __builtin_ia32_vfnmsubpd256.
1644 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1645 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1646 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1647 Likewise.
1648 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1649 Likewise.
1650 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1651 Likewise.
1652 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1653
1654 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1655
1656 PR target/72782
1657 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1658 __builtin_ia32_vfnmaddpd512_mask.
1659 (_mm512_mask_fnmadd_round_pd): Likewise.
1660 (_mm512_fnmadd_pd): Likewise.
1661 (_mm512_mask_fnmadd_pd): Likewise.
1662 (_mm512_maskz_fnmadd_round_pd): Use
1663 __builtin_ia32_vfnmaddpd512_maskz.
1664 (_mm512_maskz_fnmadd_pd): Likewise.
1665 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1666 (_mm512_mask_fnmadd_round_ps): Likewise.
1667 (_mm512_fnmadd_ps): Likewise.
1668 (_mm512_mask_fnmadd_ps): Likewise.
1669 (_mm512_maskz_fnmadd_round_ps): Use
1670 __builtin_ia32_vfnmaddps512_maskz.
1671 (_mm512_maskz_fnmadd_ps): Likewise.
1672 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1673 __builtin_ia32_vfnmaddpd256_mask.
1674 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1675 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1676 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1677 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1678 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1679 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1680 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1681 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1682 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1683 __builtin_ia32_vfnmaddpd.
1684 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1685 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1686 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1687 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1688 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1689 * config/i386/i386-builtin.def: Add
1690 __builtin_ia32_vfnmaddpd256_mask,
1691 __builtin_ia32_vfnmaddpd256_maskz,
1692 __builtin_ia32_vfnmaddpd128_mask,
1693 __builtin_ia32_vfnmaddpd128_maskz,
1694 __builtin_ia32_vfnmaddps256_mask,
1695 __builtin_ia32_vfnmaddps256_maskz,
1696 __builtin_ia32_vfnmaddps128_mask,
1697 __builtin_ia32_vfnmaddps128_maskz,
1698 __builtin_ia32_vfnmaddpd512_mask,
1699 __builtin_ia32_vfnmaddpd512_maskz,
1700 __builtin_ia32_vfnmaddps512_mask,
1701 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1702 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1703 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1704 __builtin_ia32_vfnmaddpd256.
1705 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1706 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1707 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1708 Likewise.
1709 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1710 Likewise.
1711 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1712 Likewise.
1713 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1714
1715 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1716
1717 PR target/72782
1718 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1719 __builtin_ia32_vfmsubpd512_mask.
1720 (_mm512_mask_fmsub_round_pd): Likewise.
1721 (_mm512_fmsub_pd): Likewise.
1722 (_mm512_mask_fmsub_pd): Likewise.
1723 (_mm512_maskz_fmsub_round_pd): Use
1724 __builtin_ia32_vfmsubpd512_maskz.
1725 (_mm512_maskz_fmsub_pd): Likewise.
1726 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1727 (_mm512_mask_fmsub_round_ps): Likewise.
1728 (_mm512_fmsub_ps): Likewise.
1729 (_mm512_mask_fmsub_ps): Likewise.
1730 (_mm512_maskz_fmsub_round_ps): Use
1731 __builtin_ia32_vfmsubps512_maskz.
1732 (_mm512_maskz_fmsub_ps): Likewise.
1733 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1734 __builtin_ia32_vfmsubpd256_mask.
1735 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1736 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1737 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1738 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1739 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1740 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1741 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1742 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1743 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1744 __builtin_ia32_vfmsubpd.
1745 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1746 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1747 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1748 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1749 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1750 * config/i386/i386-builtin.def: Add
1751 __builtin_ia32_vfmsubpd256_mask,
1752 __builtin_ia32_vfmsubpd256_maskz,
1753 __builtin_ia32_vfmsubpd128_mask,
1754 __builtin_ia32_vfmsubpd128_maskz,
1755 __builtin_ia32_vfmsubps256_mask,
1756 __builtin_ia32_vfmsubps256_maskz,
1757 __builtin_ia32_vfmsubps128_mask,
1758 __builtin_ia32_vfmsubps128_maskz,
1759 __builtin_ia32_vfmsubpd512_mask,
1760 __builtin_ia32_vfmsubpd512_maskz,
1761 __builtin_ia32_vfmsubps512_mask,
1762 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1763 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1764 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1765 __builtin_ia32_vfmsubpd256.
1766 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1767 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1768 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1769 Likewise.
1770 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1771 Likewise.
1772 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1773 Likewise.
1774 (fmai_vmfmsub_<mode><round_name>): Likewise.
1775
1776 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1777
1778 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1779 Remove plus. Renamed to ...
1780 (*sub<mode>3<mask_name>_bcst): This.
1781 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1782 (*add<mode>3<mask_name>_bcst): This.
1783
1784 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1785
1786 PR target/72782
1787 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1788
1789 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1790
1791 PR target/87662
1792 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1793 (_mm_or_epi32): Likewise.
1794 (_mm256_xor_epi32): Likewise.
1795 (_mm_xor_epi32): Likewise.
1796 (_mm256_or_epi64): Likewise.
1797 (_mm_or_epi64): Likewise.
1798 (_mm256_xor_epi64): Likewise.
1799 (_mm_xor_epi64): Likewise.
1800
1801 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1802
1803 PR target/72782
1804 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1805
1806 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1807
1808 PR middle-end/87647
1809 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1810
1811 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1812
1813 * doc/ux.texi: Move @section directly after @node.
1814
1815 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1816
1817 PR middle-end/85488
1818 PR middle-end/87649
1819 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1820 depend closely nested inside of loop with ordered clause with
1821 a parameter.
1822
1823 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1824
1825 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1826 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1827 * doc/ux.texi: New file.
1828
1829 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1830
1831 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1832 be the first CR field allocated.
1833
1834 2018-10-19 Richard Biener <rguenther@suse.de>
1835
1836 PR target/87657
1837 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1838 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1839
1840 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1841
1842 PR target/72782
1843 * config/i386/sse.md
1844 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1845 (*add<mode>3<mask_name>_bcst_2): Likewise.
1846
1847 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1848
1849 * config/i386/sse.md
1850 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1851 Replace nonimmediate_operand with register_operand.
1852 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1853 Likewise.
1854 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1855 Likewise.
1856
1857 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1858
1859 PR rtl-optimization/87596
1860 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1861 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1862 for instructions in FROM..TO range.
1863
1864 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1865
1866 * cfgexpand.c (expand_one_var): Use specific wording in error message
1867 for non-local frame variables.
1868 * stor-layout.c (layout_decl): Do not issue a warning for them.
1869
1870 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1871
1872 * haifa-sched.c (priority): Add force_recompute parameter.
1873 (apply_replacement): Call priority () with force_recompute = true.
1874 (restore_pattern): Likewise.
1875
1876 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1877
1878 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1879 HOST_BITS_PER_WIDE_INT.
1880 (test_vector_ops_duplicate): Likewise.
1881
1882 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1883
1884 PR target/72782
1885 * config/i386/sse.md (VF_AVX512): New.
1886 (avx512bcst): Likewise.
1887 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1888 Likewise.
1889 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1890 Likewise.
1891 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1892 Likewise.
1893
1894 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1895
1896 * doc/invoke.texi (-dumpversion): Improve grammar.
1897 (-dumpfullversion): Make more consistent with -dumpversion.
1898
1899 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1900
1901 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1902 Set JUMP_LABEL to the jump insn.
1903 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1904 Predict emitted jump and add label to jump insn.
1905
1906 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1907
1908 PR tree-optimization/87562
1909 * input.c (get_substring_ranges_for_loc): Use
1910 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1911 getting the linemap for the endpoint. Verify that it's either
1912 in the same linemap as the start point's spelling location, or
1913 at least in the same file.
1914
1915 2018-10-18 Richard Biener <rguenther@suse.de>
1916
1917 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1918 feed width-specific load/store costs through ix86_vec_cost.
1919 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1920 (k8_cost): Likewise.
1921 (bdver_cost): Likewise.
1922 (znver1_cost): Likewise.
1923 (btver1_cost): Likewise.
1924 (btver2_cost): Likewise.
1925
1926 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1927
1928 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1929 to simplify subreg of vec_merge.
1930
1931 2018-10-18 Richard Biener <rguenther@suse.de>
1932
1933 * config/i386/i386.c: Fix costing of vector FMA.
1934
1935 2018-10-18 Richard Biener <rguenther@suse.de>
1936
1937 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1938 and argument.
1939 (ix86_builtin_vectorization_cost): For vec_construct properly
1940 cost insertion into SSE regs.
1941 (...): Adjust calls to ix86_vec_cost.
1942
1943 2018-10-18 Richard Biener <rguenther@suse.de>
1944
1945 PR middle-end/87087
1946 Revert
1947 2018-02-07 Richard Biener <rguenther@suse.de>
1948
1949 PR tree-optimization/84204
1950 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1951 this place.
1952
1953 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1954
1955 PR target/87537
1956 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1957 of vec_duplicate.
1958 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1959 VEC_MERGE of a VEC_DUPLICATE.
1960
1961 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1962
1963 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1964 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1965 * doc/standards.texi (C Language): Document C2X.
1966 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1967 (rl78_option_override): Handle "GNU C2X" language name.
1968
1969 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1970
1971 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1972 Document C17 as published in 2018.
1973
1974 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1975
1976 PR middle-end/87623
1977 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1978 bail out if both sides do not have the same storage order.
1979
1980 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1981
1982 * bitmap.c (bitmap_head::dump): New.
1983 * bitmap.h (bitmap_head): Add dump().
1984 * gimple-ssa-evrp-analyze.c
1985 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1986 (evrp_range_analyzer::set_ssa_range_info): Same.
1987 (evrp_range_analyzer::record_ranges_from_phis): Same.
1988 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1989 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1990 * gimple-ssa-sprintf.c (get_int_range): Same.
1991 (format_integer): Same.
1992 (sprintf_dom_walker::handle_gimple_call): Same.
1993 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1994 (ipcp_vr_lattice::top_p): Same.
1995 (ipcp_vr_lattice::bottom_p): Same.
1996 (ipcp_vr_lattice::set_to_bottom): Same.
1997 (ipa_vr_operation_and_type_effects): Same.
1998 (propagate_vr_across_jump_function): Same.
1999 (ipcp_store_vr_results): Same.
2000 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
2001 (ipa_print_node_jump_functions_for_edge): Same.
2002 (ipa_get_value_range): Same.
2003 (ipa_compute_jump_functions_for_edge): Same.
2004 (ipa_write_jump_function): Same.
2005 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
2006 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2007 Same.
2008 * vr-values.c (set_value_range_to_nonnegative): Same.
2009 (set_value_range_to_truthvalue): Same.
2010 (vr_values::get_value_range): Same.
2011 (vr_values::set_defs_to_varying): Same.
2012 (vr_values::update_value_range): Same.
2013 (symbolic_range_based_on_p): Same.
2014 (vr_values::op_with_boolean_value_range_p): Same.
2015 (vr_values::extract_range_for_var_from_comparison_expr): Same.
2016 (vr_values::extract_range_from_ssa_name): Same.
2017 (vr_values::extract_range_from_binary_expr): Same.
2018 (vr_values::extract_range_from_unary_expr): Same.
2019 (vr_values::extract_range_from_cond_expr): Same.
2020 (vr_values::extract_range_from_comparison): Same.
2021 (vr_values::check_for_binary_op_overflow): Same.
2022 (vr_values::extract_range_basic): Same.
2023 (vr_values::extract_range_from_assignment): Same.
2024 (compare_ranges): Same.
2025 (compare_range_with_value): Same.
2026 (vr_values::adjust_range_with_scev): Same.
2027 (vrp_valueize): Same.
2028 (vrp_valueize_1): Same.
2029 (vr_values::get_vr_for_comparison): Same.
2030 (vr_values::compare_name_with_value): Same.
2031 (vr_values::compare_names): Same.
2032 (vr_values::vrp_evaluate_conditional): Same.
2033 (find_case_label_ranges): Same.
2034 (vr_values::vrp_visit_switch_stmt): Same.
2035 (vr_values::extract_range_from_phi_node): Same.
2036 (vr_values::simplify_div_or_mod_using_ranges): Same.
2037 (vr_values::simplify_bit_ops_using_ranges): Same.
2038 (test_for_singularity): Same.
2039 (range_fits_type_p): Same.
2040 (vr_values::simplify_cond_using_ranges_1): Same.
2041 (vr_values::simplify_switch_using_ranges): Same.
2042 (vr_values::simplify_float_conversion_using_ranges): Same.
2043 (vr_values::two_valued_val_range_p): Same.
2044 (vr_values::add_equivalence): Move to value_range::equiv_add.
2045 * vr-values.h (vr_values::add_equivalence): Remove.
2046 (VR_INITIALIZER): Remove.
2047 * tree-vrp.c (value_range::set): New.
2048 (value_range::equiv_add): New.
2049 (value_range::value_range): New.
2050 (value_range::deep_copy): New.
2051 (value_range::check): New.
2052 (value_range::equal_p): New.
2053 (value_range::ignore_equivs_equal_p): New.
2054 (value_range::operator==): New.
2055 (value_range::operator!=): New.
2056 (value_range::symbolic_p): New.
2057 (value_range::numeric_p): New.
2058 (value_range::set_undefined): New.
2059 (value_range::set_varying): New.
2060 (value_range::may_contain_p): New.
2061 (value_range::equiv_clear): New.
2062 (value_range::singleton_p): New.
2063 (value_range::intersect): New.
2064 (value_range::dump): New.
2065 (value_range::set_and_canonicalize): New.
2066 (set_value_range): Adjust for value_range API.
2067 (set_value_range_to_undefined): Same.
2068 (set_value_range_to_varying): Same.
2069 (set_and_canonicalize_value_range): Same.
2070 (set_value_range_to_nonnull): Same.
2071 (set_value_range_to_null): Same.
2072 (range_is_null): Same.
2073 (range_is_nonnull): Same.
2074 (range_int_cst_p): Same.
2075 (range_int_cst_singleton_p): Same.
2076 (symbolic_range_p): Same.
2077 (range_includes_zero_p): Same.
2078 (value_range_constant_singleton): Same.
2079 (vrp_set_zero_nonzero_bits): Same.
2080 (ranges_from_anti_range): Same.
2081 (extract_range_into_wide_ints): Same.
2082 (extract_range_from_multiplicative_op): Same.
2083 (set_value_range_with_overflow): Same.
2084 (extract_range_from_binary_expr_1): Same.
2085 (extract_range_from_unary_expr): Same.
2086 (dump_value_range): Same.
2087 (debug_value_range): Same.
2088 (vrp_prop::check_array_ref): Same.
2089 (vrp_prop::check_mem_ref): Same.
2090 (vrp_prop::vrp_initialize): Same.
2091 (vrp_prop::visit_stmt): Same.
2092 (intersect_ranges): Same.
2093 (vrp_prop::visit_phi): Same.
2094 (vrp_prop::vrp_finalize): Same.
2095 (determine_value_range_1): Same.
2096 (determine_value_range): Same.
2097 (vrp_intersect_ranges_1): Rename to...
2098 (vrp_intersect_1): this.
2099 (vrp_intersect_ranges): Rename to...
2100 (value_range::intersect_helper): ...this.
2101 (vrp_meet_1): Rename to...
2102 (value_range::union_helper): ...this.
2103 (vrp_meet): Rename to...
2104 (value_range::union_): ...this.
2105 (copy_value_range): Remove.
2106 * tree-vrp.h (struct value_range): Rewrite into a proper class.
2107 (value_range::vrtype): New.
2108 (value_range::type): New.
2109 (value_range::equiv): New.
2110 (value_range::min): New.
2111 (value_range::max): New.
2112 (value_range::varying_p): New.
2113 (value_range::undefined_p): New.
2114 (value_range::null_p): New.
2115 (value_range::equiv_add): New.
2116 (copy_value_range): Remove.
2117
2118 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2119
2120 * Makefile.in (SELFTEST_TARGETS): New.
2121 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
2122 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2123 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
2124 c/Make-lang.in.
2125 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
2126 (selftest-c++-gdb, selftest-c++-valgrind): Move to
2127 cp/Make-lang.in.
2128 * configure: Regenerate.
2129 * configure.ac (selftest_languages): New.
2130
2131 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2132
2133 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
2134 overflow wraps argument.
2135 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
2136 wide_int_range_multiplicative_op.
2137 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
2138 overflow wraps argument.
2139 (wide_int_range_multiplicative_op): Same.
2140 (wide_int_range_lshift): Same.
2141 (wide_int_range_div): Same.
2142 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
2143 (wide_int_range_lshift): Same.
2144 (wide_int_range_div): Same.
2145
2146 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2147
2148 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
2149 use sign as argument.
2150 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
2151 wide_int_range_shift_undefined_p.
2152
2153 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2154
2155 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
2156 Rename to...
2157 (@despeculate_copy<ALLI_TI:mode>): ... This.
2158 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
2159 switch statement.
2160
2161 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2162
2163 * config.gcc: Obsolete *-*-solaris2.10*.
2164 * doc/install.texi (Specific, *-*-solaris2*): Document it.
2165
2166 2018-10-12 Jeff Law <law@redhat.com>
2167
2168 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2169 reg + sym +- const_int addressing modes.
2170
2171 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2172
2173 * common.opt (fdiagnostics-minimum-margin-width=): New option.
2174 * diagnostic-show-locus.c (layout::layout): Apply the minimum
2175 margin width.
2176 (layout::start_annotation_line): Only print up to 3 of the
2177 margin character, to avoid touching the left-hand side.
2178 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2179 minimum margin width, as set by test_diagnostic_context's ctor.
2180 (selftest::test_fixit_insert_containing_newline): Likewise.
2181 (selftest::test_fixit_insert_containing_newline_2): Likewise.
2182 (selftest::test_line_numbers_multiline_range): Clear
2183 dc.min_margin_width.
2184 * diagnostic.c (diagnostic_initialize): Initialize
2185 min_margin_width.
2186 * diagnostic.h (struct diagnostic_context): Add field
2187 "min_margin_width".
2188 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2189 * opts.c (common_handle_option): Handle
2190 OPT_fdiagnostics_minimum_margin_width_.
2191 * selftest-diagnostic.c
2192 (selftest::test_diagnostic_context::test_diagnostic_context):
2193 Initialize min_margin_width to 6.
2194 * toplev.c (general_init): Initialize global_dc->min_margin_width.
2195
2196 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2197
2198 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2199 Fix usage of "error_at_rich_loc" in the comment.
2200
2201 2018-10-15 Renlin Li <renlin.li@arm.com>
2202
2203 PR target/87563
2204 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2205 if-conversioned loop when it contains ifn with types not
2206 supported by backend.
2207 * internal-fn.c (expand_direct_optab_fn): Add an assert.
2208 (direct_internal_fn_supported_p): New helper function.
2209 * internal-fn.h (direct_internal_fn_supported_p): Declare.
2210
2211 2018-10-15 Jakub Jelinek <jakub@redhat.com>
2212
2213 PR target/87572
2214 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2215 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2216 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2217
2218 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2219
2220 PR tree-optimization/87022
2221 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2222 bits in dist vector rather than the first one.
2223
2224 2018-10-15 Richard Biener <rguenther@suse.de>
2225
2226 PR middle-end/87610
2227 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2228 (visit_loadstore): When a used restrict tag escaped verify that
2229 the points-to solution of "other" pointers do not include
2230 escaped.
2231 (compute_dependence_clique): If a used restrict tag escaped
2232 communicated that down to visit_loadstore.
2233
2234 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2235
2236 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2237 into reg if it isn't a general operand.
2238
2239 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2240
2241 PR target/87599
2242 * config/i386/sse.md (*vec_dupv2di): Add register source to
2243 movddup.
2244
2245 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2246
2247 PR target/87572
2248 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2249 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2250 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2251 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2252
2253 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
2254
2255 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2256 (notice_args_size): Set it in the current trace if no insn that can
2257 throw internally has been seen yet.
2258 (connect_traces): When connecting args_size between traces, allow the
2259 incoming values not to match if there is an insn setting it before the
2260 first insn that can throw internally; in that case, force the creation
2261 of a CFI note on this latter insn.
2262
2263 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
2264
2265 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2266 the base class, because using the injected-class-name was not clearly
2267 specified until DR 176.
2268
2269 2018-10-12 Paul Koning <ni1d@arrl.net>
2270
2271 * config/pdp11/pdp11.md (doloop_end): New expander.
2272 (doloop_end_insn): renamed from "doloop_end".
2273 (addqi3): New pattern.
2274 (subqi3): New pattern.
2275 * config/pdp11/predicates.md (incdec_operand): New predicate.
2276
2277 2018-10-12 Yury Gribov <tetra2005@gmail.com>
2278
2279 PR middle-end/81376
2280 * real.c (format_helper::can_represent_integral_type_p): New function
2281 * real.h (format_helper::can_represent_integral_type_p): Ditto.
2282 * match.pd: New pattern.
2283
2284 2018-10-12 Alexandre Oliva <oliva@adacore.com>
2285
2286 * configure.ac: Introduce --enable-large-address-aware
2287 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2288 * doc/install.texi: Document it.
2289 * configure, config.in: Rebuilt.
2290 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2291 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2292 (LINK_SPEC): Insert it.
2293 * config/i386/mingw-w64.h: Likewise.
2294
2295 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2296
2297 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
2298
2299 PR rtl-optimization/87600
2300 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2301
2302 2018-10-12 Paul Koning <ni1d@arrl.net>
2303
2304 * doc/md.texi (doloop_end): Document that the pattern code may
2305 need to check operand mode.
2306
2307 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
2308
2309 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2310 to zero-extend between int and floating-point registers.
2311 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2312 ldp into floating-point registers. Add type and arch attributes.
2313 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2314 Use f_loads for type attribute.
2315
2316 2018-10-11 Martin Sebor <msebor@redhat.com>
2317
2318 * doc/extend.texi (attribute packed): Correct typos.
2319
2320 2018-10-11 Martin Sebor <msebor@redhat.com>
2321
2322 * doc/extend.texi (attribute flatten): Mention interaction with
2323 noinline.
2324
2325 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2326
2327 PR target/87156
2328 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2329 Set new_decl virtual flag to zero.
2330
2331 2018-10-11 Martin Sebor <msebor@redhat.com>
2332
2333 PR middle-end/87593
2334 * doc/extend.texi (attribute format_arg): Discuss using multiple
2335 attributes on a single function.
2336
2337 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
2338
2339 PR tree-optimization/86829
2340 * match.pd (sin (atan (x))): New simplification rules.
2341 (cos (atan (x))): Likewise.
2342 * real.c (build_sinatan_real): New function.
2343 * real.h (build_sinatan_real): Prototype.
2344
2345 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
2346
2347 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2348 function.
2349 (fold_mergeeo_helper): New helper function.
2350 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2351 intrinsics. Correct some whitespace indentation issues.
2352
2353 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
2354
2355 PR target/87511
2356 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2357 Use HOST_WIDE_INT_1U for shift.
2358
2359 2018-10-11 Doug Rupp <rupp@adacore.com>
2360 Olivier Hainque <hainque@adacore.com>
2361
2362 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2363 Pass --relax to the linker for RTPs.
2364 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2365
2366 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
2367 Jan Hubicka <jh@suse.cz>
2368 Martin Jambor <mjambor@suse.cz>
2369
2370 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2371 the same elements are repeated rather than printing all of them.
2372 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2373 "repeated" elements.
2374 * read-rtl-function.c (test_loading_repeat): New function.
2375 (read_rtl_function_c_tests): Call test_loading_repeat.
2376 * rtl-tests.c (test_dumping_repeat): New function.
2377 (rtl_tests_c_tests): Call test_dumping_repeat.
2378
2379 2018-10-11 Richard Biener <rguenther@suse.de>
2380
2381 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2382 bdver?_cost): Unify to ...
2383 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2384 * config/i386/i386.c (processor_cost_table): Adjust.
2385
2386 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2387
2388 PR middle-end/87574
2389 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2390 the thunk when expanding to GIMPLE.
2391
2392 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2393
2394 * varasm.c (mergeable_string_section): Don't try to move zero-length
2395 strings to the merge section.
2396
2397 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2398
2399 PR target/87573
2400 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2401
2402 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2403
2404 PR target/87550
2405 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2406 to special_args set.
2407
2408 2018-10-10 Richard Biener <rguenther@suse.de>
2409
2410 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2411 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2412 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2413 and recursing and pattern terminating the recursion on SSE
2414 vector width using ix86_expand_reduc.
2415 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2416 width and recursing and SSE2 vector variant doing the final
2417 reduction with ix86_expand_reduc.
2418 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2419 with terminating the recursion at AVX level, splitting that
2420 to SSE there.
2421
2422 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2423
2424 * genmatch.c (error_cb): Rename to...
2425 (diagnostic_cb): ...this, converting int params to enums.
2426 (fatal_at): Update for renaming.
2427 (warning_at): Likewise.
2428 (main): Likewise.
2429 * input.c (selftest::ebcdic_execution_charset::apply):
2430 Update for renaming of...
2431 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2432 to...
2433 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2434 converting level and reason to enums.
2435 (class selftest::lexer_error_sink): Rename to...
2436 (class selftest::lexer_test_options): ...this, renaming field
2437 "m_errors" to "m_diagnostics".
2438 (selftest::lexer_test_options::apply): Update for renaming of...
2439 (selftest::lexer_test_options::on_error): ...this, renaming to...
2440 (selftest::lexer_test_options::on_diagnostic): ...this
2441 converting level and reason to enums.
2442 (selftest::test_lexer_string_locations_raw_string_unterminated):
2443 Update for renamings.
2444 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2445 "reason".
2446
2447 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2448
2449 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2450 * config/rs6000/pmmintrin.h: New file.
2451
2452 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2453
2454 PR tree-optimization/86659
2455 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2456
2457 2018-10-09 Richard Biener <rguenther@suse.de>
2458
2459 PR tree-optimization/63155
2460 * tree-ssa-structalias.c: Include tree-ssa.h.
2461 (get_constraint_for_ssa_var): For undefs return nothing_id.
2462 (find_func_aliases): Cleanup PHI handling.
2463
2464 2018-10-09 Richard Biener <rguenther@suse.de>
2465
2466 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2467 replacements.
2468
2469 2018-10-09 Martin Liska <mliska@suse.cz>
2470
2471 * asan.c (asan_emit_stack_protection): If a stack variable
2472 is located in a same file as current function, then emit
2473 line info into variable definition string.
2474
2475 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2476
2477 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2478 information.
2479
2480 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2481
2482 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2483 on the thunk.
2484
2485 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2486
2487 PR tree-optimization/86659
2488 * gimple-match.h (struct gimple_match_op): Add reverse field.
2489 (gimple_match_op::set_op): New overloaded method.
2490 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2491 the REF_REVERSE_STORAGE_ORDER flag on the value.
2492 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2493 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2494
2495 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2496
2497 PR middle-end/63155
2498 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2499 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2500
2501 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2502
2503 PR target/87517
2504 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2505 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2506
2507 2018-10-08 Richard Biener <rguenther@suse.de>
2508
2509 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2510 cost the same as AVX128 ones.
2511
2512 2018-10-08 Paul Koning <ni1d@arrl.net>
2513
2514 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2515 (expand_block_move): New function.
2516 * config/pdp11/pdp11.c (output_block_move): Remove.
2517 (expand_block_move): New function.
2518 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2519 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2520 (*movmemhi1): Remove.
2521
2522 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2523
2524 * config/s390/2827.md: Increase latencies for some FP instructions.
2525
2526 2018-10-08 Richard Biener <rguenther@suse.de>
2527
2528 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2529 Open a dump scope.
2530 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2531 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2532 (add_stmt_cost): Dump return value of the hook.
2533
2534 2018-10-08 Richard Biener <rguenther@suse.de>
2535
2536 PR tree-optimization/63155
2537 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2538 (ssa_propagation_engine::ssa_propagate): Remove redundant
2539 bitmap bit clearing.
2540
2541 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2542
2543 PR rtl-optimization/86939
2544 PR rtl-optimization/87479
2545 * ira.h (non_conflicting_reg_copy_p): New prototype.
2546 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2547 (make_hard_regno_dead): Don't add conflicts for register
2548 ignore_reg_for_conflicts.
2549 (make_object_dead): Likewise.
2550 (non_conflicting_reg_copy_p): New function.
2551 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2552 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2553 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2554 (make_hard_regno_dead): Don't add conflicts for register
2555 ignore_reg_for_conflicts. Remove special conflict handling of
2556 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2557 check_pic_pseudo_p and update callers.
2558 (mark_pseudo_dead): Don't add conflicts for register
2559 ignore_reg_for_conflicts.
2560 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2561
2562 2018-10-05 Andrew Waterman <andrew@sifive.com>
2563 Jim Wilson <jimw@sifive.com>
2564
2565 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2566 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2567 new pattern using HONOR_SNANS that emits one extra instruction.
2568
2569 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2570
2571 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2572 patterns): Merge SI and DI patterns to a GPR pattern.
2573 (unnamed define_insn and define_split for record form of that): Merge
2574 to a single define_insn_and_split pattern.
2575
2576 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2577
2578 PR c++/56856
2579 * input.c (expand_location_to_spelling_point): Add param "aspect"
2580 and use rather than hardcoding LOCATION_ASPECT_CARET.
2581 (get_substring_ranges_for_loc): Handle the case of a single token
2582 within a macro expansion.
2583 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2584 defaulting to LOCATION_ASPECT_CARET.
2585
2586 2018-10-05 Paul Koning <ni1d@arrl.net>
2587
2588 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2589 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2590 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2591 (pdp11_guard_type): New function.
2592
2593 2018-10-05 Paul Koning <ni1d@arrl.net>
2594
2595 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2596 * config/pdp11/pdp11.opt (mfloat32): Remove.
2597 (mfloat64): Remove.
2598 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2599 (pdp11 -mfloat64): Remove.
2600
2601 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2602
2603 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2604 (*cmp<mode>_cc_i387): Ditto.
2605 (*cmpu<mode>_cc_i387): Ditto.
2606 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2607 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2608 "scratch" argument.
2609 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2610 Emit x86_sahf_1 pattern.
2611 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2612 (ix86_expand_carry_flag_compare): Ditto.
2613
2614 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2615
2616 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2617 to reg_or_0_operand. Add "C" constraint.
2618 (*cmpxf_cc_i387): Ditto.
2619 (*cmp<mode>_i387): Change operand 2 predicate
2620 to nonimm_or_0_operand. Add "C" constraint.
2621 (*cmp<mode>_cc_i387): Ditto.
2622 (*cmp<mode>_0_i387): Remove insn pattern.
2623 (*cmp<mode>_0_cc_i387): Ditto.
2624
2625 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2626
2627 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2628 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2629 from vector_move_operand. Update all uses.
2630
2631 2018-10-05 Martin Sebor <msebor@redhat.com>
2632
2633 PR tree-optimization/87490
2634 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2635 consistently.
2636
2637 2018-10-05 Richard Biener <rguenther@suse.de>
2638
2639 PR tree-optimization/63155
2640 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2641 vertical space in dumpfiles.
2642 * tree-ssa-propagate.h
2643 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2644 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2645 (ssa_edge_worklist_back): Likewise.
2646 (curr_order): Likewise.
2647 (cfg_blocks_get): Remove abstraction.
2648 (cfg_blocks_add): Likewise.
2649 (cfg_blocks_empty_p): Likewise.
2650 (add_ssa_edge): Add to current or next worklist based on
2651 RPO index.
2652 (add_control_edge): Likewise.
2653 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2654 into ...
2655 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2656 iteration from CFG and SSA edge worklist so we process
2657 everything in RPO order, prioritizing forward progress
2658 over iteration.
2659 (ssa_prop_init): Allocate new worklists, do not dump
2660 immediate uses.
2661 (ssa_prop_fini): Free new worklists.
2662
2663 2018-10-05 Richard Biener <rguenther@suse.de>
2664
2665 * tree-core.h (tree_block::abstract_flag): Remove.
2666 (tree_block::block_num): Make full 32bits.
2667 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2668 * tree.h (BLOCK_ABSTRACT): Remove.
2669 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2670 resulting from BLOCK_ABSTRACT being always false.
2671 (gen_inlined_subroutine_die): Likewise.
2672 (gen_block_die): Likewise.
2673 * tree.c (block_ultimate_origin): Likewise.
2674 * tree-pretty-print.c (dump_block_node): Remove code dealing
2675 with BLOCK_ABSTRACT.
2676 * tree-ssa-live.c (dump_scope_block): Likewise.
2677 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2678 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2679
2680 2018-10-05 Richard Biener <rguenther@suse.de>
2681
2682 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2683 is asked for initialize mode to the component mode of the
2684 vector type.
2685
2686 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2687
2688 PR target/87522
2689 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2690 assembler for -mavx.
2691 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2692
2693 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2694
2695 PR target/87509
2696 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2697 RS6000_BTM_DFP.
2698 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2699 to be DImode. When using mffscrn, force the operand to a register.
2700
2701 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2702
2703 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2704 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2705 X87MODEF mode iterator.
2706 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2707 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2708 X87MODEF mode iterator.
2709
2710 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2711
2712 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2713 -Wno-prio-ctor-dtor.
2714
2715 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2716
2717 * Makefile.in (OBJS): Add opt-problem.o.
2718 * dump-context.h: Include "selftest.h.
2719 (selftest::temp_dump_context): New forward decl.
2720 (class dump_context): Make friend of class
2721 selftest::temp_dump_context.
2722 (dump_context::dump_loc_immediate): New decl.
2723 (class dump_pretty_printer): Move here from dumpfile.c.
2724 (class temp_dump_context): Move to namespace selftest.
2725 (temp_dump_context::temp_dump_context): Add param
2726 "forcibly_enable_dumping".
2727 (selftest::verify_dumped_text):
2728 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2729 (selftest::verify_item):
2730 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2731 (ASSERT_IS_TREE): Likewise.
2732 (ASSERT_IS_GIMPLE): Likewise.
2733 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2734 to...
2735 (dump_context::dump_loc_immediate): ...this new function.
2736 (class dump_pretty_printer): Move to dump-context.h.
2737 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2738 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2739 (temp_dump_context::temp_dump_context): Move to "selftest"
2740 namespace. Add param "forcibly_enable_dumping", and use it to
2741 conditionalize the use of m_pp;
2742 (selftest::verify_dumped_text): Make non-static.
2743 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2744 (selftest::verify_item): Make non-static.
2745 (ASSERT_IS_TEXT): Move to dump-context.h.
2746 (ASSERT_IS_TREE): Likewise.
2747 (ASSERT_IS_GIMPLE): Likewise.
2748 (selftest::test_capture_of_dump_calls): Pass "true" for new
2749 param of temp_dump_context.
2750 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2751 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2752 TDF_COMPARE_DEBUG.
2753 * opt-problem.cc: New file.
2754 * opt-problem.h: New file.
2755 * optinfo-emit-json.cc
2756 (selftest::test_building_json_from_dump_calls): Pass "true" for
2757 new param of temp_dump_context.
2758 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2759 (optinfo::emit_for_opt_problem): New function.
2760 (optinfo::emit): Clarity which emit_item is used.
2761 * optinfo.h (optinfo::get_dump_location): New accessor.
2762 (optinfo::emit_for_opt_problem): New decl.
2763 (optinfo::emit): Make const.
2764 * selftest-run-tests.c (selftest::run_tests): Call
2765 selftest::opt_problem_cc_tests.
2766 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2767 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2768 bool to opt_result, converting fprintf messages to
2769 opt_result::failure_at calls. Add "stmt" param for use by the
2770 failure_at calls.
2771 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2772 (runtime_alias_check_p): Convert return type from bool to
2773 opt_result, converting dump_printf calls to
2774 opt_result::failure_at, using the statement DDR_A for their
2775 location.
2776 (find_data_references_in_stmt): Convert return type from bool to
2777 opt_result, converting "return false" to opt_result::failure_at
2778 with a new message.
2779 * tree-data-ref.h: Include "opt-problem.h".
2780 (dr_analyze_innermost): Convert return type from bool to opt_result,
2781 and add a const gimple * param.
2782 (find_data_references_in_stmt): Convert return type from bool to
2783 opt_result.
2784 (runtime_alias_check_p): Likewise.
2785 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2786 dr_analyze_innermost.
2787 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2788 Convert return type from bool to opt_result, adding a message for
2789 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2790 (vect_analyze_data_ref_dependence): Convert return type from bool
2791 to opt_result. Change sense of return type from "false"
2792 effectively meaning "no problems" to "false" meaning a problem,
2793 so that "return false" becomes "return opt_result::success".
2794 Convert "return true" calls to opt_result::failure_at, using
2795 the location of statement A rather than vect_location.
2796 (vect_analyze_data_ref_dependences): Convert return type from bool
2797 to opt_result.
2798 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2799 calls to opt_result::failure_at, using the stmt location rather
2800 than vect_location.
2801 (vect_verify_datarefs_alignment): Convert return type from bool
2802 to opt_result.
2803 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2804 into multiple more-tightly-scoped copies.
2805 (vect_analyze_data_refs_alignment): Convert return type from bool
2806 to opt_result.
2807 (vect_analyze_data_ref_accesses): Likewise, converting a
2808 "return false" to a "return opt_result::failure_at", adding a
2809 new message.
2810 (vect_prune_runtime_alias_test_list): Convert return type from
2811 bool to opt_result, converting dump_printf_loc to
2812 opt_result::failure_at. Add a %G to show the pertinent statement,
2813 and use the stmt's location rather than vect_location.
2814 (vect_find_stmt_data_reference): Convert return type from
2815 bool to opt_result, converting dump_printf_loc to
2816 opt_result::failure_at, using stmt's location.
2817 (vect_analyze_data_refs): Convert return type from bool to
2818 opt_result. Convert "return false" to "return
2819 opt_result::failure_at", adding messages as needed.
2820 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2821 type from bool to opt_result.
2822 (vect_determine_vf_for_stmt): Likewise.
2823 (vect_determine_vectorization_factor): Likewise, converting
2824 dump_printf_loc to opt_result::failure_at, using location of phi
2825 rather than vect_location.
2826 (vect_analyze_loop_form_1): Convert return type from bool to
2827 opt_result, converting dump_printf_loc calls, retaining the use of
2828 vect_location.
2829 (vect_analyze_loop_form): Convert return type from loop_vec_info
2830 to opt_loop_vec_info.
2831 (vect_analyze_loop_operations): Convert return type from bool to
2832 opt_result, converting dump_printf_loc calls, using the location
2833 of phi/stmt rather than vect_location where available. Convert
2834 various "return false" to "return opt_result::failure_at" with
2835 "unsupported phi" messages.
2836 (vect_get_datarefs_in_loop): Convert return type from bool to
2837 opt_result. Add a message for the
2838 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2839 (vect_analyze_loop_2): Convert return type from bool to
2840 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2841 each "goto again;", adding new messages where needed.
2842 Add "unsupported grouped {store|load}" messages.
2843 (vect_analyze_loop): Convert return type from loop_vec_info to
2844 opt_loop_vec_info.
2845 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2846 bool to opt_result.
2847 * tree-vect-stmts.c (process_use): Likewise, converting
2848 dump_printf_loc call and using stmt location, rather than
2849 vect_location.
2850 (vect_mark_stmts_to_be_vectorized): Likeise.
2851 (vect_analyze_stmt): Likewise, adding a %G.
2852 (vect_get_vector_types_for_stmt): Convert return type from bool to
2853 opt_result, converting dump_printf_loc calls and using stmt
2854 location, rather than vect_location.
2855 (vect_get_mask_type_for_stmt): Convert return type from tree to
2856 opt_tree, converting dump_printf_loc calls and using stmt location.
2857 * tree-vectorizer.c: Include "opt-problem.h.
2858 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2859 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2860 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2861 enabled, use it to report at the top level "couldn't vectorize
2862 loop" followed by the problem.
2863 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2864 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2865 to opt_result.
2866 (vect_analyze_stmt): Likewise.
2867 (vect_get_vector_types_for_stmt): Likewise.
2868 (tree vect_get_mask_type_for_stmt): Likewise.
2869 (vect_analyze_data_ref_dependences): Likewise.
2870 (vect_enhance_data_refs_alignment): Likewise.
2871 (vect_analyze_data_refs_alignment): Likewise.
2872 (vect_verify_datarefs_alignment): Likewise.
2873 (vect_analyze_data_ref_accesses): Likewise.
2874 (vect_prune_runtime_alias_test_list): Likewise.
2875 (vect_find_stmt_data_reference): Likewise.
2876 (vect_analyze_data_refs): Likewise.
2877 (vect_analyze_loop): Convert return type from loop_vec_info to
2878 opt_loop_vec_info.
2879 (vect_analyze_loop_form): Likewise.
2880 (vect_analyze_slp): Convert return type from bool to opt_result.
2881
2882 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2883
2884 * doc/invoke.texi (-fopt-info): Document new "internals"
2885 sub-option.
2886 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2887 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2888 MSG_ALL_KINDS.
2889 (optinfo_verbosity_options): Add "internals".
2890 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2891 (dump_context::apply_dump_filter_p): New member function.
2892 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2893 explicitly masking the dump_kind.
2894 (dump_context::begin_scope): Increment the scope depth first. Use
2895 apply_dump_filter_p rather than explicitly masking the dump_kind.
2896 (dump_context::emit_item): Use apply_dump_filter_p rather than
2897 explicitly masking the dump_kind.
2898 (dump_dec): Likewise.
2899 (dump_hex): Likewise.
2900 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2901 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2902 (opt_info_switch_p): Update handling of default
2903 MSG_OPTIMIZED_LOCATIONS to cope with default of
2904 MSG_PRIORITY_USER_FACING.
2905 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2906 masking the dump_kind.
2907 (selftest::test_capture_of_dump_calls): Update test_dump_context
2908 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2909 than MSG_ALL. Generalize scope test to be run at all four
2910 combinations of with/without MSG_PRIORITY_USER_FACING and
2911 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2912 for each of the two values.
2913 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2914 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2915 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2916 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2917 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2918 with MSG_PRIORITY_*.
2919 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2920 dump messages as MSG_PRIORITY_USER_FACING.
2921 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2922 about the interaction with MSG_PRIORITY_*.
2923
2924 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2925
2926 * varasm.c (output_constant): Add new parameter merge_strings.
2927 Make strings properly zero terminated in merge string sections.
2928 (mergeable_string_section): Don't fail if the last char is non-zero.
2929 (assemble_variable_contents): Handle merge string sections.
2930 (assemble_variable): Likewise.
2931 (assemble_constant_contents): Likewise.
2932 (output_constant_def_contents): Likewise.
2933 (output_constructor_array_range,
2934 output_constructor_regular_field): Adjust call to output_constant.
2935 (output_object_block): Adjust call to assemble_constant_contents
2936 and assemble_variable_contents.
2937
2938 2018-10-04 Martin Liska <mliska@suse.cz>
2939
2940 PR c/87483
2941 * cgraphunit.c (process_function_and_variable_attributes):
2942 Warn about a function with alias attribute and a body.
2943
2944 2018-10-04 Martin Liska <mliska@suse.cz>
2945
2946 PR ipa/82625
2947 * multiple_target.c (redirect_to_specific_clone): New function.
2948 (ipa_target_clone): Use it.
2949 * tree-inline.c: Fix comment.
2950
2951 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2952
2953 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2954 fields.
2955 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2956 (gcc::dump_manager::register_pass): New member function, adapted
2957 from loop body in gcc::pass_manager::register_pass, adding a
2958 call to update_dfi_for_opt_info.
2959 (gcc::dump_manager::opt_info_enable_passes): Store the
2960 -fopt-info options into the new fields. Move the loop
2961 bodies into...
2962 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2963 function.
2964 * dumpfile.h (struct opt_pass): New forward decl.
2965 (gcc::dump_manager::register_pass): New decl.
2966 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2967 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2968 "m_optinfo_flags", and "m_optinfo_filename".
2969 * passes.c (gcc::pass_manager::register_pass): Move all of the
2970 dump-handling code to gcc::dump_manager::register_pass.
2971
2972 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2973
2974 PR rtl-optimization/87466
2975 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2976 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2977 * doc/tm.texi: Regenerate.
2978 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2979 * lra-lives.c (process_bb_lives): Likewise.
2980 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2981 Define.
2982
2983 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2984
2985 * params.c (add_params): Fix initialization.
2986
2987 2018-10-04 Martin Liska <mliska@suse.cz>
2988
2989 PR gcov-profile/84107
2990 * tree-profile.c (init_ic_make_global_vars):
2991 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2992 Come up with new ic_tuple* variables. Emit
2993 __gcov_indirect_call{,_topn} variables.
2994 (gimple_gen_ic_profiler): Access the variable
2995 and emit gimple.
2996 (gimple_gen_ic_func_profiler): Access
2997 __gcov_indirect_call.callee field.
2998 (gimple_init_gcov_profiler): Use ptr_type_node.
2999 * value-prof.c (gimple_ic): Use ptr_type_node.
3000
3001 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3002
3003 PR tree-optimization/85787
3004 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
3005 into this function and add support for detecting multiple phis.
3006 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
3007
3008 2018-10-04 Martin Liska <mliska@suse.cz>
3009
3010 PR ipa/87491
3011 * ipa-inline.c (inline_to_all_callers_1):
3012 Call ultimate_alias_target for node being inlined.
3013
3014 2018-10-03 Jeff Law <law@redhat.com>
3015
3016 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
3017 target's wchar_t.
3018 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
3019 * tree.h (get_typenode_from_name): Prototype.
3020
3021 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3022
3023 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
3024 Change operand 2 predicate to nonimmediate_operand.
3025 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3026
3027 2018-10-03 Martin Sebor <msebor@redhat.com>
3028 Jeff Law <law@redhat.com>
3029
3030 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
3031 initialize it.
3032 (get_string_length): Detect unterminated arrays.
3033 (format_string): Same.
3034 (format_directive): Warn about unterminated arrays.
3035 (handle_gimple_call): Mark statements with no_warning as needed.
3036
3037 2018-10-03 Jim Wilson <jimw@sifive.com>
3038
3039 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
3040 also define __riscv_abi_rve. Delete trailing white space.
3041
3042 2018-10-03 Paul Koning <ni1d@arrl.net>
3043
3044 Enable LRA register allocator for PDP11.
3045 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
3046 (R): Likewise.
3047 (D): Likewise.
3048 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
3049 * config/pdp11/pdp11.opt (-mlra): New option.
3050 * doc/invoke.texi (PDP-11 Options): Document -mlra.
3051
3052 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3053
3054 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
3055 (*<absneg:code>extend<mode>xf2): Ditto.
3056
3057 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3058
3059 PR tree-optimization/87415
3060 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
3061 precision fields.
3062
3063 2018-10-02 Jeff Law <law@redhat.com>
3064
3065 * gimple-fold.c (get_range_strlen): Only set *nonstr when
3066 an unterminated string is discovered. Bubble up range
3067 even for unterminated strings.
3068 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
3069 indicates the string was not terminated via NONSTR.
3070
3071 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3072
3073 * tree-vrp.c (extract_range_from_unary_expr): Special case all
3074 pointer conversions.
3075 Do not do anything special for anti-ranges.
3076
3077 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
3078
3079 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
3080 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
3081
3082 2018-10-03 Martin Liska <mliska@suse.cz>
3083
3084 PR gcov-profile/86109
3085 * coverage.c (coverage_begin_function): Do not
3086 mark lambdas as artificial.
3087 * tree-core.h (struct GTY): Remove tm_clone_flag
3088 and introduce new lambda_function.
3089 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
3090
3091 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3092
3093 PR target/87474
3094 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
3095 P8_VECTOR and VSX are enabled.
3096
3097 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3098
3099 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
3100 0x3907 as CPU model number.
3101
3102 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3103
3104 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
3105 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
3106 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
3107 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
3108 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
3109 * config/s390/s390.md: Likewise. Rename also the cpu attribute
3110 value from arch12 to z14.
3111
3112 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3113
3114 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
3115 (isinfxf2): Ditto.
3116 (isinf<mode>2): Ditto.
3117
3118 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3119
3120 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
3121 before emitting fxam. Perform calculations in XFmode.
3122
3123 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3124
3125 * match.pd (((X /[ex] A) +- B) * A): New transformation.
3126
3127 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3128
3129 PR middle-end/87319
3130 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
3131 * tree.c (signed_or_unsigned_type_for): Handle complex.
3132
3133 2018-10-02 Jeff Law <law@redhat.com>
3134
3135 * gimple-fold.c (get_range_strlen): Remove dead code.
3136
3137 2018-10-02 Martin Sebor <msebor@redhat.com>
3138 Jeff Law <law@redhat.com>
3139
3140 * builtins.c (unterminated_array): Add new arguments.
3141 If argument is not terminated, bubble up size and exact
3142 state to callers.
3143 (expand_builtin_strnlen): Detect, avoid expanding
3144 and diagnose unterminated arrays.
3145 (c_strlen): Fill in offset of start of unterminated strings.
3146 * builtins.h (unterminated_array): Update prototype.
3147
3148 2018-10-02 Richard Biener <rguenther@suse.de>
3149
3150 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
3151 of haddv4df, first reduce to SSE width and exploit the fact
3152 that we only need element zero with the reduction result.
3153 (reduc_plus_scal_v2df): Likewise.
3154
3155 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3156
3157 * dojump.h (do_jump): Delete.
3158 (do_jump_1): Likewise.
3159 (split_comparison): Move around.
3160 * dojump.c (do_jump): Make static.
3161 (do_jump_1): Likewise.
3162 (jumpifnot): Move around.
3163 (jumpifnot_1): Likewise.
3164 (jumpif): Likewise.
3165 (jumpif_1): Likewise.
3166 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3167
3168 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3169
3170 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3171 insns in the delay slot and add_insn_after for the jump insn.
3172
3173 2018-10-02 Richard Biener <rguenther@suse.de>
3174
3175 * tree-inline.c (expand_call_inline): Use the location of
3176 the callee declaration for the inline-entry marker.
3177 * final.c (notice_source_line): Remove special-casing of
3178 NOTE_INSN_INLINE_ENTRY.
3179
3180 2018-10-01 Carl Love <cel@us.ibm.com>
3181
3182 PR 69431
3183 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3184 (__builtin_mtfsb0): New.
3185 (__builtin_mtfsb1): New.
3186 ( __builtin_set_fpscr_rn): New.
3187 (__builtin_set_fpscr_drn): New.
3188 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3189 (rs6000_expand_set_fpscr_rn_builtin): Add.
3190 (rs6000_expand_set_fpscr_drn_builtin): Add.
3191 (rs6000_expand_builtin): Add case statement entries for
3192 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3193 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3194 RS6000_BUILTIN_MFFSL.
3195 (rs6000_init_builtins): Add ftype initialization and def_builtin
3196 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3197 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3198 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3199 rs6000_mffscdrn): Add define_insn.
3200 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3201 * doc/extend.texi: Add documentation for the builtins.
3202
3203 2018-10-01 Richard Biener <rguenther@suse.de>
3204
3205 PR tree-optimization/87465
3206 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3207 causing branch miscounts.
3208
3209 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3210
3211 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3212 aarch64_option_default_param): New.
3213 (params.h): Include.
3214 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3215 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3216 stack-clash protection validation code.
3217
3218 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3219
3220 * params.c (validate_param): New.
3221 (add_params): Use it.
3222 (set_param_value): Refactor param validation into validate_param.
3223 (diagnostic.h): Include.
3224 * diagnostic.h (diagnostic_ready_p): New.
3225
3226 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3227
3228 * params.c (set_param_value):
3229 Add index of parameter being validated.
3230 * common/common-target.def (option_validate_param): New.
3231 * common/common-targhooks.h (default_option_validate_param): New.
3232 * common/common-targhooks.c (default_option_validate_param): New.
3233 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3234 * doc/tm.texi: Regenerate.
3235
3236 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3237
3238 PR target/86486
3239 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3240 Add validation for stack-clash parameters and set defaults.
3241
3242 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3243
3244 PR target/86486
3245 * configure.ac: Add stack-clash-protection-guard-size.
3246 * doc/install.texi: Document it.
3247 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3248 * params.def: Update comment for guard-size.
3249 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3250 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3251 * configure: Regenerate.
3252
3253 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3254
3255 PR target/86486
3256 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3257 STACK_DYNAMIC_OFFSET): New.
3258 * config/aarch64/aarch64.c (aarch64_layout_frame):
3259 Update outgoing args size.
3260 (aarch64_stack_clash_protection_alloca_probe_range,
3261 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3262
3263 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3264
3265 PR target/86486
3266 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3267 probe ranges.
3268 * target.def (stack_clash_protection_alloca_probe_range): New.
3269 (stack_clash_protection_final_dynamic_probe): Remove.
3270 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3271 (default_stack_clash_protection_final_dynamic_probe): Remove.
3272 * targhooks.c: Likewise.
3273 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3274 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3275 * doc/tm.texi: Regenerate.
3276
3277 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3278
3279 PR target/86486
3280 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3281 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3282 aarch64_clamp_to_uimm12_shift): New.
3283 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3284 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3285
3286 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3287
3288 PR target/86486
3289 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3290
3291 2018-10-01 Jeff Law <law@redhat.com>
3292 Richard Sandiford <richard.sandiford@linaro.org>
3293 Tamar Christina <tamar.christina@arm.com>
3294
3295 PR target/86486
3296 * config/aarch64/aarch64.md
3297 (probe_stack_range): Add k (SP) constraint.
3298 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3299 STACK_CLASH_MAX_UNROLL_PAGES): New.
3300 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3301 stack probes for stack clash.
3302 (aarch64_allocate_and_probe_stack_space): New.
3303 (aarch64_expand_prologue): Use it.
3304 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3305 (aarch64_sub_sp): Add emit_move_imm optional param.
3306
3307 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
3308
3309 PR tree-optimization/87261
3310 * match.pd: Remove trailing whitespace.
3311 Add (x & y) | ~(x | y) -> ~(x ^ y),
3312 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3313
3314 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3315
3316 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3317 constraints.
3318 (ashlsi3_insn): Update instruction constraints.
3319 (ashrsi3_insn): Likewise.
3320 (rotrsi3): Likewise.
3321 (add_shift): Likewise.
3322 * config/arc/constraints.md (Csz): New 32 bit constraint. It
3323 avoids placing in the limm field small constants which, otherwise,
3324 could end into a small instruction.
3325
3326 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3327
3328 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3329 destination register is not odd-even.
3330 (umaddsidi4_split): Likewise.
3331
3332 2018-10-01 Richard Biener <rguenther@suse.de>
3333
3334 * tree-inline.c (expand_call_inline): Store origin of fn
3335 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3336 * tree.c (block_ultimate_origin): Simplify and do some
3337 checking.
3338
3339 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
3340
3341 * config/i386/mmx.md (EMMS): New int iterator.
3342 (emms): New int attribute.
3343 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3344 EMMS int iterator. Explicitly declare clobbers.
3345 (mmx_emms): Remove expander.
3346 (mmx_femms): Ditto.
3347 * config/i386/predicates.md (emms_operation): Remove predicate.
3348 (vzeroall_pattern): New predicate.
3349 (vzeroupper_pattern): Rename from vzeroupper_operation.
3350 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3351 vzeroupper_pattern and vzeroall_pattern predicates.
3352
3353 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
3354
3355 PR rtl-optimization/86939
3356 * ira-lives.c (make_hard_regno_born): Rename from this...
3357 (make_hard_regno_live): ... to this. Remove update to conflict
3358 information. Update function comment.
3359 (make_hard_regno_dead): Add conflict information update. Update
3360 function comment.
3361 (make_object_born): Rename from this...
3362 (make_object_live): ... to this. Remove update to conflict information.
3363 Update function comment.
3364 (make_object_dead): Add conflict information update. Update function
3365 comment.
3366 (mark_pseudo_regno_live): Call make_object_live.
3367 (mark_pseudo_regno_subword_live): Likewise.
3368 (mark_hard_reg_dead): Update function comment.
3369 (mark_hard_reg_live): Call make_hard_regno_live.
3370 (process_bb_node_lives): Likewise.
3371 * lra-lives.c (make_hard_regno_born): Rename from this...
3372 (make_hard_regno_live): ... to this. Remove update to conflict
3373 information. Remove now uneeded check_pic_pseudo_p argument.
3374 Update function comment.
3375 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3376 to conflict information. Update function comment.
3377 (mark_pseudo_live): Remove update to conflict information. Update
3378 function comment.
3379 (mark_pseudo_dead): Add conflict information update.
3380 (mark_regno_live): Call make_hard_regno_live.
3381 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3382 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3383
3384 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3385
3386 PR target/87370
3387 * config/i386/i386.c (construct_container): Use TImode for
3388 BLKmode values in 2 integer registers.
3389
3390 2018-09-29 Jeff Law <law@redhat.com>
3391
3392 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3393 c_strlen rather than just a tree *.
3394 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3395 Update recursive calls appropriately. If caller did not provide a
3396 suitable data pointer, create a local one. When a non-terminated
3397 string is discovered, bubble up information about the string via the
3398 c_strlen_data object.
3399 * builtins.h (c_strlen): Update prototype.
3400 (c_strlen_data): New structure.
3401 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3402 For a type 2 call, if c_strlen indicates a non-terminated string
3403 use the length of the non-terminated string.
3404 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3405
3406 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3407
3408 PR target/87467
3409 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3410 __m512d type for __A argument rather than __m512.
3411
3412 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3413
3414 * match.pd (simple_comparison): Don't optimize if either operand is
3415 a function pointer when target needs function pointer canonicalization.
3416
3417 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3418
3419 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3420 power5 .. power9 to remove indirection.
3421 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3422 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3423 ASM_CPU_476_SPEC): Delete.
3424 (ASM_CPU_SPEC): Adjust.
3425 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3426 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3427
3428 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3429
3430 * config.in: Delete HAVE_AS_DCI.
3431 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3432 * config/rs6000/rs6000.h: Ditto.
3433 * configure.ac: Delete HAVE_AS_DCI.
3434 * configure: Regenerate.
3435
3436 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3437
3438 * config.in (HAVE_AS_LWSYNC): Delete.
3439 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3440 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3441 do it as a .long .
3442 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3443 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3444 as a .long .
3445 * configure.ac: Delete HAVE_AS_LWSYNC.
3446 * configure: Regenerate.
3447
3448 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3449 Pierre-Marie de Rodat <derodat@adacore.com>
3450
3451 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3452 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3453 (cgraph_node::create_thunk): Add indirect_offset parameter.
3454 (thunk_adjust): Likewise.
3455 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3456 and initialize the corresponding field with it.
3457 (cgraph_node::dump): Dump indirect_offset field.
3458 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3459 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3460 (thunk_adjust): Add indirect_offset parameter and deal with it.
3461 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3462 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3463 or if the thunk is external or local. Fix formatting. Do not chain
3464 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3465 if any, in the GIMPLE representation.
3466 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3467 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3468 (input_node): Read indirect_offset field.
3469 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3470 call to thunk_adjust.
3471 * tree-nested.c (struct nesting_info): Add thunk_p field.
3472 (create_nesting_tree): Set it.
3473 (convert_all_function_calls): Copy static chain from targets to thunks.
3474 (finalize_nesting_tree_1): Return early for thunks.
3475 (unnest_nesting_tree_1): Do not finalize thunks.
3476 (gimplify_all_functions): Do not gimplify thunks.
3477
3478 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3479
3480 * opt-suggestions.c (option_proposer::build_option_suggestions):
3481 Release "option_values".
3482
3483 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3484
3485 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3486 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3487 * dumpfile.c (kind_as_string): New function.
3488 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3489 kind_as_string to vary the prefix based on dump_kind.
3490 (selftest::test_capture_of_dump_calls): Update for above.
3491
3492 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3493
3494 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3495 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3496
3497 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3498
3499 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3500 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3501 INVALID_REGNUM instead of FPSR_REG.
3502 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3503 * config/i386/i386.md: Update comment of FP compares.
3504 (fldenv): Do not clobber FPSR_REG.
3505
3506 2018-09-28 Richard Biener <rguenther@suse.de>
3507
3508 * tree.h (BLOCK_ORIGIN): New.
3509 * omp-expand.c (grid_expand_target_grid_body): Assign
3510 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3511 * tree-inline.c (remap_block): Likewise.
3512 * auto-profile.c (get_function_decl_from_block): Simplify
3513 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3514 * langhooks.c (lhd_print_error_function): Likewise.
3515 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3516 Likewise.
3517 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3518 * tree.c (block_nonartificial_location): Likewise.
3519 (block_ultimate_origin): Likewise.
3520 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3521 no longer needed LTO case.
3522
3523 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3524 Jan Hubicka <jh@suse.cz>
3525 Martin Jambor <mjambor@suse.cz>
3526
3527 * simplify-rtx.c (simplify_merge_mask): New function.
3528 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3529 same masks are used in op1 or op2.
3530 (test_vec_merge): New function.
3531 (test_vector_ops): Call test_vec_merge.
3532
3533 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3534
3535 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3536 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3537 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3538 (cypress_costs): Set it.
3539 (supersparc_costs): Likewise.
3540 (hypersparc_costs): Likewise.
3541 (leon_cost): Likewise.
3542 (leon3_costs): Likewise.
3543 (sparclet_costs): Likewise.
3544 (ultrasparc_costs): Likewise.
3545 (ultrasparc_costs): Likewise.
3546 (niagara_costs): Likewise.
3547 (niagara2_costs): Likewise.
3548 (niagara3_costs): Likewise.
3549 (niagara4_costs): Likewise.
3550 (niagara7_costs): Likewise.
3551 (m8_costs): Likewise.
3552 (TARGET_CAN_FOLLOW_JUMP): Define.
3553 (pass_work_around_errata::gate): Minor tweak.
3554 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3555 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3556 Automaitcally clear MASK_FSMULD mask for V7 processors.
3557 (sparc_can_follow_jump): New static function.
3558 (output_ubranch): Deal with CROSSING_JUMP_P.
3559 (sparc_use_sched_lookahead): Rewrite using switch statement.
3560 (sparc_issue_rate): Reorder.
3561 (sparc_branch_cost): New function.
3562
3563 2018-09-27 Martin Sebor <msebor@redhat.com>
3564
3565 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3566 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3567 (int_fits_type_p): Same.
3568
3569 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3570
3571 * config/i386/i386.md (FPCR_REG): Remove.
3572 (UNSPEC_FLDCW): Remove.
3573 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3574 (x86_fldcw_1): Remove insn pattern.
3575 (fnstenv): Do not clobber FPCR_REG.
3576 (fldenv): Ditto.
3577 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3578 (CALL_USED_REGISTERS): Ditto.
3579 (REG_ALLOC_ORDER): Ditto.
3580 (REG_CLASS_CONTENTS): Ditto.
3581 (HI_REGISTER_NAMES): Ditto.
3582 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3583 of numerical constants.
3584 * config/i386/i386.c (regclass_map): Remove fpsr register.
3585 (dbx_register_map): Ditto.
3586 (dbx64_register_map): Ditto.
3587 (svr4_dbx_register_map): Ditto.
3588 (print_reg): Do not handle FPCR_REG.
3589
3590 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3591
3592 PR target/87149
3593 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3594 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3595 Delete, always treat as true.
3596 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3597 Ditto. Simplify remaining code.
3598 * config/powerpcspe/powerpcspe.h: Ditto.
3599 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3600 Simplify remaining code.
3601 (rs6000_expand_builtin): Ditto.
3602 * config/rs6000/rs6000.h: Ditto.
3603 * configure.ac: Ditto.
3604 * configure: Regenerate.
3605
3606 2018-09-27 Martin Liska <mliska@suse.cz>
3607
3608 * coverage.c (get_coverage_counts): Revert the formatting
3609 of missing profile opt info.
3610
3611 2018-09-27 Richard Biener <rguenther@suse.de>
3612
3613 PR debug/37801
3614 PR debug/87440
3615 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3616 block as we do not output that.
3617 (gen_inlined_subroutine_die): Elide the originally outermost
3618 block, matching what we do for concrete instances.
3619 (decls_for_scope): Add parameter specifying whether to recurse
3620 to subblocks.
3621
3622 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3623 Tom de Vries <tom@codesourcery.com>
3624
3625 PR 82089
3626
3627 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3628 STORE_FLAG_VALUE == 1.
3629
3630 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3631
3632 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3633 constant definitions.
3634 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3635 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3636 ("speculation_barrier"): New expander definition.
3637
3638 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3639
3640 PR gcov-profile/86957
3641 * common.opt: New warning option -Wmissing-profile.
3642 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3643 * doc/invoke.texi: Document -Wmissing-profile.
3644
3645 2018-09-26 Jim Wilson <jimw@sifive.com>
3646
3647 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3648 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3649
3650 2018-09-26 Martin Sebor <msebor@redhat.com>
3651
3652 * tree.c (zerop): Change return type to bool.
3653 (integer_zerop, integer_onep, integer_each_onep): Same.
3654 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3655 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3656 (real_onep, real_minus_onep, chain_index): Same.
3657 (print_type_hash_statistics, type_list_equal): Same.
3658 * tree.h (zerop): Same.
3659 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3660 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3661 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3662 (real_onep, real_minus_onep, chain_index): Same.
3663 (print_type_hash_statistics, type_list_equal): Same.
3664
3665 2018-09-26 Jim Wilson <jimw@sifive.com>
3666
3667 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3668
3669 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3670
3671 PR target/87414
3672 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3673 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3674 call.
3675
3676 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3677
3678 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3679
3680 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3681
3682 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3683 and FP_SECOND_SSE_REGS.
3684 (REG_CLASS_NAMES): Ditto.
3685 (REG_CLASS_CONTENTS): Ditto.
3686 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3687 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3688 (ix86_preferred_output_reload_class): Ditto.
3689 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3690 clobber constraint to "=&f".
3691 (fix_truncdi_i387): Ditto.
3692 (lrintxfdi2): Ditto.
3693 (fistdi2_<rounding>): Ditto.
3694 (fpremxf4_i387): Change "=u" constraint to "=f".
3695 (fprem1xf4_i387): Ditto.
3696 (sincosxf3): Ditto.
3697 (fptanxf4_i387): Ditto.
3698 (fxtractxf3_i387): Ditto.
3699 (fscalexf4_i387): Ditto.
3700 (atan2xf3): Change "u" constraint to "f".
3701 (fyl2xxf3_i387): Ditto.
3702 (fyl2xp1xf3_i387): Ditto.
3703
3704 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3705
3706 PR target/87439
3707 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3708 for removed I387_MASK_PM entity.
3709
3710
3711 2018-09-26 Jeff Law <law@redhat.com>
3712 Revert
3713 2018-09-26 Alexey Neyman <stilor@att.net>
3714
3715 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3716 headers are no longer pulled in by <isl/val.h>.
3717
3718 2018-09-26 Richard Biener <rguenther@suse.de>
3719
3720 PR debug/87443
3721 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3722 or concrete instance DIE to the tree. Create abstract origin
3723 attributes also for concrete instances.
3724
3725 2018-09-26 Alexey Neyman <stilor@att.net>
3726
3727 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3728 headers are no longer pulled in by <isl/val.h>.
3729
3730 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3731
3732 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3733 Use new helper functions.
3734 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3735 Use new helper functions.
3736 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3737 aarch_mm_needs_release): New declarations.
3738 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3739 aarch_mm_needs_release): New.
3740
3741 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3742
3743 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3744 (arm32_output_mi_thunk): Deal with long calls.
3745
3746 2018-09-26 Richard Biener <rguenther@suse.de>
3747
3748 PR debug/87428
3749 PR debug/87362
3750 * tree-inline.c (expand_call_inline): When the location
3751 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3752 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3753 the inserted BLOCK to make inlined_function_outer_scope_p
3754 recognize it.
3755 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3756 coords for reserved locations.
3757
3758 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3759
3760 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3761 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3762 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3763 (*sibcall_nonlocal_sysv<mode>): Ditto.
3764 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3765 (<bd>_<mode>): Ditto.
3766 (<bd>tf_<mode>): Ditto.
3767
3768 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3769
3770 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3771 control string as a list of templates instead of as C code.
3772 (*altivec_movti): Ditto.
3773 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3774
3775 2018-09-25 Jim Wilson <jimw@sifive.com>
3776
3777 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3778 when target symbol is weak.
3779
3780 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3781
3782 PR c/87387
3783 * builtins.c (unterminated_array): Simplify.
3784 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3785 where pointer arithmetic is safe.
3786
3787 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3788
3789 PR target/86987
3790 * config/rs6000/altivec.md (altivec_vspltb): Use
3791 const_0_to_15_operand instead of u5bit_cint_operand.
3792 (*altivec_vspltb_internal): Ditto.
3793 (altivec_vspltb_direct): Ditto.
3794 (altivec_vsplth): Use const_0_to_7_operand instead of
3795 u5bit_cint_operand.
3796 (*altivec_vsplth_internal): Ditto.
3797 (altivec_vsplth_direct): Ditto.
3798 (altivec_vspltw): Use const_0_to_3_operand instead of
3799 u5bit_cint_operand.
3800 (*altivec_vspltw_internal): Ditto.
3801 (altivec_vspltw_direct): Ditto.
3802 (altivec_vspltsf): Ditto.
3803 (*altivec_vspltsf_internal): Ditto.
3804 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3805 various splats with the proper size immediate. Reorder the various
3806 cases by ascending size of immediate, and put all such together.
3807
3808 2018-09-25 Richard Biener <rguenther@suse.de>
3809
3810 PR debug/83941
3811 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3812 GC-ification.
3813 (maybe_create_die_with_external_ref): Do not create
3814 DW_TAG_imported_unit here.
3815 (add_abstract_origin_attribute): Handle external BLOCK refs.
3816 (dwarf2out_abstract_function): Simplify LTO case.
3817 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3818 rather than using maybe_create_die_with_external_ref.
3819
3820 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3821
3822 PR target/71278
3823 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3824 (frndintxf2_mask_pm_i387): Ditto.
3825 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3826 Enable for !flag_trapping_math.
3827 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3828 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3829 Change operand 1 predicate to nonimmediate_operand.
3830 (attr "i387_cw"): Remove mask_pm.
3831 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3832 (enum ix86_entity): Remove I387_MASK_PM.
3833 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3834 handle I387_MASK_PM.
3835 (ix86_mode_needed): Ditto.
3836 (ix86_mode_after): Ditto.
3837 (ix86_mode_entry): Ditto.
3838 (ix86_mode_exit): Ditto.
3839 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3840
3841 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3842
3843 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3844 to_update_switch_stmts to vNULL instead of calling create on them
3845 immediately.
3846
3847 2018-09-25 Richard Biener <rguenther@suse.de>
3848
3849 PR tree-optimization/87402
3850 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3851 (visit_phi): Re-instantiate handling of supposed to be VARYING
3852 but non-VARYING backedge value.
3853
3854 2018-09-25 Richard Biener <rguenther@suse.de>
3855
3856 PR debug/83941
3857 * dwarf2out.c (struct sym_off_pair): New.
3858 (external_die_map): New global.
3859 (lookup_decl_die): When in LTO create DIEs lazily from the
3860 external_die_map.
3861 (lookup_block_die): New function, create DIEs lazily in LTO.
3862 (equate_block_to_die): New function.
3863 (dwarf2out_die_ref_for_decl): During WPA get the association
3864 from the external DIE map.
3865 (dwarf2out_register_external_die): Record mapping into the
3866 external DIE map.
3867 (maybe_create_die_with_external_ref): New function split out from
3868 DIE generation part of old dwarf2out_register_external_die.
3869 (add_abstract_origin_attribute): Do not return the DIE. When
3870 in LTO reference externals directly.
3871 (dwarf2out_abstract_function): When in LTO ignore calls for
3872 decls with external DIEs (already present abstract instances).
3873 (gen_call_site_die): Adjust.
3874 (add_high_low_attributes): Likewise.
3875 (gen_lexical_block_die): Likewise.
3876 (gen_inlined_subroutine_die): Likewie.
3877 (gen_block_die): Likewise.
3878 (dwarf2out_inline_entry): Likewise.
3879 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3880 DIEs.
3881
3882 2018-09-25 Martin Liska <mliska@suse.cz>
3883
3884 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3885 integers and not by a float value.
3886
3887 2018-09-25 Martin Liska <mliska@suse.cz>
3888
3889 PR fortran/87394
3890 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3891 instead of NULL.
3892 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3893 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3894 * godump.c (go_format_type): Remove extra parenthesis.
3895
3896 2018-09-25 Martin Liska <mliska@suse.cz>
3897
3898 * alias.c (set_dest_equal_p): Remove unused function.
3899 * config/i386/i386.c (def_builtin_pure2): Likewise.
3900 * diagnostic-show-locus.c (class layout): Remove
3901 unused field.
3902 (layout::layout): Likewise here.
3903 * dump-context.h (class temp_dump_context): Likewise.
3904 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3905 (add_AT_loclistsptr): Likewise.
3906 (add_AT_offset): Likewise.
3907 (get_AT_hi_pc): Likewise.
3908 (is_comdat_die): Likewise.
3909 (type_is_enum): Likewise.
3910 (ceiling): Likewise.
3911 (add_AT_vms_delta): Likewise.
3912 (is_class_die): Likewise.
3913 * edit-context.c (class line_event): Remove unused field.
3914 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3915 unused function.
3916 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3917 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3918 (ok_for_base_p_nonstrict): Likewise.
3919 * tree-chrec.c (is_not_constant_evolution): Likewise.
3920 (chrec_fold_poly_cst): Likewise.
3921 * tree-if-conv.c (has_pred_critical_p): Likewise.
3922 * tree-ssa-coalesce.c (print_exprs): Likewise.
3923 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3924 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3925 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3926 (value_range_nonnegative_p): Likewise.
3927
3928 2018-09-25 Martin Liska <mliska@suse.cz>
3929
3930 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3931 Do not handle "GNU Pascal".
3932 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3933 Likewise.
3934 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3935 from documentation. Likewise.
3936 * dbxout.c (dbxout_range_type): Likewise.
3937 * doc/cpp.texi: Likewise.
3938 * doc/extend.texi: Likewise.
3939 * doc/frontends.texi: Likewise.
3940 * doc/invoke.texi: Remove Pascal entry.
3941 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3942 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3943
3944 2018-09-25 Martin Liska <mliska@suse.cz>
3945
3946 PR middle-end/86078
3947 * doc/invoke.texi: Document all parameters and remove default
3948 of the parameters.
3949
3950 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3951
3952 PR bootstrap/87417
3953 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3954 contains HOST_WIDE_INTs when computing its size.
3955
3956 2018-09-24 Jim Wilson <jimw@sifive.com>
3957
3958 PR target/87391
3959 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3960 not TARGET_RVE.
3961 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3962
3963 2018-09-24 Andrew Pinski <apinski@marvell.com>
3964
3965 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3966 access prev before checking it for NULLness in the
3967 AARCH64_FUSE_CMP_BRANCH case.
3968
3969 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3970
3971 PR target/82699
3972 * config/i386/i386.c (rest_of_insert_endbranch): Set
3973 endbr_queued_at_entrance to true and don't insert ENDBR if
3974 x86_function_profiler will be called.
3975 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3976 is true.
3977 * config/i386/i386.h (machine_function): Add
3978 endbr_queued_at_entrance.
3979
3980 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3981
3982 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3983 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3984 types.
3985 (check_attr_test): Use alternative_mask.
3986 (get_attr_value): Likewise.
3987 (compute_alternative_mask): Use alternative_mask and XWINT.
3988 (make_alternative_compare): Use alternative_mask.
3989 (attr_alt_subset_p): Use XWINT.
3990 (attr_alt_subset_of_compl_p): Likewise.
3991 (attr_alt_intersection): Use alternative_mask and XWINT.
3992 (attr_alt_union): Likewise.
3993 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3994 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3995 (simplify_test_exp): Use alternative_mask and XWINT.
3996 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3997 number calculation to support 64 bits. Generate code that
3998 checks 64-bit masks.
3999 (main): Use alternative_mask.
4000 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
4001
4002 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4003
4004 PR target/80080
4005 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
4006 RETURN+USE when returning via %r14.
4007
4008 2018-09-24 Martin Liska <mliska@suse.cz>
4009
4010 * gcov.c (output_lines): Print colorization legend
4011 for both flag_use_colors and flag_use_hotness_colors.
4012 Reword the help.
4013
4014 2018-09-24 Martin Liska <mliska@suse.cz>
4015
4016 * coverage.c (get_coverage_counts): Use warning_at
4017 with current_function_decl location. Use %qD in warning
4018 message.
4019
4020 2018-09-24 Martin Liska <mliska@suse.cz>
4021
4022 * memory-block.h (memory_block_pool::release): Annotate with
4023 valgrind that the memory is not accessible.
4024
4025 2018-09-24 Martin Liska <mliska@suse.cz>
4026
4027 PR sanitizer/85774
4028 * asan.c: Make asan_handled_variables extern.
4029 * asan.h: Likewise.
4030 * cfgexpand.c (expand_stack_vars): Make sure
4031 a representative is unpoison if another
4032 variable in the partition is handled by
4033 use-after-scope sanitization.
4034
4035 2018-09-24 Richard Biener <rguenther@suse.de>
4036
4037 PR tree-optimization/63155
4038 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
4039 the worklist when the edge of the respective argument isn't
4040 executable.
4041
4042 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4043
4044 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
4045 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
4046 (MASK_CLASS_P): Update for rename.
4047 (MAYBE_MASK_CLASS_P): Ditto.
4048 (REG_CLASS_NAMES): Update.
4049 (REG_CLASS_CONTENT): Update.
4050 * config/i386/i386.c (regclass_map): Update for MASK_REG
4051 and ALL_MASK_REGS rename.
4052 * config/i386/constraints.md (Yk): Update for rename.
4053 (k): Ditto.
4054
4055 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4056
4057 * config/i386/i386.h (enum reg_class): Remove
4058 EVEX_SSE_REGS and MOD4_SSE_REGS.
4059 (REG_CLASS_NAMES): Update.
4060 (REG_CLASS_CONTENT): Update.
4061 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
4062 registers as ALL_SSE_REGS.
4063 (ix86_additional_allocno_class_p): Remove.
4064 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
4065 (ix86_register_priority): Lower priority of EVEX SSE registers.
4066 Use IN_RANGE macro where appropriate.
4067 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
4068 AVX-5124VNNIW checks.
4069 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
4070 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
4071 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
4072 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
4073 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
4074 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
4075 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
4076 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
4077 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
4078 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
4079 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
4080 * config/i386/constraints.md (Yh): Remove.
4081
4082 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4083
4084 * config/i386/i386.c (regclass_map): Declare integer REX registers
4085 as GENERAL_REGS.
4086
4087 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
4088
4089 * doc/service.texi (Service): Switch the fsf.org link to https.
4090
4091 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
4092
4093 PR target/86798
4094 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4095 Define to speculation_safe_value_not_needed.
4096
4097 2018-09-21 Florian Weimer <fweimer@redhat.com>
4098
4099 PR middle-end/81035
4100 * doc/extend.texi (Common Function Attributes): Mention that
4101 noreturn suppresses tail call optimization.
4102
4103 2018-09-21 Jeff Law <law@redhat.com>
4104
4105 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
4106 vr_values::cleanup_edges_and_switches.
4107 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
4108 vr_values class.
4109 (identify_jump_threads): Remove EDGE_IGNORE handling.
4110 (execute_vrp): Move handling of to_remove_edges and
4111 to_update_switch_stmts into vr_values class member functions.
4112 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
4113 (to_update_switch_stmts): Likewise.
4114 * vr-values.c: Include cfghooks.h.
4115 (vr_values::vr_values): Initialize to_remove_edges and
4116 to_update_switch_stmts.
4117 (vr_values::~vr_values): Verify to_remove_edges and
4118 to_update_switch_stmts are empty.
4119 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
4120 (vr_values::cleanup_edges_and_switches): New member function.
4121 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
4122 function. Add new data members.
4123
4124 2018-09-21 David Malcolm <dmalcolm@redhat.com>
4125
4126 PR tree-optimization/87309
4127 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
4128 calls with pflags and alt_flags.
4129 (selftest::test_capture_of_dump_calls): Add test of interaction of
4130 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
4131
4132 2018-09-21 Olivier Hainque <hainque@adacore.com>
4133
4134 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
4135
4136 2018-09-21 Olivier Hainque <hainque@adacore.com>
4137
4138 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
4139
4140 2018-09-21 Olivier Hainque <hainque@adacore.com>
4141
4142 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
4143 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
4144 (VXWORKS_LIBS_RTP): Minor reordering.
4145
4146 2018-09-21 Olivier Hainque <hainque@adacore.com>
4147
4148 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
4149 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
4150
4151 2018-09-21 Olivier Hainque <hainque@adacore.com>
4152
4153 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
4154 (PTRDIFF_TYPE): Likewise.
4155
4156 2018-09-21 Olivier Hainque <hainque@adacore.com>
4157
4158 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
4159 triplet, similar to support for VxWorks7.
4160 * config/vxworks-dummy.h: Provide a default definition
4161 of TARGET_VXWORKS64 to 0.
4162
4163 2018-09-21 Olivier Hainque <hainque@adacore.com>
4164
4165 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
4166 * config/vxworks-dummy.h: here.
4167
4168 2018-09-21 Olivier Hainque <hainque@adacore.com>
4169
4170 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4171
4172 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
4173 Bo Zhou <zbo.zhou@hisilicon.com>
4174
4175 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4176 * config/aarch64/aarch64-tune.md: Regenerated.
4177 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4178 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4179 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4180
4181 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
4182 Julian Brown <julian@codesourcery.com>
4183
4184 * builtins.c (get_builtin_sync_mem): Handle address spaces.
4185
4186 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4187
4188 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4189 if the call takes a static chain.
4190
4191 2018-09-21 Martin Liska <mliska@suse.cz>
4192
4193 * auto-profile.c (autofdo_source_profile::read): Do not
4194 set sum_all.
4195 (read_profile): Do not add working sets.
4196 (read_autofdo_file): Remove sum_all.
4197 (afdo_callsite_hot_enough_for_early_inline): Remove const
4198 qualifier.
4199 * coverage.c (struct counts_entry): Remove gcov_summary.
4200 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4201 do not support GCOV_TAG_PROGRAM_SUMMARY.
4202 (get_coverage_counts): Remove summary and expected
4203 arguments.
4204 * coverage.h (get_coverage_counts): Likewise.
4205 * doc/gcov-dump.texi: Remove -w option.
4206 * gcov-dump.c (dump_working_sets): Remove.
4207 (main): Do not support '-w' option.
4208 (print_usage): Likewise.
4209 (tag_summary): Likewise.
4210 * gcov-io.c (gcov_write_summary): Do not dump
4211 histogram.
4212 (gcov_read_summary): Likewise.
4213 (gcov_histo_index): Remove.
4214 (gcov_histogram_merge): Likewise.
4215 (compute_working_sets): Likewise.
4216 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4217 it not obsolete.
4218 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4219 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4220 (GCOV_HISTOGRAM_SIZE): Remove.
4221 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4222 (struct gcov_summary): Simplify rapidly just
4223 to runs and sum_max fields.
4224 (gcov_histo_index): Remove.
4225 (NUM_GCOV_WORKING_SETS): Likewise.
4226 (compute_working_sets): Likewise.
4227 * gcov-tool.c (print_overlap_usage_message): Remove
4228 trailing empty line.
4229 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4230 (output_lines): Remove program related line.
4231 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4232 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4233 histogram.
4234 (input_profile_summary): Do not read it.
4235 (merge_profile_summaries): And do not merge it.
4236 (input_symtab): Do not call removed function.
4237 * modulo-sched.c (sms_schedule): Do not print sum_max.
4238 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4239 removed when histogram method was invented.
4240 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4241 mode.
4242 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4243 GCOV coding style.
4244 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4245 and dump selected value.
4246 * profile.c (add_working_set): Remove.
4247 (get_working_sets): Likewise.
4248 (find_working_set): Likewise.
4249 (get_exec_counts): Do not work with working sets.
4250 (read_profile_edge_counts): Do not inform as sum_max is removed.
4251 (compute_branch_probabilities): Likewise.
4252 (compute_value_histograms): Remove argument for call of
4253 get_coverage_counts.
4254 * profile.h: Do not make gcov_summary const.
4255
4256 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
4257
4258 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4259
4260 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4261
4262 PR tree-optimization/86990
4263 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4264 Check that the entire merged store group is made of constants only for
4265 overlapping stores.
4266
4267 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
4268
4269 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4270 (VTABLE_VERIFICATION_SPEC): Likewise.
4271 (SANITIZER_EARLY_SPEC): Likewise.
4272 (SANITIZER_SPEC): Likewise.
4273 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4274 * doc/invoke.texi (Link Options): Document -r.
4275
4276 2018-09-20 Richard Biener <rguenther@suse.de>
4277
4278 PR middle-end/87054
4279 * gimplify.c (gimplify_expr): Retain alignment of
4280 addressable lvalue in dereference.
4281
4282 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
4283
4284 PR bootstrap/87013
4285 * configure.ac: Check for .loc is_stmt support.
4286 * configure, config.in: Rebuilt.
4287 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4288 if not supported.
4289
4290 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4291
4292 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4293 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4294 -misel=no.
4295
4296 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4297
4298 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4299 VECTOR_OTHER.
4300 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4301 case VECTOR_OTHER.
4302
4303 2018-09-20 Marek Polacek <polacek@redhat.com>
4304
4305 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4306
4307 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4308
4309 PR tree-optimization/87288
4310 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4311 into account when determining PEELING_FOR_NITERS.
4312
4313 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4314
4315 PR tree-optimization/86877
4316 * tree-vect-loop.c (vect_analyze_loop_2): Call
4317 vect_verify_datarefs_alignment.
4318
4319 2018-09-19 Marek Polacek <polacek@redhat.com>
4320
4321 * doc/invoke.texi: Document -Wclass-conversion.
4322
4323 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
4324
4325 * config/pa/pa.c (pa_adjust_priority): Delete.
4326 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4327
4328 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4329 (atomic_storehi): Likewise.
4330 (atomic_storesi): Likewise.
4331 (atomic_loaddi): Restore compare and swap exchange loop code.
4332
4333 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
4334
4335 PR rtl-optimization/86902
4336 * combine.c (try_combine): When changing the CC mode used, don't change
4337 an unrelated mode in other_insn to that new CC mode.
4338
4339 2018-09-19 David Malcolm <dmalcolm@redhat.com>
4340
4341 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4342 with %T in place of calls to dump_generic_expr.
4343 (prune_runtime_alias_test_list): Likewise.
4344 (create_runtime_alias_checks): Likewise.
4345 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4346 (vect_analyze_data_ref_dependence): Likewise.
4347 (vect_slp_analyze_data_ref_dependence): Likewise.
4348 (vect_record_base_alignment): Likewise. Use %G in place of call
4349 to dump_gimple_stmt.
4350 (vect_compute_data_ref_alignment): Likewise.
4351 (verify_data_ref_alignment): Likewise.
4352 (vect_find_same_alignment_drs): Likewise.
4353 (vect_analyze_group_access_1): Likewise.
4354 (vect_analyze_data_ref_accesses): Likewise.
4355 (dependence_distance_ge_vf): Likewise.
4356 (dump_lower_bound): Likewise.
4357 (vect_prune_runtime_alias_test_list): Likewise.
4358 (vect_find_stmt_data_reference): Likewise.
4359 (vect_analyze_data_refs): Likewise.
4360 (vect_create_addr_base_for_vector_ref): Likewise.
4361 (vect_create_data_ref_ptr): Likewise.
4362 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4363 (vect_can_advance_ivs_p): Likewise.
4364 (vect_update_ivs_after_vectorizer): Likewise.
4365 (vect_gen_prolog_loop_niters): Likewise.
4366 (vect_prepare_for_masked_peels): Likewise.
4367 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4368 (vect_determine_vectorization_factor): Likewise.
4369 (vect_is_simple_iv_evolution): Likewise.
4370 (vect_analyze_scalar_cycles_1): Likewise.
4371 (vect_analyze_loop_operations): Likewise.
4372 (report_vect_op): Likewise.
4373 (vect_is_slp_reduction): Likewise.
4374 (check_reduction_path): Likewise.
4375 (vect_is_simple_reduction): Likewise.
4376 (vect_create_epilog_for_reduction): Likewise.
4377 (vect_finalize_reduction:): Likewise.
4378 (vectorizable_induction): Likewise.
4379 (vect_transform_loop_stmt): Likewise.
4380 (vect_transform_loop): Likewise.
4381 (optimize_mask_stores): Likewise.
4382 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4383 (vect_split_statement): Likewise.
4384 (vect_recog_over_widening_pattern): Likewise.
4385 (vect_recog_average_pattern): Likewise.
4386 (vect_determine_min_output_precision_1): Likewise.
4387 (vect_determine_precisions_from_range): Likewise.
4388 (vect_determine_precisions_from_users): Likewise.
4389 (vect_mark_pattern_stmts): Likewise.
4390 (vect_pattern_recog_1): Likewise.
4391 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4392 (vect_record_max_nunits): Likewise.
4393 (vect_build_slp_tree_1): Likewise.
4394 (vect_build_slp_tree_2): Likewise.
4395 (vect_print_slp_tree): Likewise.
4396 (vect_analyze_slp_instance): Likewise.
4397 (vect_detect_hybrid_slp_stmts): Likewise.
4398 (vect_detect_hybrid_slp_1): Likewise.
4399 (vect_slp_analyze_operations): Likewise.
4400 (vect_slp_analyze_bb_1): Likewise.
4401 (vect_transform_slp_perm_load): Likewise.
4402 (vect_schedule_slp_instance): Likewise.
4403 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4404 (vect_mark_stmts_to_be_vectorized): Likewise.
4405 (vect_init_vector_1): Likewise.
4406 (vect_get_vec_def_for_operand): Likewise.
4407 (vect_finish_stmt_generation_1): Likewise.
4408 (vect_check_load_store_mask): Likewise.
4409 (vectorizable_call): Likewise.
4410 (vectorizable_conversion): Likewise.
4411 (vectorizable_operation): Likewise.
4412 (vectorizable_load): Likewise.
4413 (vect_analyze_stmt): Likewise.
4414 (vect_is_simple_use): Likewise.
4415 (vect_get_vector_types_for_stmt): Likewise.
4416 (vect_get_mask_type_for_stmt): Likewise.
4417 * tree-vectorizer.c (increase_alignment): Likewise.
4418
4419 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4420
4421 * doc/rtl.texi: Adjust vec_select description.
4422 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4423 non-constant selectors.
4424
4425 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4426
4427 * config/aarch64/aarch64-protos.h
4428 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4429 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4430 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4431 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4432 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4433 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4434 (AARCH64_ISA_RCPC8_4): New flag.
4435 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4436 to aarch64_offset_9bit_signed_unscaled_p.
4437 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4438 and use stlur.
4439 * config/aarch64/constraints.md (Ust): New constraint.
4440 * config/aarch64/predicates.md.
4441 (aarch64_9bit_offset_memory_operand): New predicate.
4442 (aarch64_rcpc_memory_operand): New predicate.
4443
4444 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4445
4446 PR rtl-optimization/87361
4447 * rtlanal.c (nonzero_bits1): Revert accidental change.
4448
4449 2018-09-19 Richard Biener <rguenther@suse.de>
4450
4451 PR tree-optimization/87349
4452 PR tree-optimization/87342
4453 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4454
4455 2018-09-18 Marek Polacek <polacek@redhat.com>
4456
4457 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4458 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4459
4460 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4461
4462 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4463
4464 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4465
4466 PR rtl-optimization/86882
4467 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4468
4469 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4470
4471 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4472 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4473
4474 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4475
4476 PR other/87353
4477 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4478
4479 2018-09-18 Richard Biener <rguenther@suse.de>
4480
4481 PR middle-end/63155
4482 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4483 (compute_samebase_partition_bases): Likewise.
4484 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4485 (gimple_can_coalesce_p): Simplify.
4486
4487 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4488
4489 Handle a library implementation of ffs calling __builtin_ffs.
4490 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4491 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4492 to __ffsdi2.
4493
4494 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4495
4496 * diagnostic-show-locus.c (class layout_range): Add field
4497 "m_original_idx".
4498 (layout_range::layout_range): Add "original_idx" param and use it
4499 to initialize new field.
4500 (make_range): Use 0 for original_idx.
4501 (layout::layout): Pass in index to calls to
4502 maybe_add_location_range.
4503 (layout::maybe_add_location_range): Add param "original_idx" and
4504 pass it on to layout_range.
4505 (layout::print_any_labels): Pass on range->m_original_idx to
4506 get_text call.
4507 (gcc_rich_location::add_location_if_nearby): Use 0 for
4508 original_idx.
4509 * gcc-rich-location.h (text_range_label::get_text): Update for new
4510 param.
4511 (range_label_for_type_mismatch::get_text): Likewise.
4512
4513 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4514
4515 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4516
4517 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4518
4519 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4520 format_string_diagnostic_t.
4521 (fmtwarn_n): Likewise.
4522 * substring-locations.c
4523 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4524 (format_warning_n_va): Convert to...
4525 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4526 (format_warning_va): Convert to...
4527 (format_string_diagnostic_t::emit_warning_va): ...this.
4528 (format_warning_at_substring): Convert to...
4529 (format_string_diagnostic_t::emit_warning): ...this.
4530 (format_warning_at_substring_n): Convert to...
4531 (format_string_diagnostic_t::emit_warning_n): ...this.
4532 * substring-locations.h (class format_string_diagnostic_t): New
4533 class.
4534 (format_warning_va): Convert to
4535 format_string_diagnostic_t::emit_warning_va.
4536 (format_warning_n_va): Convert to
4537 format_string_diagnostic_t::emit_warning_n_va.
4538 (format_warning_at_substring): Convert to
4539 format_string_diagnostic_t::emit_warning.
4540 (format_warning_at_substring_n): Convert to
4541 format_string_diagnostic_t::emit_warning_n.
4542
4543 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4544 Bernd Schmidt <bernds_cb1@t-online.de>
4545
4546 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4547 SImode args.
4548
4549 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4550
4551 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4552 operand 0 predicate to nonimmediate operand.
4553 (rint<mode>2_frndint): Remove insn pattern.
4554 (rint<mode>2): Change operand 1 predicate to general_operand.
4555 Extend operand 1 to XFmode and generate rintxf2 insn.
4556 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4557 Do not use X87MODEF mode macro.
4558 (frndintxf2_<rounding>_i387): Rename from
4559 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4560 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4561 to XFmode and generate significandxf3 insn.
4562
4563 2018-09-17 Richard Biener <rguenther@suse.de>
4564
4565 PR tree-optimization/87328
4566 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4567 visiting unexecutable backedges when not iterating.
4568 (do_rpo_vn): Mark all edges not executable even when not
4569 iterating.
4570
4571 2018-09-17 Martin Jambor <mjambor@suse.cz>
4572
4573 PR c/63886
4574 * doc/invoke.texi (Warning Options): Likewise.
4575
4576 2018-09-17 Richard Biener <rguenther@suse.de>
4577
4578 PR tree-optimization/87301
4579 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4580 clean EH info from leftover copy assignments.
4581
4582 2018-09-17 Martin Liska <mliska@suse.cz>
4583
4584 PR gcov-profile/85871
4585 * gcov.c (output_intermediate_file): Fix out of bounds
4586 access.
4587
4588 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4589
4590 * config/arc/arc.c: Object attributes for core4 not reflected
4591 correctly.
4592 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4593 core3).
4594
4595 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4596
4597 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4598
4599 2018-09-17 Martin Liska <mliska@suse.cz>
4600
4601 * doc/gcov.texi: Document new option --use-hotness-colors.
4602 * gcov.c (struct source_info): Declare new field.
4603 (source_info::source_info): Set default for maximum_count.
4604 (print_usage): Add new -q option.
4605 (process_args): Process it.
4606 (accumulate_line_info): Save src->maximum_count.
4607 (output_line_beginning): Make color line number if
4608 flag_use_hotness_colors is set.
4609 (output_line_details): Pass default argument value.
4610 (output_lines): Pass src->maximum_count.
4611
4612 2018-09-17 Martin Liska <mliska@suse.cz>
4613
4614 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4615 Use processor_names table.
4616 * config/i386/i386.c (ix86_default_align): Use
4617 processor_cost_table for alignment values.
4618 (ix86_option_override_internal): Use processor_names.
4619 (ix86_function_specific_print): Likewise.
4620 * config/i386/i386.h (struct processor_costs):
4621 Add alignment values.
4622 (struct ptt): Remove and replace with const char *.
4623 * config/i386/x86-tune-costs.h (struct processor_costs):
4624 Declare default alignments for all costs.
4625
4626 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4627
4628 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4629 symbolics or VR_VARYING ranges for ABS_EXPR.
4630 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4631 when range will wrap.
4632
4633 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4634
4635 PR middle-end/86864
4636 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4637 before and after a JUMP_TABLE_DATA.
4638
4639 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4640
4641 PR middle-end/87188
4642 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4643 when one operand is a function pointer. Use POINTER_TYPE_P and
4644 FUNC_OR_METHOD_TYPE_P.
4645 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4646 * fold-const.c (build_range_check): Likewise.
4647 * match.pd (simple_comparison): Likewise.
4648
4649 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4650
4651 PR c/82967
4652 * spellcheck.c (get_edit_distance_cutoff): New function.
4653 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4654 (selftest::test_get_edit_distance_one_way): ...this.
4655 (selftest::test_get_edit_distance_unit): Rename to...
4656 (selftest::test_get_edit_distance_both_ways): ...this.
4657 (selftest::test_edit_distances): Move tests to this new function,
4658 and test some more pairs of strings. Update for above renaming.
4659 (selftest::get_old_cutoff): New function.
4660 (selftest::test_get_edit_distance_cutoff): New function.
4661 (selftest::assert_suggested_for): New function.
4662 (ASSERT_SUGGESTED_FOR): New macro.
4663 (selftest::assert_not_suggested_for): New function.
4664 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4665 (selftest::test_suggestions): New function.
4666 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4667 tests to selftest::test_edit_distances and call it. Add calls to
4668 selftest::test_get_edit_distance_cutoff and
4669 selftest::test_suggestions.
4670 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4671 (best_match::consider): Replace hard-coded cutoff calculation with
4672 a call to...
4673 (best_match::get_cutoff): New declaration.
4674 (best_match::get_best_meaningful_candidate): Likewise.
4675
4676 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4677
4678 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4679
4680 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4681
4682 revert:
4683 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4684
4685 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4686 terminated string literal.
4687
4688 2018-09-14 Martin Sebor <msebor@redhat.com>
4689
4690 * builtins.c (unterminated_array): Handle ARRAY_REF.
4691 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4692 * builtins.h (unterminated_array): Declare extern.
4693 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4694 arrays.
4695 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4696 calls.
4697
4698 2018-09-14 Martin Sebor <msebor@redhat.com>
4699 Jeff Law <law@redhat.com>
4700
4701 * builtins.c (unterminated_array): New.
4702 (expand_builtin_strcpy): Adjust.
4703 (expand_builtin_strcpy_args): Detect unterminated arrays.
4704 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4705 unterminated arrays.
4706 * gimple-fold.h (get_maxval_strlen): Add argument.
4707 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4708
4709 * gimple-fold.c (get_range_strlen): Add argument.
4710 (get_maxval_strlen): Adjust.
4711 * gimple-fold.h (get_range_strlen): Add argument.
4712
4713 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4714
4715 * config/i386/movdirintrin.h: Fix copyright year.
4716
4717 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4718
4719 * reg-stack.c: Include regs.h.
4720 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4721 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4722 FIRST_STACK_REG, not DFmode.
4723 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4724 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4725 (change stack): Default register mode to the reg_raw_mode of
4726 FIRST_STACK_REG, not DFmode.
4727 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4728 (*swapxf): Rename from swapxf.
4729
4730 2018-09-14 Carl Love <cel@us.ibm.com>
4731
4732 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4733 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4734
4735 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4736
4737 PR target/87224
4738 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4739 alternatives.
4740
4741 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4742
4743 PR target/85628
4744 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4745
4746 2018-09-14 Jason Merrill <jason@redhat.com>
4747
4748 Fix --enable-gather-detailed-mem-stats.
4749 * hash-table.c (hash_table_usage): Change from variable to function.
4750 * hash-table.h: Adjust.
4751 * Makefile.in: Add missing dependencies on hash-table.h.
4752
4753 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4754
4755 PR tree-optimization/87259
4756 PR lto/87283
4757 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4758 execute_cse_reciprocals_1 has tried transforming.
4759
4760 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4761
4762 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4763 VR_VARYING for PLUS/MINUS_EXPR.
4764
4765 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4766
4767 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4768 formatting.
4769
4770 2018-09-14 Richard Biener <rguenther@suse.de>
4771
4772 PR middle-end/63155
4773 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4774 bits for the merged partition.
4775
4776 2018-09-13 Martin Sebor <msebor@redhat.com>
4777 Bernd Edlinger <bernd.edlinger@hotmail.de>
4778
4779 * builtins.h (c_srlen): Add argument.
4780 * builtins.c (warn_string_no_nul): New function.
4781 (c_strlen): Add argument and use it. Update recursive calls.
4782 Pass DECL argument to string_constant to get info on non
4783 terminated strings. Update *NONSTR as needed.
4784 (fold_builtin_strlen): Add argument to calls to c_strlen.
4785 Warn for unterminated arrays.
4786 (warn_string_no_null): Add prototype.
4787 * expr.c (string_constant): Update arguments. Update recursive
4788 calls appropriately. Detect missing NUL terminator and outermost
4789 declaration its missing in.
4790 Improve checks for arrays with nonzero lower bound or elements
4791 that are not a single byte. Simplify offset computation.
4792 Simplify checks for non-NUL terminated strings.
4793 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4794 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4795
4796 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4797
4798 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4799 correctly.
4800 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4801 argument. Fix range checks.
4802 * fold-const.h (c_getstr): Adjust protoype.
4803 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4804 string is constant but contains no NUL byte.
4805
4806 * expr.c (string_constant): Adjust function comment.
4807 Remove bogus check for zero termination.
4808
4809 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4810
4811 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4812 (get_constant_size): Don't make STRING_CSTs larger than they are.
4813 (check_string_literal): New check function for STRING_CSTs.
4814 (output_constant): Use it.
4815
4816 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4817
4818 PR target/86812
4819 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4820
4821 2018-09-13 Richard Biener <rguenther@suse.de>
4822
4823 PR tree-optimization/87263
4824 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4825 (struct unwind_state): Add max_rpo field.
4826 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4827 Compute max_rpo, the max RPO number a block can be backwards reached
4828 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4829 separating it from the iterating mode.
4830
4831 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4832
4833 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4834 (rfs_decision): New scheduling decision.
4835
4836 2018-09-13 Richard Biener <rguenther@suse.de>
4837
4838 PR bootstrap/87134
4839 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4840 (vn_nary_op_insert_pieces_predicated): Do not write useless
4841 valid_dominated_by_p entry outside of the allocated storage.
4842
4843 2018-09-13 Omar Sandoval <osandov@osandov.com>
4844 Tom de Vries <tdevries@suse.de>
4845
4846 PR debug/86985
4847 * dwarf2out.c (is_c): New function.
4848 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4849
4850 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4851
4852 PR target/85628
4853 * config/aarch64/aarch64.md (*aarch64_bfxil):
4854 Define.
4855 * config/aarch64/constraints.md (Ulc): Define.
4856 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4857 Define.
4858 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4859 New function.
4860
4861 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4862
4863 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4864 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4865 aarch64_layout_frame call.
4866 (aarch64_expand_epilogue): Likewise.
4867 (aarch64_initial_elimination_offset): Likewise.
4868 (aarch64_get_separate_components): Likewise.
4869 (aarch64_use_return_insn_p): Likewise.
4870 (aarch64_layout_frame): Remove unneeded check.
4871
4872 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4873
4874 * configure.ac: Only append
4875 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4876 gcc_config_arguments if it was never reconfigured or last reconfigure
4877 was with different arguments.
4878 * configure: Regenerated.
4879
4880 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4881 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4882
4883 PR middle-end/87290
4884 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4885 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4886
4887 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4888
4889 PR tree-optimization/87287
4890 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4891 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4892 * match.pd (X % C == 0): ... here. New optimization.
4893
4894 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4895
4896 PR middle-end/82853
4897 * expr.h (maybe_optimize_mod_cmp): Declare.
4898 * expr.c (mod_inv): New function.
4899 (maybe_optimize_mod_cmp): New function.
4900 (do_store_flag): Use it.
4901 * cfgexpand.c (expand_gimple_cond): Likewise.
4902
4903 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4904 Julian Brown <julian@codesourcery.com>
4905
4906 PR middle-end/86336
4907 * gimplify.c (gimplify_scan_omp_clauses): Set
4908 target_firstprivatize_array_bases in OpenACC parallel and kernels
4909 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4910 OpenACC data regions.
4911
4912 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4913
4914 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4915 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4916
4917 2018-09-12 Richard Biener <rguenther@suse.de>
4918
4919 PR tree-optimization/87280
4920 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4921 edge but unreachable target.
4922 (do_rpo_vn): For conservatively handling a PHI only mark
4923 the backedge executable but not the block reachable.
4924
4925 2018-09-12 Richard Biener <rguenther@suse.de>
4926
4927 PR tree-optimization/87266
4928 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4929 visited blocks.
4930
4931 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4932
4933 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4934 constants.
4935 ("trunc<BFP:mode><DFP_ALL:mode>2")
4936 ("trunc<DFP_ALL:mode><BFP:mode>2")
4937 ("extend<BFP:mode><DFP_ALL:mode>2")
4938 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4939 according to the target operand type.
4940
4941 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4942 Andreas Krebbel <krebbel@linux.ibm.com>
4943
4944 PR tree-optimization/86844
4945 * gimple-ssa-store-merging.c
4946 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4947 there are any overlapping stores in between them, make sure they are
4948 also coalesced or we give up completely.
4949
4950 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4951
4952 PR middle-end/87248
4953 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4954 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4955
4956 2018-09-12 Tom de Vries <tdevries@suse.de>
4957
4958 * common.opt (gdescribe-dies): Add option.
4959 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4960 attribute for artifical and nameless decls.
4961 (dwarf2out_register_external_die): Add description attribute to
4962 external reference die.
4963 (add_desc_attribute): New functions.
4964 (gen_subprogram_die): Add description attribute to
4965 DW_TAG_call_site_parameter.
4966 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4967 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4968 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4969 -gno-describe-dies.
4970 (@item -gdescribe-dies): Add.
4971
4972 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4973
4974 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4975 (extract_range_from_binary_expr_1: Call
4976 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4977 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4978 depend on sign.
4979
4980 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4981
4982 * gimple-ssa-warn-alloca.c
4983 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4984 field for ALLOCA_BOUND_*_LARGE.
4985
4986 2018-09-11 Nathan Sidwell <nathan@acm.org>
4987
4988 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4989
4990 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4991
4992 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4993 for clobbers. Remove obsolete comment.
4994
4995 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4996
4997 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4998 mpxchk, mpxld and mpxst types.
4999 (define_attr length_immediate): Remove all processing of mpx types.
5000 (define_attr prefix_0f): Ditto.
5001 (define_attr memory): Ditto.
5002
5003 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5004
5005 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
5006 (log<mode>2): Change operand 1 predicate to general_operand.
5007 Extend operand 1 to XFmode and generate logxf3 insn.
5008 (log10<mode>2): Change operand 1 predicate to general_operand.
5009 Extend operand 1 to XFmode and generate log10xf3 insn.
5010 (log2<mode>2): Change operand 1 predicate to general_operand.
5011 Extend operand 1 to XFmode and generate log2xf3 insn.
5012 (fyl2xp1_extend<mode>xf3_i387): Remove.
5013 (log1p<mode>2): Change operand 1 predicate to general_operand.
5014 Extend operand 1 to XFmode and generate log1pxf3 insn.
5015 (fxtract_extend<mode>xf3_i387): Remove.
5016 (logb<mode>2): Change operand 1 predicate to general_operand.
5017 Extend operand 1 to XFmode and generate logbxf3 insn.
5018 (ilogb<mode>2): Change operand 1 predicate to general_operand.
5019 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
5020 (significand<mode>2): Change operand 1 predicate to general_operand.
5021 Extend operand 1 to XFmode and generate significandxf3 insn.
5022
5023 2018-09-11 Nathan Sidwell <nathan@acm.org>
5024
5025 * gcc.c (perror_with_name, pfatal_with_name): Delete.
5026 (load_specs): Use fatal_error.
5027 (DELETE_IF_ORDINARY, process_command): Use error.
5028 (execute, run_attempt): Use fatal_error.
5029
5030 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
5031
5032 * diagnostic-core.h (sorry_at): New prototype.
5033 * diagnostic.c (sorry_at): New function.
5034
5035 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
5036
5037 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
5038 by zero as VR_UNDEFINED.
5039
5040 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5041
5042 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
5043 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
5044 (<sincos>mode2): New expander.
5045 (sincos_extend<mode>xf3_i387): Remove insn pattern.
5046 (sincos -> sin, cos splitters): Remove splitter patterns.
5047 (sincos<mode>3): Change operand 2 predicate to general_operand.
5048 Extend operand 2 to XFmode and generate sincosxf3 insn.
5049 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
5050 Change operand 3 predicate to const1_operand.
5051 (fptan_extend<mode>xf4_i387): Remove insn pattern.
5052 (tanxf2): Update operands in the call to fptanxf4_i387.
5053 (tan<mode>2): Change operand 1 predicate to general_operand.
5054 Extend operand 1 to XFmode and generate tanxf3 insn.
5055 (atan2xf3): Rename from *fpatanxf3_i387.
5056 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
5057 (atan2xf3): Remove expander.
5058 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
5059 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
5060 (atan<mode>2): Change operand 1 predicate to general_operand.
5061 Extend operand 1 to XFmode and generate atanxf3 insn.
5062
5063 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5064
5065 * config/i386/i386.md (x87/SSE constant load splitter): Use
5066 memory_operand instead of nonimmediate_operand for input operand
5067 predicate.
5068
5069 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
5070
5071 * config/i386/i386.md (float partial SSE register stall splitter): Move
5072 splitter near its instruction pattern.
5073 (float_extend partial SSE register stall splitter): Ditto.
5074 (float_truncate partial SSE register stall splitter): Ditto.
5075
5076 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
5077
5078 PR target/86794
5079 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5080 to speculation_safe_value_not_needed.
5081
5082 PR target/85666
5083 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
5084 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
5085 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
5086 leaf_function_p, instead use has_hard_reg_initial_val.
5087
5088 2018-09-09 Nathan Sidwell <nathan@acm.org>
5089
5090 * gcc.h (pfatal_with_name): Don't declare here.
5091 * gcc.c (pfatal_with_name): Make static.
5092
5093 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
5094
5095 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
5096 earlyclobber.
5097
5098 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
5099
5100 PR rtl-optimization/85458
5101 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
5102 priority hook to reduce the priority of EXPR.
5103
5104 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
5105
5106 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
5107 DImode for x87 on 32bit targets. Conditionally disable x87 modes
5108 with X87_ENABLE_FLOAT. Remove preparation code.
5109 (*float<SWI48:mode><MODEF:mode>2): Rename from
5110 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
5111 math using "enabled" attribute.
5112 (*floatdi<MODEF:mode>2_i387): Rename from
5113 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
5114 enable for 32bit targets only.
5115 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
5116 splitter.
5117 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
5118 as operand 1 predicate. Rewrite as define_insn_and_split.
5119 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
5120
5121 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5122
5123 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
5124 to fallthru to FLOAT case.
5125
5126 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5127
5128 PR target/86731
5129 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
5130 around folding of vec_sl to handle out of range shift values.
5131
5132 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5133
5134 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
5135 Update callers to gen_fix_trunc<mode>_i387_fisttp
5136 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
5137 nonimmediate_operand.
5138 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
5139 and corresponding splitters.
5140 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
5141 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
5142 (fix_truncdi_i387_with_temp): Remove insn pattern
5143 and corresponding splitters.
5144 (fix_trunc<mode>_i387): Change operand 0 predicate to
5145 nonimmediate_operand.
5146 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
5147 and corresponding splitters.
5148 (*fistdi2_1): Remove.
5149 (fistdi2): Ditto.
5150 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
5151 (lrintxfdi2): Remove expander. Reimplement as define_insn.
5152 (*fist<mode>2_1): Remove.
5153 (fist<mode>2): Ditto.
5154 (fist<mode>2_with_temp): Remove insn pattern and corresponding
5155 splitters.
5156 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
5157 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
5158 (fistdi2_<rounding>): Change operand 0 predicate to
5159 nonimmediate_operand.
5160 (fistdi2_<rounding>_with_temp): Remove insn pattern
5161 and corresponding splitters.
5162 (fist<mode>2_<rounding>): Change operand 0 predicate to
5163 nonimmediate_operand.
5164 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
5165 and corresponding splitters.
5166
5167 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5168
5169 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5170
5171 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5172 the init value.
5173
5174 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5175
5176 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5177 early gimple folding of vec_splat().
5178 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5179 * gimple-fold.h: Add an extern define for tree_vec_extract().
5180
5181 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5182
5183 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5184 wrappers around TREE_TYPE comparisons.
5185
5186 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5187
5188 PR target/80080
5189 * config/s390/predicates.md: Add nonsym_memory_operand.
5190 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5191 contains a SYMBOL_REF, load it into an intermediate pseudo.
5192 (s390_emit_compare_and_swap): Legitimize operand.
5193 * config/s390/s390.md: Use the new nonsym_memory_operand
5194 with UNSPECV_CAS patterns.
5195
5196 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5197
5198 PR target/80080
5199 * config/s390/s390-passes.def: New file.
5200 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5201 declaration.
5202 (make_pass_s390_early_mach): Add declaration.
5203 * config/s390/s390.c (make_pass_s390_early_mach):
5204 (s390_option_override): Remove dynamic registration.
5205 * config/s390/t-s390: Add s390-passes.def.
5206
5207 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5208
5209 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5210 Remove UNSPEC_LTREL_BASE check.
5211 (annotate_constant_pool_refs): Likewise.
5212 (find_constant_pool_ref): Likewise.
5213 (find_ltrel_base): Removed.
5214 (replace_ltrel_base): Removed.
5215 (s390_mainpool_finish): Remove replace_ltrel_base call.
5216 (s390_chunkify_start): Remove pending LTREL_BASE logic.
5217 (s390_chunkify_finish): Remove replace_ltrel_base call.
5218 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5219
5220 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
5221
5222 PR target/86779
5223 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5224 to speculation_safe_value_not_needed.
5225
5226 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
5227 Bernd Schmidt <bernds_cb1@t-online.de>
5228
5229 * config/nvptx/nvptx-opts.h: New file.
5230 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5231 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5232 (ASM_SPEC): Define.
5233 (TARGET_SM35): New macro.
5234 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5235 correct predicate.
5236 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5237 values.
5238 (misa=): New option.
5239 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5240
5241 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
5242
5243 * config/i386/i386.md (truncdfsf2): Remove expander.
5244 (truncdfsf2_with_temp): Ditto.
5245 (truncxf<mode>2): Ditto.
5246 (*truncdfsf_fast_mixed): Remove insn pattern.
5247 (*truncdfsf_fast_i387): Ditto.
5248 (*truncdfsf_mixed): Ditto.
5249 (*truncdfsf_i387): Ditto.
5250 (*truncdfsf2_i387_1): Ditto.
5251 (*truncxfsf2_mixed): Ditto.
5252 (*truncxfdf2_mixed): Ditto.
5253 (*truncxf<mode>2_i387_noop): Ditto. Update callers
5254 to call gen_truncxf<mode>2 instead.
5255 (*truncxf<mode>2_i387): Remove.
5256 (reg->reg splitters): Remove splitter pattern.
5257 (reg->mem splitters): Ditto.
5258
5259 (truncdfsf2): New insn pattern.
5260 (truncxf<mode>2): Ditto.
5261
5262 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5263
5264 * tree-ssa-math-opts.c (is_mult_by): New function.
5265 (is_square_of): Use the above.
5266 (optimize_recip_sqrt): New function.
5267 (pass_cse_reciprocals::execute): Use the above.
5268
5269 2018-09-05 Richard Biener <rguenther@suse.de>
5270
5271 PR bootstrap/87134
5272 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5273 to zero-init the emplaced vec.
5274
5275 2018-09-05 Martin Liska <mliska@suse.cz>
5276
5277 PR tree-optimization/87205
5278 * tree-switch-conversion.c (pass_lower_switch::execute):
5279 Group cases for switch statements.
5280
5281 2018-09-05 Richard Biener <rguenther@suse.de>
5282
5283 PR tree-optimization/87217
5284 * tree-ssa-sccvn.c (vuse_valueize): New.
5285 (vn_reference_lookup_pieces): Use it.
5286 (vn_reference_lookup): Likewise.
5287
5288 2018-09-05 Nathan Sidwell <nathan@acm.org>
5289
5290 PR c++/87137
5291 * stor-layout.c (place_field): Scan forwards to check last
5292 bitfield when ms_bitfield_placement is in effect.
5293
5294 2018-09-05 Richard Biener <rguenther@suse.de>
5295
5296 PR bootstrap/87225
5297 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5298 return.
5299
5300 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
5301 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5302
5303 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5304 * config.gcc (extra_objs): Build it.
5305 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5306 Likewise.
5307 * config/aarch64/aarch64-passes.def
5308 (pass_tag_collision_avoidance): New pass.
5309 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5310 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5311 (aarch64_classify_address): Remove static qualifier.
5312 (aarch64_address_info, aarch64_address_type): Move to...
5313 * config/aarch64/aarch64-protos.h: ... here.
5314 (make_pass_tag_collision_avoidance): New function.
5315 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5316 New tuning flag.
5317
5318 2018-09-05 Martin Liska <mliska@suse.cz>
5319
5320 * doc/gcov.texi: Update documentation of humar
5321 readable mode.
5322 * gcov.c (format_count): Print one decimal place, it provides
5323 more fine number of situations like '1G' vs. '1.4G'.
5324
5325 2018-09-05 Martin Liska <mliska@suse.cz>
5326
5327 PR target/87164
5328 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5329 * optc-gen.awk: Allow 'Var' for Deprecated options in order
5330 to generate a MASK value.
5331
5332 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
5333
5334 PR debug/86593
5335 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5336 if frame pointer isn't used.
5337 (compute_frame_pointer_to_fb_displacement): Likewise.
5338
5339 2018-09-04 Jakub Jelinek <jakub@redhat.com>
5340
5341 PR target/87198
5342 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5343 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5344 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5345 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5346 and OPTION_MASK_ISA_XSAVEC_UNSET.
5347
5348 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
5349
5350 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5351 XOR operations in NAND case.
5352
5353 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5354
5355 * wide-int-range.cc (wide_int_range_convert): New.
5356 * wide-int-range.h (wide_int_range_convert): New.
5357 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5358 code into wide_int_range_convert.
5359 (extract_range_into_wide_ints): Do not munge anti range constants
5360 into the entire domain. Just return the range back.
5361
5362 2018-09-04 Martin Liska <mliska@suse.cz>
5363
5364 * genmatch.c (output_line_directive): Add new argument
5365 fnargs.
5366 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5367
5368 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5369
5370 * doc/invoke.texi (Option Summary): Add whitespace.
5371
5372 * doc/invoke.texi (Option Summary): Add -Waligned-new.
5373
5374 2018-09-04 Richard Biener <rguenther@suse.de>
5375
5376 PR tree-optimization/87211
5377 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5378 backedge value we're supposed to treat as VARYING also number
5379 the PHI to VARYING in case it got a different value-number already.
5380
5381 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5382
5383 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5384 (extract_range_from_binary_expr_1): Do not call
5385 vrp_can_optimize_bit_op.
5386 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5387 static.
5388 (wide_int_range_get_mask_and_bounds): New.
5389 (wide_int_range_optimize_bit_op): New.
5390 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5391 (wide_int_range_bit_and): Same.
5392 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5393 (wide_int_range_optimize_bit_op): New.
5394 (wide_int_range_get_mask_and_bounds): New.
5395
5396 2018-09-04 Richard Biener <rguenther@suse.de>
5397
5398 PR tree-optimization/87176
5399 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5400 variable. When value-numbering a virtual PHI node make sure
5401 to not value-number to the backedge value.
5402
5403 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5404
5405 * doc/extend.texi (Long Long, Hex Floats): Document support for
5406 long long and hex floats in more recent versions of ISO C++.
5407
5408 2018-09-03 Richard Biener <rguenther@suse.de>
5409
5410 PR tree-optimization/87177
5411 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5412 cleanup.
5413
5414 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5415
5416 * bb-reorder.c (edge_order): Convert to C-qsort-style
5417 tri-state comparator.
5418 (reorder_basic_blocks_simple): Change std::stable_sort to
5419 gcc_stablesort.
5420
5421 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5422
5423 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5424 tri-state comparator.
5425 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5426
5427 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5428
5429 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5430 (mergesort): ... here as maximum count for using netsort.
5431 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5432 (gcc_stablesort): New.
5433 * system.h (gcc_stablesort): Declare.
5434
5435 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5436
5437 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5438 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5439 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5440
5441 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5442
5443 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5444 lxsdx and stxsdx alternatives.
5445 (*mov<mode>_hardfloat64): Ditto.
5446 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5447
5448 2018-09-03 Richard Biener <rguenther@suse.de>
5449
5450 PR tree-optimization/87200
5451 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5452 simplify result.
5453
5454 2018-09-03 Martin Liska <mliska@suse.cz>
5455
5456 PR tree-optimization/87201
5457 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5458 Fix parenthesis in an expression.
5459
5460 2018-09-03 Richard Biener <rguenther@suse.de>
5461
5462 PR tree-optimization/87197
5463 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5464 visited. CSE the VN_INFO hashtable lookup.
5465
5466 PR tree-optimization/87169
5467 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5468 iterating make sure there's no extra backedges from irreducible
5469 regions feeding the header. Mark the destination block
5470 executable.
5471
5472 2018-09-03 Martin Liska <mliska@suse.cz>
5473
5474 PR driver/83193
5475 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5476 * common/common-targhooks.c (default_get_valid_option_values):
5477 New function.
5478 * common/common-targhooks.h (default_get_valid_option_values):
5479 Likewise.
5480 * common/config/i386/i386-common.c: Move processor_target_table
5481 from i386.c.
5482 (ix86_get_valid_option_values): New function.
5483 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5484 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5485 (PTA_*): Move all defined masks into i386-common.c.
5486 (ix86_function_specific_restore): Use new processor_cost_table.
5487 * config/i386/i386.h (struct ptt): Moved from i386.c.
5488 (struct pta): Likewise.
5489 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5490 * doc/tm.texi.in: Likewise.
5491 * opt-suggestions.c (option_proposer::suggest_option):
5492 Pass prefix to build_option_suggestions.
5493 (option_proposer::get_completions): Likewise.
5494 (option_proposer::build_option_suggestions): Use the new target
5495 hook.
5496 * opts.c (struct option_help_tuple): New struct.
5497 (print_filtered_help): Use the new target hook.
5498
5499 2018-09-03 Martin Liska <mliska@suse.cz>
5500
5501 PR middle-end/59521
5502 * predict.c (set_even_probabilities): Add likely_edges
5503 argument and handle cases where we have precisely one
5504 likely edge.
5505 (combine_predictions_for_bb): Catch also likely_edges.
5506 (tree_predict_by_opcode): Handle gswitch statements.
5507 * tree-cfg.h (find_case_label_for_value): New declaration.
5508 (find_taken_edge_switch_expr): Likewise.
5509 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5510 Find pivot in decision tree based on probabily, not by number of
5511 nodes.
5512
5513 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5514
5515 * doc/standards.texi (Standards): Update Objective-C reference.
5516
5517 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5518
5519 * doc/install.texi (Prerequisites): Update link for MPC.
5520
5521 2018-09-01 Michael Matz <matz@suse.de>
5522
5523 PR tree-optimization/87074
5524 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5525 PHIs for outer-loop uses.
5526
5527 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5528
5529 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5530 * doc/invoke.texi (C Dialect Options): Ditto.
5531
5532 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5533
5534 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5535
5536 2018-08-31 Richard Biener <rguenther@suse.de>
5537
5538 PR tree-optimization/87168
5539 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5540 (rpo_elim::eliminate_avail): When OP was not visited it must
5541 be available.
5542
5543 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5544
5545 * tree-vrp.c (copy_value_range): Convert param "from" from
5546 "value_range *" to "const value_range *".
5547 (range_is_null): Likewise for param "vr".
5548 (range_int_cst_p): Likewise.
5549 (range_int_cst_singleton_p): Likewise.
5550 (symbolic_range_p): Likewise.
5551 (value_ranges_intersect_p): Likewise for both params.
5552 (value_range_nonnegative_p): Likewise for param "vr".
5553 (value_range_constant_singleton): Likewise.
5554 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5555 (extract_range_into_wide_ints): Likewise for param "vr".
5556 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5557 and "vr1".
5558 (vrp_can_optimize_bit_op): Likewise.
5559 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5560 "vr1_".
5561 (extract_range_from_unary_expr): Likewise.
5562 (debug_value_range): Likewise for param "vr".
5563 (value_range::dump): Add "const" qualifier.
5564 (vrp_prop::check_array_ref): Convert local "vr" from
5565 "value_range *" to "const value_range *".
5566 (vrp_prop::check_mem_ref): Likewise.
5567 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5568 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5569 (vrp_intersect_ranges): Likewise.
5570 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5571 (vrp_prop::vrp_finalize): Likewise.
5572 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5573 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5574 (extract_range_from_unary_expr): Likewise.
5575 (value_range_constant_singleton): Likewise.
5576 (symbolic_range_p): Likewise.
5577 (copy_value_range): Likewise.
5578 (extract_range_from_binary_expr_1): Likewise.
5579 (range_int_cst_p): Likewise.
5580 (vrp_set_zero_nonzero_bits): Likewise.
5581 (range_int_cst_singleton_p): Likewise.
5582
5583 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5584
5585 * config/aarch64/arm_neon.h (vabsd_s64): New.
5586 (vnegd_s64): Likewise.
5587
5588 2018-08-31 Martin Jambor <mjambor@suse.cz>
5589
5590 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5591
5592 2018-08-31 Martin Liska <mliska@suse.cz>
5593
5594 * ipa-icf.c (sem_item::add_type): Use
5595 sem_item::m_type_hash_cache.
5596 * ipa-icf.h: Move the cache from sem_item_optimizer
5597 to sem_item.
5598
5599 2018-08-31 Nathan Sidwell <nathan@acm.org>
5600
5601 * doc/extend.texi (Backwards Compatibility): Remove implicit
5602 extern C leeway of () being (...).
5603
5604 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5605
5606 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5607
5608 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5609
5610 PR target/86684
5611 PR target/87149
5612 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5613
5614 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5615
5616 PR middle-end/87138
5617 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5618 gen_int_mode. Formatting fixes.
5619
5620 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5621
5622 * target.def (custom_function_descriptors): Improve documentation.
5623 * doc/tm.texi.in (Trampolines): Expand discussion of function
5624 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5625 beginning of the section.
5626 * doc/tm.texi: Regenerated.
5627
5628 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5629
5630 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5631 base class in the initializer list. This is a workaround for
5632 building with older GCC.
5633 (class auto_bb_flag): Likewise.
5634
5635 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5636
5637 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5638 (altivec_vcmpequ<VI_char>_p): Remove star.
5639 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5640 vector load modes.
5641 (expand_strncmp_vec_sequence): New function.
5642 (emit_final_str_compare_vec): New function.
5643 (expand_strn_compare): Add support for vector strncmp.
5644 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5645 length specification to bytes.
5646 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5647 (vcmpnezb_p): New pattern.
5648 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5649 for option -mstring-compare-inline-limit.
5650
5651 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5652
5653 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5654 (PTA_SKYLAKE): Add PTA_AES.
5655 (PTA_GOLDMONT): Likewise.
5656
5657 2018-08-29 Jan Hubicka <jh@suse.cz>
5658
5659 PR lto/86517
5660 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5661 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5662
5663 2018-08-29 Jan Hubicka <jh@suse.cz>
5664
5665 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5666 TYPE_STUB_DECL.
5667 (hash_tree): Do not visit TYPE_STUB_DECL.
5668 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5669 stream TYPE_STUB_DECL.
5670 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5671 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5672 after free_lang_data.
5673 (type_in_anonymous_namespace_p): Likewise.
5674
5675 2018-08-29 Jan Hubicka <jh@suse.cz>
5676
5677 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5678 comment that it has to be even number.
5679 (class sreal): Change m_sig type to int32_t.
5680 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5681 int64_t for temporary calculations.
5682 (sreal_verify_basics): Drop one bit from minimum and maximum.
5683
5684 2018-08-30 Richard Biener <rguenther@suse.de>
5685
5686 PR tree-optimization/87147
5687 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5688 (visit_phi): When the degenerate result is from the backedge and
5689 we didn't visit its definition yet drop to VARYING.
5690 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5691
5692 2018-08-29 Jan Hubicka <jh@suse.cz>
5693
5694 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5695 DECL_VINDEX.
5696 (hash_tree): Likewise.
5697
5698 2018-08-29 Jan Hubicka <jh@suse.cz>
5699
5700 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5701 and TYPE_NEXT_REF_TO.
5702
5703 2018-08-29 Jan Hubicka <jh@suse.cz>
5704
5705 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5706 comment that it has to be even number.
5707 (class sreal): Change m_sig type to int32_t.
5708 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5709 int64_t for temporary calculations.
5710 (sreal_verify_basics): Drop one bit from minimum and maximum.
5711
5712 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5713
5714 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5715
5716 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5717
5718 PR middle-end/86995
5719 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5720 if to_add is negative.
5721
5722 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5723
5724 PR middle-end/87053
5725 * builtins.c (c_strlen): Improve range checks.
5726
5727 2018-08-29 Martin Sebor <msebor@redhat.com>
5728 Jeff Law <law@redhat.com>
5729
5730 PR tree-optimization/86714
5731 PR tree-optimization/86711
5732 * builtins.c (c_strlen): Add arguments to call to string_constant.
5733 * expr.c (string_constant): Add argument. Detect missing nul
5734 terminator and outermost declaration it's missing in.
5735 * expr.h (string_constant): Add argument.
5736 * fold-const.c (read_from_constant_string): Add arguments to call to
5737 string_constant.
5738 (c_getstr): Likewise.
5739 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5740 to string_constant.
5741 * tree-ssa-strlen.c (get_stridx): Likewise.
5742
5743 2018-08-29 Jan Hubicka <jh@suse.cz>
5744
5745 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5746 Do not stream DECL_VINDEX.
5747 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5748 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5749 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5750
5751 2018-08-29 Richard Biener <rguenther@suse.de>
5752
5753 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5754 virtual operands that are not default defs to honor region
5755 boundaries.
5756 (rpo_vn_valueize): Remove ineffective code here.
5757
5758 2018-08-29 Richard Biener <rguenther@suse.de>
5759
5760 PR tree-optimization/87132
5761 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5762 when skipping defs reachable over backedges.
5763
5764 2018-08-29 Richard Biener <rguenther@suse.de>
5765
5766 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5767 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5768 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5769 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5770 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5771 (vn_reference_lookup_3): Remove use of const_parms.
5772 (free_rpo_vn): Do not free const_parms.
5773 (do_rpo_vn): Do not call init_const_parms.
5774 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5775 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5776 (call_may_clobber_ref_p_1): Likewise.
5777
5778 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5779
5780 PR other/86726
5781 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5782 (-O): Ditto.
5783 (-ftree-scev-cprop): Document.
5784
5785 2018-08-29 Jan Hubicka <jh@suse.cz>
5786
5787 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5788 parameters.
5789 (sreal constructor): Update.
5790 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5791 sreal:operator/): Update.
5792
5793 2018-08-29 Martin Liska <mliska@suse.cz>
5794
5795 * tree-switch-conversion.c (switch_conversion::expand):
5796 Strenghten assumption about gswitch statements.
5797
5798 2018-08-29 Richard Biener <rguenther@suse.de>
5799
5800 PR tree-optimization/87117
5801 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5802 re-value-number released SSA VDEFs.
5803
5804 2018-08-29 Richard Biener <rguenther@suse.de>
5805
5806 PR tree-optimization/87126
5807 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5808
5809 2018-08-28 Jim Wilson <jimw@sifive.com>
5810
5811 * config/riscv/pic.md: Rewrite.
5812 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5813 invalid address.
5814 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5815 (SOFTF, default_load, softload, softstore): New.
5816
5817 2018-08-28 Jeff Law <law@redhat.com>
5818
5819 * fold-const.c (fold_binary_loc): Remove recently added assert.
5820
5821 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5822
5823 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5824 to OP parmeter of generated function.
5825
5826 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5827
5828 PR tree-optimization/87009
5829 * match.pd: Add boolean optimizations.
5830
5831 2018-08-28 Martin Sebor <msebor@redhat.com>
5832
5833 PR middle-end/86631
5834 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5835 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5836 (pass_walloca::gate): Use it.
5837 (alloca_call_type): Same.
5838 (pass_walloca::execute): Same.
5839 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5840
5841 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5842
5843 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5844 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5845 >= 3005 to >= 9000.
5846
5847 2018-08-28 Richard Biener <rguenther@suse.de>
5848
5849 PR tree-optimization/87124
5850 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5851 constants before looking up avail.
5852
5853 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5854
5855 PR middle-end/87099
5856 * calls.c (maybe_warn_nonstring_arg): Punt early if
5857 warn_stringop_overflow is zero. Don't call get_range_strlen
5858 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5859 Swap comparison operands to have constants on rhs. Only use
5860 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5861 increment lenrng[0].
5862
5863 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5864
5865 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5866 use of tree_to_shwi. Remove duplicated test for the size being
5867 a whole number of bytes.
5868
5869 2018-08-28 Richard Biener <rguenther@suse.de>
5870
5871 PR tree-optimization/87117
5872 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5873 Handle removed stmt without LHS (GIMPLE_NOP).
5874
5875 2018-08-28 Richard Biener <rguenther@suse.de>
5876
5877 PR tree-optimization/87117
5878 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5879 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5880
5881 2018-08-28 Richard Biener <rguenther@suse.de>
5882
5883 PR tree-optimization/87117
5884 * tree-ssa-pre.c (compute_avail): Do not make expressions
5885 with predicated values available.
5886 (get_expr_value_id): Assert we do not run into predicated value
5887 expressions.
5888
5889 2018-08-28 Richard Biener <rguenther@suse.de>
5890
5891 PR tree-optimization/87117
5892 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5893 get virtual operands.
5894 (get_expr_operands): Handle STRING_CST like other decls.
5895
5896 2018-08-28 Martin Liska <mliska@suse.cz>
5897
5898 * tree.h: Update documentation of fndecl_built_in_p
5899 functions.
5900
5901
5902 2018-08-27 Jeff Law <law@redhat.com>
5903 PR tree-optimization/87110
5904 * tree-ssa-dse.c (compute_trims): Handle non-constant
5905 TYPE_SIZE_UNIT.
5906
5907 2018-08-27 Martin Sebor <msebor@redhat.com>
5908
5909 PR tree-optimization/86914
5910 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5911
5912 2018-08-27 Martin Sebor <msebor@redhat.com>
5913
5914 PR tree-optimization/87112
5915 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5916 the type of the bound argument.
5917
5918 2018-08-27 Jeff Law <law@redhat.com>
5919
5920 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5921 type does not have a TYPE_SIZE_UNIT.
5922
5923 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5924
5925 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5926 with include of backend.h.
5927
5928 2018-08-27 Richard Biener <rguenther@suse.de>
5929
5930 PR tree-optimization/86927
5931 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5932 use const cond reduction code.
5933
5934 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5935
5936 PR tree-optimization/85758
5937 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5938
5939 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5940
5941 PR c++/87091
5942 * diagnostic-show-locus.c (class layout_range): Update for
5943 conversion of show_caret_p to a tri-state.
5944 (layout_range::layout_range): Likewise.
5945 (make_range): Likewise.
5946 (layout::maybe_add_location_range): Likewise.
5947 (layout::should_print_annotation_line_p): Don't show annotation
5948 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5949 (layout::get_state_at_point): Update for conversion of
5950 show_caret_p to a tri-state. Bail out early for
5951 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5952 underlining or source colorization.
5953 (gcc_rich_location::add_location_if_nearby): Update for conversion
5954 of show_caret_p to a tri-state.
5955 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5956 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5957 Likewise.
5958 (selftest::test_one_liner_labels): Likewise.
5959 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5960 conversion of show_caret_p to a tri-state.
5961 * pretty-print.c (text_info::set_location): Likewise.
5962 * pretty-print.h (text_info::set_location): Likewise.
5963 * substring-locations.c (format_warning_n_va): Likewise.
5964 * tree-diagnostic.c (default_tree_printer): Likewise.
5965 * tree-pretty-print.c (newline_and_indent): Likewise.
5966
5967 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5968
5969 PR c++/87091
5970 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5971 line above for line-insertion fix-it hints.
5972 (selftest::test_fixit_insert_containing_newline): Update the
5973 expected results, and add a test with line-numbering enabled.
5974
5975 2018-08-27 Martin Liska <mliska@suse.cz>
5976
5977 PR sanitizer/86962
5978 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5979 params with DECL_HAS_VALUE_EXPR_P.
5980
5981 2018-08-27 Martin Liska <mliska@suse.cz>
5982
5983 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5984 selected expansion strategy.
5985
5986 2018-08-27 Martin Liska <mliska@suse.cz>
5987
5988 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5989 * builtins.c (is_builtin_fn): Likewise.
5990 * attribs.c (diag_attr_exclusions): Use new function
5991 fndecl_built_in_p and remove check for FUNCTION_DECL if
5992 possible.
5993 (builtin_mathfn_code): Likewise.
5994 (fold_builtin_expect): Likewise.
5995 (fold_call_expr): Likewise.
5996 (fold_builtin_call_array): Likewise.
5997 (fold_call_stmt): Likewise.
5998 (set_builtin_user_assembler_name): Likewise.
5999 (is_simple_builtin): Likewise.
6000 * calls.c (gimple_alloca_call_p): Likewise.
6001 (maybe_warn_nonstring_arg): Likewise.
6002 * cfgexpand.c (expand_call_stmt): Likewise.
6003 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
6004 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
6005 (cgraph_node::verify_node): Likewise.
6006 * cgraphclones.c (build_function_decl_skip_args): Likewise.
6007 (cgraph_node::create_clone): Likewise.
6008 * config/arm/arm.c (arm_insert_attributes): Likewise.
6009 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
6010 * dse.c (scan_insn): Likewise.
6011 * expr.c (expand_expr_real_1): Likewise.
6012 * fold-const.c (operand_equal_p): Likewise.
6013 (fold_binary_loc): Likewise.
6014 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
6015 * gimple-low.c (lower_stmt): Likewise.
6016 * gimple-pretty-print.c (dump_gimple_call): Likewise.
6017 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
6018 Likewise.
6019 * gimple.c (gimple_build_call_from_tree): Likewise.
6020 (gimple_call_builtin_p): Likewise.
6021 (gimple_call_combined_fn): Likewise.
6022 * gimplify.c (gimplify_call_expr): Likewise.
6023 (gimple_boolify): Likewise.
6024 (gimplify_modify_expr): Likewise.
6025 (gimplify_addr_expr): Likewise.
6026 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
6027 * ipa-cp.c (determine_versionability): Likewise.
6028 * ipa-fnsummary.c (compute_fn_summary): Likewise.
6029 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
6030 * ipa-split.c (visit_bb): Likewise.
6031 (split_function): Likewise.
6032 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6033 * lto-cgraph.c (input_node): Likewise.
6034 * lto-streamer-out.c (write_symbol): Likewise.
6035 * omp-low.c (setjmp_or_longjmp_p): Likewise.
6036 (lower_omp_1): Likewise.
6037 * predict.c (strip_predict_hints): Likewise.
6038 * print-tree.c (print_node): Likewise.
6039 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
6040 * trans-mem.c (is_tm_irrevocable): Likewise.
6041 (is_tm_load): Likewise.
6042 (is_tm_simple_load): Likewise.
6043 (is_tm_store): Likewise.
6044 (is_tm_simple_store): Likewise.
6045 (is_tm_abort): Likewise.
6046 (tm_region_init_1): Likewise.
6047 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
6048 * tree-cfg.c (verify_gimple_call): Likewise.
6049 (move_stmt_r): Likewise.
6050 (stmt_can_terminate_bb_p): Likewise.
6051 * tree-eh.c (lower_eh_constructs_2): Likewise.
6052 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
6053 * tree-inline.c (remap_gimple_stmt): Likewise.
6054 (copy_bb): Likewise.
6055 (estimate_num_insns): Likewise.
6056 (fold_marked_statements): Likewise.
6057 * tree-sra.c (scan_function): Likewise.
6058 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
6059 (optimize_stack_restore): Likewise.
6060 (pass_fold_builtins::execute): Likewise.
6061 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
6062 (mark_all_reaching_defs_necessary_1): Likewise.
6063 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
6064 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6065 (pass_forwprop::execute): Likewise.
6066 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6067 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6068 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
6069 * tree-ssa-strlen.c (get_string_length): Likewise.
6070 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
6071 (find_func_aliases_for_call): Likewise.
6072 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
6073 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
6074 * tree-tailcall.c (find_tail_calls): Likewise.
6075 * tree.c (need_assembler_name_p): Likewise.
6076 (free_lang_data_in_decl): Likewise.
6077 (get_call_combined_fn): Likewise.
6078 * ubsan.c (is_ubsan_builtin_p): Likewise.
6079 * varasm.c (incorporeal_function_p): Likewise.
6080 * tree.h (DECL_BUILT_IN): Remove and replace with
6081 fndecl_built_in_p.
6082 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
6083 (fndecl_built_in_p): New.
6084
6085 2018-08-27 Martin Liska <mliska@suse.cz>
6086
6087 PR tree-optimization/86847
6088 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
6089 Dump also subtree probability.
6090 (switch_decision_tree::do_jump_if_equal): New function.
6091 (switch_decision_tree::emit_case_nodes): Handle special
6092 situations in balanced tree that can be emitted much simpler.
6093 Fix calculation of probabilities that happen in tree expansion.
6094 * tree-switch-conversion.h (struct cluster): Add
6095 is_single_value_p.
6096 (struct simple_cluster): Likewise.
6097 (struct case_tree_node): Add new function has_child.
6098 (do_jump_if_equal): New.
6099
6100 2018-08-27 Martin Liska <mliska@suse.cz>
6101
6102 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
6103 Add new argument to bit_test_cluster constructor.
6104 (bit_test_cluster::emit): Set bits really number of values
6105 handlel by a test.
6106 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
6107 probability argument.
6108 * tree-switch-conversion.h (struct bit_test_cluster):
6109 Add m_handles_entire_switch.
6110
6111 2018-08-27 Martin Liska <mliska@suse.cz>
6112
6113 PR tree-optimization/86702
6114 * tree-switch-conversion.c (jump_table_cluster::emit):
6115 Make probabilities even for values in jump table
6116 according to number of cases handled.
6117 (switch_decision_tree::compute_cases_per_edge): Pass
6118 argument to reset_out_edges_aux function.
6119 (switch_decision_tree::analyze_switch_statement): Likewise.
6120 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
6121 Make it static.
6122
6123 2018-08-27 Martin Liska <mliska@suse.cz>
6124
6125 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
6126 cfun argument explicitly.
6127 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
6128 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
6129 function gimple_switch_default_bb.
6130 (convert_switch_statements):
6131 (expand_builtins):
6132 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
6133 * stmt.c (label_to_block_fn): Use label_to_block and pass
6134 cfun argument explicitly and use gimple_switch_label_bb.
6135 (expand_case): Likewise.
6136 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
6137 cfun argument explicitly. Likewise.
6138 (make_edges_bb): Likewise.
6139 (make_cond_expr_edges): Likewise.
6140 (get_cases_for_edge): Likewise.
6141 (make_gimple_switch_edges): Likewise.
6142 (label_to_block_fn): Likewise.
6143 (label_to_block): Likewise.
6144 (make_goto_expr_edges): Likewise.
6145 (make_gimple_asm_edges): Likewise.
6146 (main_block_label): Likewise.
6147 (group_case_labels_stmt): Likewise.
6148 (find_taken_edge_computed_goto): Likewise.
6149 (find_taken_edge_switch_expr): Likewise.
6150 (gimple_verify_flow_info): Likewise.
6151 (gimple_redirect_edge_and_branch): Likewise.
6152 (gimple_switch_label_bb): New function.
6153 (gimple_switch_default_bb): Likewise.
6154 (gimple_switch_edge): Likewise.
6155 (gimple_switch_default_edge): Likewise.
6156 * tree-cfg.h (label_to_block_fn): Remove and replace ...
6157 (label_to_block): ... with this.
6158 (gimple_switch_label_bb): New.
6159 (gimple_switch_default_bb): Likewise.
6160 (gimple_switch_edge): Likewise.
6161 (gimple_switch_default_edge): Likewise.
6162 * tree-cfgcleanup.c (convert_single_case_switch): Use
6163 new gimple functions and pass new argument to label_to_block.
6164 (cleanup_control_flow_bb):
6165 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
6166 cfun argument explicitly.
6167 (make_eh_edges): Likewise.
6168 (redirect_eh_dispatch_edge): Likewise.
6169 (lower_resx): Likewise.
6170 (lower_eh_dispatch): Likewise.
6171 (maybe_remove_unreachable_handlers): Likewise.
6172 (unsplit_eh): Likewise.
6173 (cleanup_empty_eh): Likewise.
6174 (verify_eh_edges): Likewise.
6175 (verify_eh_dispatch_edge): Likewise.
6176 * tree-ssa-dom.c (record_edge_info): Likewise.
6177 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6178 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6179 (thread_through_normal_block): Likewise.
6180 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6181 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6182 * tree-switch-conversion.c (switch_conversion::collect): Use new
6183 gimple functions.
6184 (switch_conversion::check_final_bb): Likewise.
6185 (switch_conversion::gather_default_values): Pass new argument
6186 to label_to_block.
6187 (switch_conversion::build_constructors): Likewise.
6188 (switch_decision_tree::compute_cases_per_edge): Use new
6189 gimple_switch_edge function.
6190 (switch_decision_tree::analyze_switch_statement): Pass new argument
6191 to label_to_block.
6192 (switch_decision_tree::try_switch_expansion): Use
6193 gimple_switch_default_edge.
6194 * tree-vrp.c (find_switch_asserts): Pass new argument
6195 to label_to_block.
6196 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6197 (vr_values::simplify_switch_using_ranges): Likewise.
6198
6199 2018-08-27 Richard Biener <rguenther@suse.de>
6200
6201 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6202 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6203
6204 * tree-ssa-sccvn.h (struct vn_pval): New structure.
6205 (struct vn_nary_op_s): Add unwind_to member. Add
6206 predicated_values flag and put result into a union together
6207 with a linked list of vn_pval.
6208 (struct vn_ssa_aux): Add name member to make maintaining
6209 a map of SSA name to vn_ssa_aux possible. Remove no longer
6210 needed info, dfsnum, low, visited, on_sccstack, use_processed
6211 and range_info_anti_range_p members.
6212 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6213 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6214 New functions.
6215 (vn_valueize): New global.
6216 (vn_context_bb): Likewise.
6217 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6218 VN_INFO_PTR_INFO): Remove.
6219 * tree-ssa-sccvn.c: ... (rewrite)
6220 (pass_fre::execute): For -O2+ initialize loops and run
6221 RPO VN in optimistic mode (iterating). For -O1 and -Og
6222 run RPO VN in non-optimistic mode.
6223 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6224 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6225 * doc/invoke.texi (sccvn-max-scc-size): Remove.
6226 (rpo-vn-max-loop-depth): Document.
6227 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6228 when valuezing the VUSE signals we walked out of the region.
6229 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6230 (phi_translate): Set VN context block to use for availability
6231 lookup.
6232 (compute_avail): Likewise.
6233 (pre_valueize): New function.
6234 (pass_pre::execute): Adjust to the RPO VN API.
6235
6236 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6237 (propagate_constants_for_unrolling): Remove.
6238 (tree_unroll_loops_completely): Perform value-numbering
6239 on the unrolled bodies loop parent.
6240
6241 2018-08-27 Richard Biener <rguenther@suse.de>
6242
6243 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6244 for partial antic compute.
6245
6246 2018-08-27 Jakub Jelinek <jakub@redhat.com>
6247
6248 PR rtl-optimization/87065
6249 * combine.c (simplify_if_then_else): Formatting fix.
6250 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6251 check.
6252 (known_cond): Don't return const_true_rtx for vector modes. Use
6253 CONST0_RTX instead of const0_rtx. Formatting fixes.
6254
6255 2018-08-27 Martin Liska <mliska@suse.cz>
6256
6257 PR gcov-profile/87069
6258 * gcov.c (process_file): Record files already processed
6259 and warn about a file being processed multiple times.
6260
6261 2018-08-27 Martin Liska <mliska@suse.cz>
6262
6263 PR driver/83193
6264 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6265 Set default values for x_aarch64_*_string strings.
6266 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6267 prefix. For -mabi do not print '=ABI' in help and use
6268 <option_value> format for -msve-vector-bits and -moverride
6269 options.
6270
6271 2018-08-26 Jeff Law <law@redhat.com>
6272
6273 * config/mips/frame-header-opt.c: Include "backend.h" rather than
6274 "cfg.h"
6275
6276 2018-08-26 Marek Polacek <polacek@redhat.com>
6277
6278 PR c++/87029, Implement -Wredundant-move.
6279 * doc/invoke.texi: Document -Wredundant-move.
6280
6281 2018-08-25 Martin Sebor <msebor@redhat.com>
6282
6283 PR tree-optimization/87059
6284 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6285 to the same type as the other.
6286 * fold-const.c (fold_binary_loc): Assert expectation.
6287
6288 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
6289
6290 * config/darwin.c (machopic_legitimize_pic_address): Clean up
6291 extraneous parentheses, dead code section and formatting.
6292
6293 2018-08-24 David Malcolm <dmalcolm@redhat.com>
6294
6295 PR c++/87091
6296 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6297 wide enough for jumps in the line-numbering to be visible.
6298 (layout::print_gap_in_line_numbering): New member function.
6299 (layout::calculate_line_spans): When using line numbering, merge
6300 line spans that are only 1 line apart.
6301 (diagnostic_show_locus): When printing line numbers, show gaps in
6302 line numbering directly, rather than printing headers.
6303 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6304 line-numbering with multiple line spans.
6305 (selftest::test_fixit_insert_containing_newline_2): Add test of
6306 line-numbering, in which the spans are close enough to be merged.
6307
6308 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6309
6310 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6311 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
6312 * tree-vrp.c (range_is_nonnull): Remove.
6313 (range_includes_zero_p): Accept value_range instead of min/max.
6314 (extract_range_from_binary_expr_1): Do not early bail on
6315 POINTER_PLUS_EXPR.
6316 Use range_includes_zero_p instead of range_is_nonnull.
6317 (extract_range_from_unary_expr): Use range_includes_zero_p instead
6318 of range_is_nonnull.
6319 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
6320 special case VR_ANTI_RANGE.
6321 (vrp_finalize): Same.
6322 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6323 instead of min/max.
6324 (range_is_nonnull): Remove.
6325 * vr-values.c (vrp_stmt_computes_nonzero): Use
6326 range_includes_zero_p instead of range_is_nonnull.
6327 (extract_range_basic): Pass value_range to range_includes_zero_p
6328 instead of range_is_nonnull.
6329
6330 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
6331
6332 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6333 * emit-rtl.h (rtl_data): Remove return_bnd.
6334 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6335 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6336 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6337 (POINTER_BOUNDS_MODE): Remove definition.
6338 (make_pointer_bounds_mode): Remove.
6339 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6340 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6341 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6342 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6343 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6344 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6345 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6346
6347 * config/i386/i386-modes.def (BND32, BND64): Remove.
6348 * config/i386/i386.c (dbx_register_map): Remove bound registers.
6349 (dbx64_register_map): Ditto.
6350 (svr4_dbx_register_map): Ditto.
6351 (indirect_thunk_bnd_needed): Remove.
6352 (indirect_thunks_bnd_used): Ditto.
6353 (indirect_return_bnd_needed): Ditto.
6354 (indirect_return_via_cx_bnd): Ditto.
6355 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6356 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6357 (output_indirect_thunk): Ditto. Remove need_prefix argument.
6358 (output_indirect_thunk_function): Remove handling of
6359 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6360 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6361 (ix86_save_reg): Remove handling of crtl->return_bnd.
6362 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6363 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6364 and UNSPEC_BNDLX_ADDR.
6365 (ix86_output_indirect_branch_via_reg): Remove handling of
6366 indirect_thunk_prefix_bnd.
6367 (ix86_output_indirect_branch_via_push): Ditto.
6368 (ix86_output_function_return): Ditto.
6369 (ix86_output_indirect_function_return): Ditto.
6370 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6371 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6372 (CALL_USED_REGISTERS): Ditto.
6373 (REG_ALLOC_ORDER): Update for removal of bound registers.
6374 (HI_REGISTER_NAMES): Ditto.
6375 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6376 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6377 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6378 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6379 (FIRST_PSEUDO_REG): Update.
6380 (BND): Remove mode iterator.
6381 * config/i386/predicates.md (bnd_mem_operator): Remove.
6382
6383 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6384
6385 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6386 vectors.
6387
6388 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6389
6390 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6391 the case in which the permute needs only a single element and
6392 repeats for every vector of the result. Extend that case to
6393 handle variable-length vectors.
6394 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6395
6396 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6397
6398 PR debug/79342
6399 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6400 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6401
6402 2018-08-24 Richard Biener <rguenther@suse.de>
6403
6404 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6405 bb_flags_allocated members.
6406 (auto_flag): New RAII class for allocating flags.
6407 (auto_edge_flag): New RAII class for allocating edge flags.
6408 (auto_bb_flag): New RAII class for allocating bb flags.
6409 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6410 flag dynamically.
6411 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6412 in favor of temporarily allocated BB flag.
6413 * hsa-brig.c: Re-order includes.
6414 * hsa-dump.c: Likewise.
6415 * hsa-regalloc.c: Likewise.
6416 * print-rtl.c: Likewise.
6417 * profile-count.c: Likewise.
6418
6419 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6420
6421 PR target/86989
6422 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6423 the TOC register.
6424
6425 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6426
6427 PR 87073/bootstrap
6428 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6429 from wide_int_range_multiplicative_op.
6430
6431 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6432
6433 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6434 "permutaion".
6435
6436 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6437
6438 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6439 to 'expanded'.
6440
6441 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6442
6443 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6444 full GENERIC expression used for replacement.
6445
6446 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6447
6448 * tree-vrp.c (abs_extent_range): Remove.
6449 (extract_range_into_wide_ints): Pass wide ints by reference.
6450 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6451 Pass wide ints by reference in all calls to
6452 extract_range_into_wide_ints.
6453 * wide-int-range.cc (wide_int_range_div): New.
6454 * wide-int-range.h (wide_int_range_div): New.
6455 (wide_int_range_includes_zero_p): New.
6456 (wide_int_range_zero_p): New.
6457
6458 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6459
6460 * config/aarch64/aarch64.md (arches): New enum.
6461 (arch): New enum attr.
6462 (arch_enabled): New attr.
6463 (enabled): Now uses arch_enabled only.
6464 (simd, sve, fp16): Removed attribute.
6465 (fp): Attr now defined in terms of 'arch'.
6466 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6467 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6468 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6469 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6470 attributes into 'arch'.
6471 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6472 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6473 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6474 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6475 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6476 'simd' attribute into 'arch'.
6477 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6478 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6479 Convert use of 'fp' attribute to 'arch'.
6480 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6481 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6482 into 'arch'.
6483 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6484 (different modes) Merge 'fp' and 'simd' into 'arch'.
6485 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6486 'simd' into 'arch'.
6487
6488 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6489
6490 PR rtl-optimization/87026
6491 * expmed.c (canonicalize_comparison): If we can no longer create
6492 pseudoregisters, don't.
6493
6494 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6495
6496 PR target/86951
6497 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6498 prototype.
6499 * config/arm/arm.c (speculation_barrier_libfunc): New static
6500 variable.
6501 (arm_init_libfuncs): Initialize it.
6502 (arm_emit_speculation_barrier): New function.
6503 * config/arm/arm.md (speculation_barrier): Call
6504 arm_emit_speculation_barrier for architectures that do not have
6505 DSB or ISB.
6506 (speculation_barrier_insn): Only match on Armv7 or later.
6507
6508 2018-08-23 Richard Biener <rguenther@suse.de>
6509
6510 PR middle-end/87024
6511 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6512 calls.
6513
6514 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6515
6516 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6517 of single-vector TBLs.
6518 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6519 one input is given.
6520
6521 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6522
6523 PR target/85910
6524 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6525 aarch64_evpc_tbl guard.
6526
6527 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6528
6529 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6530 behaviour.
6531
6532 2018-08-22 Martin Sebor <msebor@redhat.com>
6533
6534 PR middle-end/87052
6535 * tree-pretty-print.c (pretty_print_string): Add argument.
6536 (dump_generic_node): Call to pretty_print_string with string size.
6537
6538 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6539
6540 PR rtl-optimization/86771
6541 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6542 of two SETs into those two SETs, one to be placed at i2, if that SETs
6543 destination is modified between i2 and i3.
6544
6545 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6546
6547 PR tree-optimization/86725
6548 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6549 function.
6550 (vect_analyze_scalar_cycles_1): Check it.
6551
6552 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6553
6554 PR tree-optimization/86725
6555 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6556 an outer loop phi as a double reduction, make sure that the
6557 single user of the phi result is an inner loop phi.
6558
6559 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6560
6561 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6562 grouped stores with gaps to a strided group.
6563
6564 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6565
6566 * tree-vect-stmts.c (get_group_load_store_type)
6567 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6568 first statement in a group.
6569
6570 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6571
6572 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6573 the sequence used in gcc/gcc.c.
6574
6575 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6576
6577 PR other/704
6578 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6579 building it.
6580
6581 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6582
6583 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6584 Darwin10-specific unwinder-shim.
6585 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6586 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6587 New to cater for Darwin10 Rosetta.
6588
6589 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6590
6591 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6592 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6593
6594 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6595
6596 PR bootstrap/81033
6597 PR target/81733
6598 PR target/52795
6599 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6600 (dwarf2out_switch_text_section): Generate a local label for the
6601 second function sub-section and apply it as the second FDE start
6602 label.
6603 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6604 second sub-section start.
6605
6606 2018-08-22 Richard Biener <rguenther@suse.de>
6607
6608 PR tree-optimization/86988
6609 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6610
6611 2018-08-22 Richard Biener <rguenther@suse.de>
6612
6613 PR tree-optimization/86945
6614 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6615
6616 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6617
6618 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6619 a comment about how uses of r2 for .sdata2 come about.
6620
6621 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6622
6623 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6624
6625 2018-08-21 Marek Polacek <polacek@redhat.com>
6626
6627 PR c++/86981, Implement -Wpessimizing-move.
6628 * doc/invoke.texi: Document -Wpessimizing-move.
6629
6630 2018-08-21 Jan Hubicka <jh@suse.cz>
6631
6632 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6633 * tree.h (is_redundant_typedef): Remove.
6634 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6635
6636 2018-08-21 Jan Hubicka <jh@suse.cz>
6637
6638 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6639 when possible.
6640
6641 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6642
6643 * expmed.c (extract_low_bits): Reject invalid subregs early.
6644
6645 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6646
6647 PR middle-end/86121
6648 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6649 behaviour.
6650
6651 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6652
6653 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6654 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6655 * config/vxworks.c: Likewise.
6656
6657 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6658
6659 * config/vxworks.c: Set targetm.have_ctors_dtors
6660 if HAVE_INITFINI_ARRAY_SUPPORT.
6661 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6662 if HAVE_INITFINI_ARRAY_SUPPORT.
6663
6664 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6665
6666 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6667 default search path for VxWorks < 7.
6668
6669 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6670
6671 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6672 (get_format_string): Refer to c_getstr.
6673
6674 2018-08-21 Tom de Vries <tdevries@suse.de>
6675
6676 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6677 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6678 (debuginfo_early_stop): Declare.
6679 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6680 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6681 (debuginfo_early_stop): New function.
6682 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6683 and debuginfo_early_stop.
6684 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6685 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6686 (general_init): Call debuginfo_early_init.
6687 (finalize): Call debuginfo_fini.
6688 (do_compile): Call debuginfo_init.
6689 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6690 -fdump-early-debug.
6691 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6692
6693 2018-08-21 Tom de Vries <tdevries@suse.de>
6694
6695 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6696 flag_dump_noaddr and flag_dump_unnumbered.
6697
6698 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6699
6700 * wide-int-range.cc (wide_int_range_abs): New.
6701 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6702 * wide-int-range.h (wide_int_range_abs): New.
6703 (wide_int_range_min_max): New.
6704 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6705 case to call wide_int_range_abs.
6706 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6707 (extract_range_from_abs_expr): Delete.
6708
6709 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6710
6711 PR target/87033
6712 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6713 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6714 for indexed loads.
6715
6716 2018-08-20 Nathan Sidwell <nathan@acm.org>
6717 Jeff Law <law@redhat.com>
6718
6719 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6720 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6721
6722 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6723
6724 PR other/84889
6725 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6726 (decl_attributes): Likewise.
6727 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6728 instance.
6729 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6730 * diagnostic-core.h (class auto_diagnostic_group): New class.
6731 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6732 (diagnostic_report_diagnostic): Handle the first diagnostics within
6733 a group.
6734 (emit_diagnostic): Add auto_diagnostic_group instance.
6735 (inform): Likewise.
6736 (inform_n): Likewise.
6737 (warning): Likewise.
6738 (warning_at): Likewise.
6739 (warning_n): Likewise.
6740 (pedwarn): Likewise.
6741 (permerror): Likewise.
6742 (error): Likewise.
6743 (error_n): Likewise.
6744 (error_at): Likewise.
6745 (sorry): Likewise.
6746 (fatal_error): Likewise.
6747 (internal_error): Likewise.
6748 (internal_error_no_backtrace): Likewise.
6749 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6750 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6751 * diagnostic.h (struct diagnostic_context): Add fields
6752 "diagnostic_group_nesting_depth",
6753 "diagnostic_group_emission_count", "begin_group_cb",
6754 "end_group_cb".
6755 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6756 Add auto_diagnostic_group instance(s).
6757 (find_explicit_erroneous_behavior): Likewise.
6758 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6759 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6760 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6761 (gimplify_va_arg_expr): Likewise.
6762 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6763 (HSA_SORRY_AT): Likewise.
6764 * ipa-devirt.c (compare_virtual_tables): Likewise.
6765 (warn_odr): Likewise.
6766 * multiple_target.c (expand_target_clones): Likewise.
6767 * opts-common.c (cmdline_handle_error): Likewise.
6768 * reginfo.c (globalize_reg): Likewise.
6769 * substring-locations.c (format_warning_n_va): Likewise.
6770 * tree-inline.c (expand_call_inline): Likewise.
6771 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6772 * tree-ssa-loop-niter.c
6773 (do_warn_aggressive_loop_optimizations): Likewise.
6774 * tree-ssa-uninit.c (warn_uninit): Likewise.
6775 * tree.c (warn_deprecated_use): Likewise.
6776
6777 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6778
6779 PR target/87014
6780 * config/i386/i386.md (eh_return): Always update EH return
6781 address in word_mode.
6782
6783 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6784
6785 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6786 TARGET_SPLIT_COMPLEX_ARG is defined.
6787
6788 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6789
6790 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6791
6792 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6793
6794 PR target/86984
6795 * expr.c (expand_assignment): Assert that bitpos is positive.
6796 (store_field): Likewise
6797 (expand_expr_real_1): Make sure that bitpos is positive.
6798 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6799 integer overflow.
6800
6801 2018-08-20 Nathan Sidwell <nathan@acm.org>
6802
6803 * Makefile.in (CPP_ID_DATA_H): Delete.
6804 (CPP_INTERNAL_H): Don't add it.
6805 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6806 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6807
6808 2018-08-20 Richard Biener <rguenther@suse.de>
6809
6810 PR tree-optimization/78655
6811 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6812 pointer + offset nonnull if either operand is nonnull work.
6813
6814 2018-08-20 Tom de Vries <tdevries@suse.de>
6815
6816 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6817 unless the referenced die describes the added property using
6818 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6819 Otherwise, add a DW_AT_location to the referenced die.
6820
6821 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6822
6823 PR target/86994
6824 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6825 register_operand when calling ix86_set_reg_reg_cost.
6826 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6827 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6828 predicate and to 1 otherwise.
6829
6830 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6831
6832 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6833 emit a diagnostic that it is not supported and reset the option.
6834 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6835 supported and consume the option. (ASM_FINAL_SPEC): New.
6836
6837 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6838
6839 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6840 a sentence.
6841
6842 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6843
6844 C-SKY port: Documentation
6845
6846 * doc/extend.texi (C-SKY Function Attributes): New section.
6847 * doc/invoke.texi (Option Summary): Add C-SKY options.
6848 (C-SKY Options): New section.
6849 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6850
6851 2018-08-17 Jojo <jijie_rong@c-sky.com>
6852 Huibin Wang <huibin_wang@c-sky.com>
6853 Sandra Loosemore <sandra@codesourcery.com>
6854 Chung-Lin Tang <cltang@codesourcery.com>
6855
6856 C-SKY port: Backend implementation
6857
6858 * config/csky/*: New.
6859 * common/config/csky/*: New.
6860
6861 2018-08-17 Jojo <jijie_rong@c-sky.com>
6862 Huibin Wang <huibin_wang@c-sky.com>
6863 Sandra Loosemore <sandra@codesourcery.com>
6864 Chung-Lin Tang <cltang@codesourcery.com>
6865 Andrew Jenner <andrew@codesourcery.com>
6866
6867 C-SKY port: Configury
6868
6869 * config.gcc (csky-*-*): New.
6870 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6871 * configure: Regenerated.
6872
6873 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6874
6875 * dump-context.h: Include "dumpfile.h".
6876 (dump_context::dump_printf_va): Convert final param from va_list
6877 to va_list *. Convert from ATTRIBUTE_PRINTF to
6878 ATTRIBUTE_GCC_DUMP_PRINTF.
6879 (dump_context::dump_printf_loc_va): Likewise.
6880 * dumpfile.c: Include "stringpool.h".
6881 (make_item_for_dump_printf_va): Delete.
6882 (make_item_for_dump_printf): Delete.
6883 (class dump_pretty_printer): New class.
6884 (dump_pretty_printer::dump_pretty_printer): New ctor.
6885 (dump_pretty_printer::emit_items): New member function.
6886 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6887 function.
6888 (dump_pretty_printer::emit_item): New member function.
6889 (dump_pretty_printer::stash_item): New member function.
6890 (dump_pretty_printer::format_decoder_cb): New member function.
6891 (dump_pretty_printer::decode_format): New member function.
6892 (dump_context::dump_printf_va): Reimplement in terms of
6893 dump_pretty_printer.
6894 (dump_context::dump_printf_loc_va): Convert final param from va_list
6895 to va_list *.
6896 (dump_context::begin_scope): Reimplement call to
6897 make_item_for_dump_printf.
6898 (dump_printf): Update for change to dump_printf_va.
6899 (dump_printf_loc): Likewise.
6900 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6901 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6902 with %T, %E, and %G.
6903 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6904 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6905 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6906 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6907 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6908 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6909 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6910 within a dump_printf_loc call to "%wu".
6911 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6912 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6913 missing space after "=".
6914 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6915 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6916 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6917 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6918 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6919 duplicate "vectorized" from message.
6920
6921 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6922
6923 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6924 polyNxK_t element's TYPE_STRING_FLAG.
6925
6926 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6927
6928 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6929 (they were unnamed before). Fix comments.
6930
6931 2018-08-17 Nathan Sidwell <nathan@acm.org>
6932
6933 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6934
6935 2018-08-17 Richard Biener <rguenther@suse.de>
6936
6937 PR tree-optimization/86841
6938 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6939
6940 2018-08-17 Martin Liska <mliska@suse.cz>
6941
6942 * common.opt: Remove Warn, Init and Report for options with
6943 Ignore/Deprecated flag. Warning is done automatically for
6944 Deprecated flags.
6945 * config/i386/i386.opt: Likewise.
6946 * config/ia64/ia64.opt: Likewise.
6947 * config/rs6000/rs6000.opt: Likewise.
6948 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6949 Remove usage of flag_check_pointer_bounds.
6950 * lto-wrapper.c (merge_and_complain): Do not handle
6951 OPT_fcheck_pointer_bounds.
6952 (append_compiler_options): Likewise.
6953 * opt-functions.awk: Do not handle Deprecated.
6954 * optc-gen.awk: Check that Var, Report and Init are not
6955 used for an option with Ignore/Deprecated flag.
6956 * opts-common.c (decode_cmdline_option): Do not report
6957 CL_ERR_DEPRECATED.
6958 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6959 options.
6960 * opts.h (struct cl_option): Remove cl_deprecated flag.
6961 (CL_ERR_DEPRECATED): Remove error enum value.
6962
6963 2018-08-17 Richard Biener <rguenther@suse.de>
6964
6965 PR middle-end/86505
6966 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6967 across a va-arg-pack using call adjust its return value accordingly.
6968
6969 2018-08-16 Martin Sebor <msebor@redhat.com>
6970
6971 PR tree-optimization/86853
6972 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6973 (struct fmtresult): Add member and initialize it in ctors.
6974 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6975 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6976 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6977 (parse_directive): Handle %C same as %c.
6978 (sprintf_dom_walker::compute_format_length): Adjust.
6979 (is_call_safe): Adjust.
6980
6981 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6982
6983 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6984 for determining how to count the elements.
6985 * builtins.h (c_strlen): Adjust prototype.
6986 * expr.c (string_constant): Add new parameter mem_size.
6987 Set *mem_size appropriately.
6988 * expr.h (string_constant): Adjust protoype.
6989 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6990 * gimple-fold.h (get_range_strlen): Adjust prototype.
6991 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6992 (format_string): Call get_string_length with eltsize.
6993
6994 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6995
6996 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6997 to emit the span, rather than setting it as the prefix.
6998
6999 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7000
7001 * diagnostic-show-locus.c (layout::start_annotation_line): Add
7002 "margin_char" parameter, defaulting to space. Use it in place
7003 of pp_space for the initial part of the margin.
7004 (layout::print_leading_fixits): Use '+' when filling the margin
7005 of line-insertion fix-it hints.
7006
7007 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7008
7009 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
7010 Delete.
7011
7012 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7013
7014 * config/rs6000/altivec.md: Don't set length attribute to the default
7015 value.
7016 * config/rs6000/darwin.md: Ditto.
7017 * config/rs6000/dfp.md: Ditto.
7018 * config/rs6000/htm.md: Ditto.
7019 * config/rs6000/rs6000.md: Ditto.
7020 * config/rs6000/sync.md: Ditto.
7021 * config/rs6000/vsx.md: Ditto.
7022
7023 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7024
7025 * config/rs6000/altivec.md: Don't set length attribute to the default
7026 value, for branch instructions.
7027 * config/rs6000/darwin.md: Ditto.
7028 * config/rs6000/rs6000.md: Ditto.
7029
7030 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7031
7032 * config/rs6000/rs6000.md (length): Always define as const_int 4.
7033 (unnamed conditional branch define_insn): Set length to 4 or 8
7034 depending on offset.
7035 (<bd>_<mode>): Similar, for alternative 0.
7036 (<bd>tf_<mode>): Ditto.
7037
7038 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7039
7040 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
7041
7042 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
7043
7044 * doc/rtl.texi: Replace old RTX class names with new names.
7045
7046
7047 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
7048
7049 * expmed.h (canonicalize_comparison): New declaration.
7050 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
7051 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
7052 * optabs.c (prepare_cmp_insn): Likewise.
7053 * rtl.h (unsigned_condition_p): New function which checks if a
7054 comparison operator is unsigned.
7055
7056 2018-08-16 Nathan Sidwell <nathan@acm.org>
7057
7058 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
7059 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
7060
7061 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7062
7063 PR target/84711
7064 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
7065 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
7066 (mov<mov>): ..this and enable unconditionally.
7067
7068 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7069
7070 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
7071
7072 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
7073
7074 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
7075 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
7076 "Common" with "Target".
7077
7078 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7079
7080 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
7081 * doc/invoke.texi (mmitigate-rop): Remove.
7082 * config/i386/i386.c: Do not include "regrename.h".
7083 (ix86_rop_should_change_byte_p, reg_encoded_number)
7084 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
7085 Remove.
7086 (ix86_reorg): Remove call to ix86_mitigate_rop.
7087 * config/i386/i386.md (attr "modrm_class"): Remove.
7088 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
7089 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
7090 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
7091
7092 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
7093
7094 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
7095 allow folding of mergeh() and mergel() for the float and double types.
7096 (fold_mergehl_helper): Rework to handle building a permute tree
7097 for float vectors.
7098
7099 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7100
7101 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
7102 for TARGET_SSE.
7103
7104 2018-08-15 David Malcolm <dmalcolm@redhat.com>
7105
7106 * common.opt (fdiagnostics-show-labels): New option.
7107 * diagnostic-show-locus.c (class layout_range): Add field
7108 "m_label".
7109 (class layout): Add field "m_show_labels_p".
7110 (layout_range::layout_range): Add param "label" and use it to
7111 initialize m_label.
7112 (make_range): Pass in NULL for new "label" param of layout_range's
7113 ctor.
7114 (layout::layout): Initialize m_show_labels_p.
7115 (layout::maybe_add_location_range): Pass in loc_range->m_label
7116 when constructing layout_range instances.
7117 (struct line_label): New struct.
7118 (layout::print_any_labels): New member function.
7119 (layout::print_line): Call it if label-printing is enabled.
7120 (selftest::test_one_liner_labels): New test.
7121 (selftest::test_diagnostic_show_locus_one_liner): Call it.
7122 * diagnostic.c (diagnostic_initialize): Initialize
7123 context->show_labels_p.
7124 * diagnostic.h (struct diagnostic_context): Add field
7125 "show_labels_p".
7126 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7127 -fno-diagnostics-show-labels.
7128 * dwarf2out.c (gen_producer_string): Add
7129 OPT_fdiagnostics_show_labels to the ignored options.
7130 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
7131 param.
7132 (gcc_rich_location::maybe_add_expr): Likewise.
7133 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
7134 label" param, defaulting to NULL.
7135 (gcc_rich_location::add_expr): Add "label" param.
7136 (gcc_rich_location::maybe_add_expr): Likewise.
7137 (class text_range_label): New class.
7138 (class range_label_for_type_mismatch): New class.
7139 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
7140 of format_warning_va.
7141 (fmtwarn_n): Likewise for new params of format_warning_n_va.
7142 * lto-wrapper.c (merge_and_complain): Add
7143 OPT_fdiagnostics_show_labels to the "pick one setting" options.
7144 (append_compiler_options): Likewise to the dropped options.
7145 (append_diag_options): Likewise to the passed-on options.
7146 * opts.c (common_handle_option): Handle the new option.
7147 * selftest-diagnostic.c
7148 (test_diagnostic_context::test_diagnostic_context): Enable
7149 show_labels_p.
7150 * substring-locations.c: Include "gcc-rich-location.h".
7151 (format_warning_n_va): Add "fmt_label" and "param_label" params
7152 and use them as appropriate.
7153 (format_warning_va): Add "fmt_label" and "param_label" params,
7154 passing them on to format_warning_n_va.
7155 (format_warning_at_substring): Likewise.
7156 (format_warning_at_substring_n): Likewise.
7157 * substring-locations.h (format_warning_va): Add "fmt_label" and
7158 "param_label" params.
7159 (format_warning_n_va): Likewise.
7160 (format_warning_at_substring): Likewise.
7161 (format_warning_at_substring_n): Likewise.
7162 * toplev.c (general_init): Initialize global_dc->show_labels_p.
7163
7164 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
7165
7166 PR testsuite/86519
7167 * builtins.c (expand_builtin_memcmp): Do not expand the call
7168 when overflow is detected.
7169
7170 2018-08-15 Martin Sebor <msebor@redhat.com>
7171
7172 PR tree-optimization/71625
7173 * config/aarch64/aarch64-builtins.c
7174 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7175
7176 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
7177
7178 * config/s390/s390.c (s390_reorg): Remove loop.
7179
7180 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7181
7182 * config/darwin.c
7183 (darwin_function_switched_text_sections): Delete.
7184 * gcc/config/darwin.h
7185 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7186
7187 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7188
7189 PR target/81685
7190 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7191 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
7192 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7193
7194 2018-08-15 Martin Liska <mliska@suse.cz>
7195
7196 PR tree-optimization/86925
7197 * predict.c (expr_expected_value_1): When taking
7198 later predictor, assign also probability.
7199 Use fold_build2_initializer_loc in order to fold
7200 the expression in -frounding-math.
7201
7202 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
7203
7204 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7205 patterns.
7206 (expand_vec_perm_1): Try the new method.
7207
7208 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
7209
7210 PR target/86547
7211 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7212 Check whether lra_live_max_point is 0 before dividing.
7213
7214 2018-08-14 Martin Sebor <msebor@redhat.com>
7215
7216 PR tree-optimization/86650
7217 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7218 (vrp_prop::check_mem_ref): Same.
7219
7220 2018-08-13 Liu Hao <lh_mouse@126.com>
7221
7222 * pretty-print.c (eat_esc_sequence): Swap the foreground and
7223 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7224 and clear it thereafter, as it only works for DBCS.
7225
7226 2018-08-13 Liu Hao <lh_mouse@126.com>
7227
7228 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7229 handle returned by _get_osf_handle().
7230
7231 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7232
7233 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7234 for folding vec_perm.
7235
7236 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7237
7238 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7239 Add support for gimple-folding of vec_pack() and vec_unpack()
7240 intrinsics.
7241
7242 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7243
7244 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7245 vec_xst variants to the list.
7246 (rs6000_gimple_fold_builtin): Add support for folding unaligned
7247 vector loads and stores.
7248
7249 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
7250
7251 * config.gcc (rs6000-ibm-aix4.x): Delete.
7252 (rs6000-ibm-aix5.1): Delete.
7253 (rs6000-ibm-aix5.2): Delete.
7254 (rs6000-ibm-aix5.3): Delete.
7255 * config/rs6000/aix43.h: Delete.
7256 * config/rs6000/aix51.h: Delete.
7257 * config/rs6000/aix52.h: Delete.
7258 * config/rs6000/t-aix43: Delete.
7259
7260 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
7261
7262 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7263 New function.
7264 (s390_decompose_address): Factor out constant pool ref
7265 decomposition.
7266
7267 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7268
7269 * config/nds32/nds32-predicates.c
7270 (nds32_can_use_bclr_p): Change return type as bool.
7271 (nds32_can_use_bset_p): Ditto.
7272 (nds32_can_use_btgl_p): Ditto.
7273 (nds32_can_use_bitci_p): Ditto.
7274 * config/nds32/nds32-protos.h
7275 (nds32_can_use_bclr_p): Change declaration.
7276 (nds32_can_use_bset_p): Ditto.
7277 (nds32_can_use_btgl_p): Ditto.
7278 (nds32_can_use_bitci_p): Ditto.
7279
7280 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7281
7282 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7283 Support -msched-prolog-epilog option.
7284 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7285
7286 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7287
7288 * common/config/nds32/nds32-common.c
7289 (nds32_option_optimization_table): Enalbe -malways-align.
7290
7291 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7292
7293 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7294 extra_headers.
7295 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7296 OPT_misr_secure_ case.
7297 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7298 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7299 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7300 secure attribute.
7301 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7302 (nds32_isr_info): New field security_level.
7303 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7304 * config/nds32/nds32.md (return_internal): Consider critical attribute.
7305 * config/nds32/nds32.opt (misr-secure): New option.
7306 * config/nds32/nds32_init.inc: New file.
7307 * config/nds32/nds32_isr.h: New file.
7308
7309 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
7310
7311 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7312 Update comment for atomic instructions.
7313 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7314 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7315 Remove.
7316 (atomic_loaddi): Revise fence expansion to only emit fence prior to
7317 load for __ATOMIC_SEQ_CST model.
7318 (atomic_loaddi_1): Remove float register target.
7319 (atomic_storedi): Handle CONST_INT values.
7320 (atomic_storedi_1): Remove float register source. Add special case
7321 for zero value.
7322 (memory_barrier): New expander and insn.
7323
7324 2018-08-11 Jakub Jelinek <jakub@redhat.com>
7325
7326 PR tree-optimization/86835
7327 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7328 new_stmt after def_gsi, make sure to insert new_square_stmt after
7329 that stmt, not 2 stmts before it.
7330
7331 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
7332
7333 PR target/82418
7334 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7335 instead of SWI48.
7336
7337 2018-08-10 Martin Liska <mliska@suse.cz>
7338
7339 PR target/83610
7340 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7341 function type.
7342 * builtins.c (expand_builtin_expect_with_probability):
7343 New function.
7344 (expand_builtin_expect_with_probability): New function.
7345 (build_builtin_expect_predicate): Add new argumnet probability
7346 for BUILT_IN_EXPECT_WITH_PROBABILITY.
7347 (fold_builtin_expect):
7348 (fold_builtin_2):
7349 (fold_builtin_3):
7350 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7351 * builtins.h (fold_builtin_expect): Set new argument.
7352 * doc/extend.texi: Document __builtin_expect_with_probability.
7353 * doc/invoke.texi: Likewise.
7354 * gimple-fold.c (gimple_fold_call): Pass new argument.
7355 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7356 also BUILT_IN_EXPECT_WITH_PROBABILITY.
7357 * predict.c (get_predictor_value): New function.
7358 (expr_expected_value): Add new argument probability. Assume
7359 that predictor and probability are always non-null.
7360 (expr_expected_value_1): Likewise. For __builtin_expect and
7361 __builtin_expect_with_probability set probability. Handle
7362 combination in binary expressions.
7363 (tree_predict_by_opcode): Simplify code by simply calling
7364 get_predictor_value.
7365 (pass_strip_predict_hints::execute): Add handling of
7366 BUILT_IN_EXPECT_WITH_PROBABILITY.
7367 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7368 new predictor.
7369 * tree.h (DECL_BUILT_IN_P): New function.
7370
7371 2018-08-10 Martin Liska <mliska@suse.cz>
7372
7373 PR tree-optimization/85799
7374 * passes.def: Add argument for pass_strip_predict_hints.
7375 * predict.c (class pass_strip_predict_hints): Add new argument
7376 early_p.
7377 (strip_predictor_early): New function.
7378 (pass_strip_predict_hints::execute): Call the function to
7379 strip predictors.
7380 (strip_predict_hints): New function.
7381 * predict.def: Fix comment.
7382
7383 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7384
7385 * Makefile.in: Clarify which tm.texi to copy over to assert the
7386 right to grant a GFDL license for all.
7387
7388 2018-08-09 Jeff Law <law@redhat.com>
7389
7390 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7391 unused variable.
7392
7393 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7394
7395 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7396 prototype.
7397
7398 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7399
7400 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7401 reductions for variable-length vectors.
7402
7403 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7404
7405 PR other/84889
7406 * common.opt (fdiagnostics-show-line-numbers): New option.
7407 * diagnostic-show-locus.c (class layout): Add fields
7408 "m_show_line_numbers_p" and "m_linenum_width";
7409 (num_digits): New function.
7410 (test_num_digits): New function.
7411 (layout::layout): Initialize new fields. Update m_x_offset
7412 logic to handle any left margin.
7413 (layout::print_source_line): Print line number when requested.
7414 (layout::start_annotation_line): New member function.
7415 (layout::print_annotation_line): Call it.
7416 (layout::print_leading_fixits): Likewise.
7417 (layout::print_trailing_fixits): Likewise. Update calls to
7418 move_to_column for new parameter.
7419 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7420 it to potentially call start_annotation_line.
7421 (layout::show_ruler): Call start_annotation_line.
7422 (selftest::test_line_numbers_multiline_range): New selftest.
7423 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7424 and selftest::test_line_numbers_multiline_range.
7425 * diagnostic.c (diagnostic_initialize): Initialize
7426 show_line_numbers_p.
7427 * diagnostic.h (struct diagnostic_context): Add field
7428 "show_line_numbers_p".
7429 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7430 -fno-diagnostics-show-line-numbers.
7431 * dwarf2out.c (gen_producer_string): Add
7432 OPT_fdiagnostics_show_line_numbers to the ignored options.
7433 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7434 one setting" options.
7435 (append_compiler_options): Likewise to the dropped options.
7436 (append_diag_options): Likewise to the passed-on options.
7437 * opts.c (common_handle_option): Handle the new option.
7438 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7439
7440 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7441
7442 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7443 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7444 third argument of type "const signed char" to descriptions of
7445 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7446 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7447 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7448 __builtin_bcdsub_ov functions.
7449
7450 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7451
7452 PR tree-optimization/86858
7453 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7454 flow_bb_inside_loop_p calls.
7455
7456 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7457
7458 PR tree-optimization/86871
7459 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7460 instead of gimple_assign_lhs.
7461
7462 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7463
7464 PR target/86887
7465 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7466 register constraint to operand 0.
7467 (add<mode>3_carryinC): Likewise.
7468 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7469
7470 2018-08-09 Martin Liska <mliska@suse.cz>
7471
7472 PR c/86895
7473 * common.opt: Remove extra line.
7474
7475 2018-08-09 Martin Liska <mliska@suse.cz>
7476
7477 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7478 at the end of a line, make first letter capital and end up
7479 a sentence with a dot.
7480 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7481 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7482 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7483 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7484 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7485 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7486 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7487 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7488 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7489 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7490 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7491 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7492 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7493 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7494 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7495 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7496 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7497 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7498
7499 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7500
7501 PR target/84332
7502 * config/s390/s390.c (s390_option_override_internal): Reduce the
7503 stack-clash-protection-probe-interval param if it would be too big
7504 for z900.
7505
7506 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7507
7508 PR target/46179
7509 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7510 * config/m68k/m68k.c (handle_move_double): Don't call
7511 m68k_final_prescan_insn.
7512 (m68k_adjust_decorated_operand): Renamed from
7513 m68k_final_prescan_insn, remove first and third operand and
7514 simplify.
7515 (print_operand): Call it.
7516 (print_operand_address): Call it.
7517
7518 2018-08-08 Nathan Sidwell <nathan@acm.org>
7519
7520 * diagnostic.c (diagnostic_report_current_module): Use
7521 linemap_included_from & linemap_included_from_linemap.
7522
7523 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7524
7525 * config/aarch64/aarch64-cores.def: Add phecda core.
7526 * config/aarch64/aarch64-tune.md: Regenerate.
7527 * doc/invoke.texi: Add phecda core.
7528
7529 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7530
7531 PR target/85295
7532 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7533 definitions.
7534 * config/s390/s390.md ("movti"): Add more alternatives for
7535 constant to GPR copies.
7536
7537 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7538
7539 * config/s390/s390.c: Fix whitespace damage throughout the file.
7540 * config/s390/s390.h: Likewise.
7541 * config/s390/tpf.h: Likewise.
7542
7543 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7544
7545 * config/s390/s390.c (s390_loadrelative_operand_p):
7546 Remove TARGET_CPU_ZARCH usages.
7547 (s390_rtx_costs): Likewise.
7548 (s390_legitimate_constant_p): Likewise.
7549 (s390_cannot_force_const_mem): Likewise.
7550 (legitimate_reload_constant_p): Likewise.
7551 (s390_preferred_reload_class): Likewise.
7552 (legitimize_pic_address): Likewise.
7553 (legitimize_tls_address): Likewise.
7554 (s390_split_branches): Removed.
7555 (s390_add_execute): Removed.
7556 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7557 (s390_mainpool_start): Likewise.
7558 (s390_mainpool_finish): Likewise.
7559 (s390_mainpool_cancel): Removed.
7560 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7561 (s390_chunkify_cancel): Likewise.
7562 (s390_return_addr_rtx): Likewise.
7563 (s390_register_info): Remove split_branches_pending_p uages.
7564 (s390_optimize_register_info): Likewise.
7565 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7566 split_branches_pending_p usages.
7567 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7568 (s390_load_got): Likewise.
7569 (s390_expand_split_stack_prologue): Likewise.
7570 (output_asm_nops): Likewise.
7571 (s390_function_profiler): Likewise.
7572 (s390_emit_call): Likewise.
7573 (s390_conditional_register_usage): Likewise.
7574 (s390_optimize_prologue): Likewise.
7575 (s390_reorg): Remove TARGET_CPU_ZARCH and
7576 split_branches_pending_p usages.
7577 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7578 usages.
7579 (s390_output_indirect_thunk_function): Likewise.
7580 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7581 (TARGET_CPU_ZARCH_P): Removed.
7582 (struct machine_function): Remove split_branches_pending_p.
7583 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7584
7585 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7586
7587 * common/config/s390/s390-common.c (processor_flags_table):
7588 Remove flags.
7589 * config.gcc: Remove with_arch/with_tune support.
7590 * config/s390/2064.md: Remove cpu attribute comparisons.
7591 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7592 Remove MTN.
7593 * config/s390/linux.h (ASM_SPEC):
7594 Remove -march support.
7595 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7596 Use a table to get an arch level.
7597 * config/s390/s390-opts.h (enum processor_type):
7598 Remove enum values.
7599 * config/s390/s390.c
7600 (processor_table): Remove entries, add arch_level values.
7601 (s390_issue_rate): Remove cases.
7602 (s390_option_override): Adjust
7603 s390_option_override_internal() call.
7604 (s390_option_override_internal): Remove deprecation warning.
7605 (s390_valid_target_attribute_tree): Adjust
7606 s390_option_override_internal() call.
7607 * config/s390/s390.h (struct s390_processor):
7608 Share with s390-c.c, add arch_level field.
7609 * config/s390/s390.md:
7610 Remove occurrences in cpu attribute.
7611 * config/s390/s390.opt: Remove -march/-mtune support.
7612 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7613 * doc/invoke.texi: Remove deprecation warning.
7614
7615 2018-08-08 Luis Machado <luis.machado@linaro.org>
7616
7617 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7618 global.
7619 (qdf24xx_tunings): Set vector cost structure to
7620 qdf24xx_vector_cost.
7621
7622 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7623 <register_sextend>: Set to 3.
7624
7625 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7626
7627 PR target/86838
7628 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7629 * config/aarch64/aarch64-simd.md
7630 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7631 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7632 (aarch64_frecpx<mode>): ...this new pattern.
7633 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7634 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7635
7636 2018-08-07 Martin Liska <mliska@suse.cz>
7637
7638 PR middle-end/83023
7639 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7640 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7641 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7642 * doc/extend.texi: Document that malloc attribute adds
7643 hit to compiler.
7644
7645 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7646
7647 PR target/86785
7648 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7649 Define to speculation_safe_value_not_needed.
7650
7651 2018-08-06 Jeff Law <law@redhat.com>
7652
7653 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7654 the vr_values instance to cprop_into_stmt.
7655 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7656 (cprop_operand): Also query EVRP to determine if OP is a constant.
7657
7658 2018-08-06 Nathan Sidwell <nathan@acm.org>
7659
7660 * diagnostic.c (diagnostic_report_current_module): Reroll
7661 included-at loop. Translate text.
7662
7663 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7664
7665 * function-tests.c (selftest::test_expansion_to_rtl): Call
7666 free_after_compilation.
7667
7668 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7669
7670 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7671
7672 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7673
7674 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7675 loops with memory block operations from getting unrolled.
7676
7677 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7678
7679 PR target/86807
7680 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7681 Define to speculation_safe_value_not_needed.
7682
7683 2018-08-06 Jeff Law <law@redhat.com>
7684
7685 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7686 assert.
7687
7688 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7689
7690 PR target/86662
7691 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7692 with all enabled __intN types.
7693
7694 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7695
7696 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7697
7698 * alias.c (record_set): Check for clobber high.
7699 * cfgexpand.c (expand_gimple_stmt): Likewise.
7700 * combine-stack-adj.c (single_set_for_csa): Likewise.
7701 * combine.c (find_single_use_1): Likewise.
7702 (set_nonzero_bits_and_sign_copies): Likewise.
7703 (get_combine_src_dest): Likewise.
7704 (is_parallel_of_n_reg_sets): Likewise.
7705 (try_combine): Likewise.
7706 (record_dead_and_set_regs_1): Likewise.
7707 (reg_dead_at_p_1): Likewise.
7708 (reg_dead_at_p): Likewise.
7709 * dce.c (deletable_insn_p): Likewise.
7710 (mark_nonreg_stores_1): Likewise.
7711 (mark_nonreg_stores_2): Likewise.
7712 * df-scan.c (df_find_hard_reg_defs): Likewise.
7713 (df_uses_record): Likewise.
7714 (df_get_call_refs): Likewise.
7715 * dwarf2out.c (mem_loc_descriptor): Likewise.
7716 * haifa-sched.c (haifa_classify_rtx): Likewise.
7717 * ira-build.c (create_insn_allocnos): Likewise.
7718 * ira-costs.c (scan_one_insn): Likewise.
7719 * ira.c (equiv_init_movable_p): Likewise.
7720 (rtx_moveable_p): Likewise.
7721 (interesting_dest_for_shprep): Likewise.
7722 * jump.c (mark_jump_label_1): Likewise.
7723 * postreload-gcse.c (record_opr_changes): Likewise.
7724 * postreload.c (reload_cse_simplify): Likewise.
7725 (struct reg_use): Add source expr.
7726 (reload_combine): Check for clobber high.
7727 (reload_combine_note_use): Likewise.
7728 (reload_cse_move2add): Likewise.
7729 (move2add_note_store): Likewise.
7730 * print-rtl.c (print_pattern): Likewise.
7731 * recog.c (decode_asm_operands): Likewise.
7732 (store_data_bypass_p): Likewise.
7733 (if_test_bypass_p): Likewise.
7734 * regcprop.c (kill_clobbered_value): Likewise.
7735 (kill_set_value): Likewise.
7736 * reginfo.c (reg_scan_mark_refs): Likewise.
7737 * reload1.c (maybe_fix_stack_asms): Likewise.
7738 (eliminate_regs_1): Likewise.
7739 (elimination_effects): Likewise.
7740 (mark_not_eliminable): Likewise.
7741 (scan_paradoxical_subregs): Likewise.
7742 (forget_old_reloads_1): Likewise.
7743 * reorg.c (find_end_label): Likewise.
7744 (try_merge_delay_insns): Likewise.
7745 (redundant_insn): Likewise.
7746 (own_thread_p): Likewise.
7747 (fill_simple_delay_slots): Likewise.
7748 (fill_slots_from_thread): Likewise.
7749 (dbr_schedule): Likewise.
7750 * resource.c (update_live_status): Likewise.
7751 (mark_referenced_resources): Likewise.
7752 (mark_set_resources): Likewise.
7753 * rtl.c (copy_rtx): Likewise.
7754 * rtlanal.c (reg_referenced_p): Likewise.
7755 (single_set_2): Likewise.
7756 (noop_move_p): Likewise.
7757 (note_stores): Likewise.
7758 * sched-deps.c (sched_analyze_reg): Likewise.
7759 (sched_analyze_insn): Likewise.
7760
7761 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7762
7763 * cse.c (invalidate_reg): New function extracted from...
7764 (invalidate): ...here.
7765 (canonicalize_insn): Check for clobber high.
7766 (invalidate_from_clobbers): invalidate clobber highs.
7767 (invalidate_from_sets_and_clobbers): Likewise.
7768 (count_reg_usage): Check for clobber high.
7769 (insn_live_p): Likewise.
7770 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7771 (cselib_invalidate_regno): Check for clobber in setter.
7772 (cselib_invalidate_rtx): Pass through setter.
7773 (cselib_invalidate_rtx_note_stores):
7774 (cselib_process_insn): Check for clobber high.
7775 * cselib.h (cselib_invalidate_rtx): Add operand.
7776
7777 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7778
7779 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7780 (mark_not_eliminable): Likewise.
7781 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7782 * lra-lives.c (process_bb_lives): Check for clobber high.
7783 * lra.c (new_insn_reg): Remember clobber highs.
7784 (collect_non_operand_hard_regs): Check for clobber high.
7785 (lra_set_insn_recog_data): Likewise.
7786 (add_regs_to_insn_regno_info): Likewise.
7787 (lra_update_insn_regno_info): Likewise.
7788
7789 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7790
7791 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7792 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7793
7794 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7795
7796 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7797 (copy_insn_1): Likewise.
7798 (gen_hard_reg_clobber_high): New gen function.
7799 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7800 * genemit.c (gen_exp): Likewise.
7801 (gen_emit_seq): Pass through info.
7802 (gen_insn): Check for CLOBBER_HIGH.
7803 (gen_expand): Pass through info.
7804 (gen_split): Likewise.
7805 (output_add_clobbers): Likewise.
7806 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7807 (remove_clobbers): Likewise.
7808 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7809
7810 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7811
7812 * doc/rtl.texi (clobber_high): Add.
7813 (parallel): Add in clobber high
7814 * rtl.c (rtl_check_failed_code3): Add function.
7815 * rtl.def (CLOBBER_HIGH): Add expression.
7816 * rtl.h (RTL_CHECKC3): Add macro.
7817 (rtl_check_failed_code3): Add declaration.
7818 (XC3EXP): Add macro.
7819
7820 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7821
7822 PR target/86386
7823 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7824 cfun->machine->max_used_stack_alignment if needed.
7825
7826 2018-08-04 Martin Sebor <msebor@redhat.com>
7827
7828 PR tree-optimization/86571
7829 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7830 NaN output to 4.
7831
7832 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7833
7834 PR target/86799
7835 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7836 Define.
7837
7838 2018-08-03 Jeff Law <law@redhat.com>
7839
7840 PR target/86795
7841 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7842 Define to speculation_safe_value_not_needed.
7843
7844 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7845
7846 * doc/gcov.texi (-x): Remove duplicate "to".
7847 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7848 (-Wif-not-aligned): Remove duplicate "is".
7849 (-flto): Remove duplicate "the".
7850 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7851 duplicate "v5.00.b".
7852 (MSP430 Options): Remove duplicate "and" from the description
7853 of "-mgprel-sec=regexp".
7854 (x86 Options): Remove duplicate copies of "vmldLog102" and
7855 vmlsLog104 from description of "-mveclibabi=type".
7856
7857 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7858
7859 * internal-fn.h (first_commutative_argument): Declare.
7860 * internal-fn.c (first_commutative_argument): New function.
7861 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7862 restrictions for pattern statements. Use first_commutative_argument
7863 to look for commutative operands in calls to internal functions.
7864
7865 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7866
7867 * Makefile.in (wide-int-range.o): New.
7868 * tree-vrp.c: Move all the wide_int_* functions to...
7869 * wide-int-range.cc: ...here.
7870 * tree-vrp.h: Move all the wide_int_* prototypes to...
7871 * wide-int-range.h: ...here.
7872
7873 2018-08-03 Tom de Vries <tdevries@suse.de>
7874
7875 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7876 UI_NONE.
7877 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7878 * except.c (output_function_exception_table): Do early exit if
7879 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7880
7881 2018-08-03 Martin Liska <mliska@suse.cz>
7882
7883 * predict.c (dump_prediction): Change to 2 digits
7884 in fraction part.
7885
7886 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7887
7888 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7889 neon_dup_q to...
7890 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7891
7892 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7893
7894 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7895 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7896 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7897 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7898 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7899
7900 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7901
7902 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7903 pp_take_prefix when saving the existing prefix.
7904 * diagnostic.c (diagnostic_append_note): Likewise.
7905 * langhooks.c (lhd_print_error_function): Likewise.
7906 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7907 param's type. Free the existing prefix.
7908 (pp_take_prefix): New function.
7909 (pretty_printer::pretty_printer): Drop the prefix parameter.
7910 Rename the length parameter to match the comment.
7911 (pretty_printer::~pretty_printer): Free the prefix.
7912 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7913 parameter.
7914 (struct pretty_printer): Drop the "const" from "prefix" field's
7915 type and clarify memory management.
7916 (pp_set_prefix): Drop the "const" from the 2nd param.
7917 (pp_take_prefix): New decl.
7918
7919 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7920
7921 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7922 for word_mode_ok here instead of passing as argument.
7923 (expand_block_compare): Change select_block_compare_mode() call.
7924 (expand_strncmp_gpr_sequence): New function.
7925 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7926
7927 2018-08-02 Jeff Law <law@redhat.com>
7928
7929 PR target/86790
7930 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7931 Define to speculation_safe_value_not_needed.
7932
7933 PR target/86784
7934 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7935 Define to speculation_safe_value_not_needed.
7936
7937 2018-08-02 Tom de Vries <tdevries@suse.de>
7938
7939 PR target/86660
7940 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7941 function. Return UI_TARGET unconditionally.
7942 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7943 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7944
7945 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7946
7947 * genemit.c (print_overload_test): Fix typo.
7948
7949 2018-08-02 Richard Biener <rguenther@suse.de>
7950
7951 PR tree-optimization/86816
7952 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7953 which checks for value availability before querying it.
7954 (gvn_uses_equal): Use it.
7955 (same_succ_hash): Likewise.
7956 (gimple_equal_p): Likewise.
7957
7958 2018-08-02 Nick Clifton <nickc@redhat.com>
7959
7960 PR target/86813
7961 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7962 Define to speculation_safe_value_not_needed.
7963
7964 PR target/86810
7965 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7966 Define to speculation_safe_value_not_needed.
7967
7968 PR target/86810
7969 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7970 Define to speculation_safe_value_not_needed.
7971
7972 PR target/86803
7973 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7974 Define to speculation_safe_value_not_needed.
7975
7976 PR target/86797
7977 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7978 Define to speculation_safe_value_not_needed.
7979
7980 PR target/86791
7981 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7982 Define to speculation_safe_value_not_needed.
7983
7984 PR target/86789
7985 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7986 Define to speculation_safe_value_not_needed.
7987
7988 PR target/86787
7989 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7990 Define to speculation_safe_value_not_needed.
7991
7992 PR target/86782
7993 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7994 speculation_safe_value_not_needed.
7995
7996 PR target/86781
7997 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7998 to speculation_safe_value_not_needed.
7999
8000 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8001
8002 * doc/md.texi: Expand the documentation of instruction names
8003 to mention port-local uses. Document '@' in pattern names.
8004 * read-md.h (overloaded_instance, overloaded_name): New structs.
8005 (mapping): Declare.
8006 (md_reader::handle_overloaded_name): New member function.
8007 (md_reader::get_overloads): Likewise.
8008 (md_reader::m_first_overload): New member variable.
8009 (md_reader::m_next_overload_ptr): Likewise.
8010 (md_reader::m_overloads_htab): Likewise.
8011 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
8012 m_next_overload_ptr and m_overloads_htab.
8013 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
8014 (get_mode_token, get_code_token, get_int_token): New functions.
8015 (map_attr_string): Add an optional argument that passes back
8016 the associated iterator.
8017 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
8018 (md_reader::handle_overloaded_name, add_overload_instance): New
8019 functions.
8020 (apply_iterators): Handle '@' names. Report an error if '@'
8021 is used without iterators.
8022 (initialize_iterators): Initialize the new iterator_group fields.
8023 * genopinit.c (handle_overloaded_code_for)
8024 (handle_overloaded_gen): New functions.
8025 (main): Use them to print declarations of maybe_code_for_* and
8026 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
8027 * genemit.c (print_overload_arguments, print_overload_test)
8028 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
8029 (main): Use it to print definitions of maybe_code_for_* and
8030 maybe_gen_* functions.
8031 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
8032 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
8033 instead of explicit mode checks.
8034 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
8035 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
8036 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
8037 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
8038 (aarch64_expand_compare_and_swap): Likewise
8039 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
8040 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
8041 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
8042 (aarch64_constant_pool_reload_icode): Delete.
8043 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
8044 instead of aarch64_constant_pool_reload_icode. Use
8045 code_for_aarch64_reload_mov instead of explicit mode checks.
8046 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
8047 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
8048 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
8049 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
8050 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
8051 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
8052 (aarch64_atomic_load_op_code): Delete.
8053 (aarch64_emit_atomic_load_op): Likewise.
8054 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
8055 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
8056 instead of aarch64_emit_atomic_load_op.
8057 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
8058 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
8059 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
8060 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
8061 character before the pattern name.
8062 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
8063 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
8064 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
8065 (aarch64_frecps<mode>): Likewise.
8066 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
8067 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
8068 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
8069 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
8070 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
8071
8072 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8073
8074 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
8075 Allow HFmode constants if TARGET_FP_F16INST.
8076
8077 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
8078
8079 PR target/86014
8080 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
8081 No longer check last store for clobber of address register.
8082
8083 2018-08-02 Martin Liska <mliska@suse.cz>
8084
8085 PR gcov-profile/86817
8086 * gcov.c (process_all_functions): New function.
8087 (main): Call it.
8088 (process_file): Move functions processing to
8089 process_all_functions.
8090
8091 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8092
8093 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
8094 "const" to the "gimple *" and "rtx_insn *" parameters.
8095 * dumpfile.h (dump_user_location_t::dump_user_location_t):
8096 Likewise.
8097 (dump_location_t::dump_location_t): Likewise.
8098
8099 2018-08-01 Martin Sebor <msebor@redhat.com>
8100
8101 PR tree-optimization/86650
8102 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
8103 rather than a "gcall *". Directly pass the data of interest
8104 to percent_K_format, rather than building a temporary CALL_EXPR
8105 to hold it.
8106 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
8107 (gimple_fold_builtin_strncat): Adjust.
8108 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
8109 gcall* argument with gimple*.
8110 * gimple-ssa-warn-restrict.c (check_call): Same.
8111 (wrestrict_dom_walker::before_dom_children): Same.
8112 (builtin_access::builtin_access): Same.
8113 (check_bounds_or_overlap): Same
8114 (maybe_diag_overlap): Same.
8115 (maybe_diag_offset_bounds): Same.
8116 * tree-diagnostic.c (default_tree_printer): Move usage of
8117 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
8118 to this callsite.
8119 * tree-pretty-print.c (percent_K_format): Add argument.
8120 * tree-pretty-print.h: Add argument.
8121 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
8122 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
8123 (maybe_diag_stxncpy_trunc): Same.
8124 (handle_builtin_stxncpy): Same.
8125 (handle_builtin_strcat): Same.
8126
8127 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8128
8129 * match.pd: Optimise pointer range checks.
8130
8131 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8132
8133 PR tree-optimization/86758
8134 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
8135 to remove pattern statements.
8136
8137 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8138
8139 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
8140 result of dfs_enumerate_from when constructing stmt_vec_infos,
8141 instead of additionally calling get_loop_body.
8142
8143 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8144
8145 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
8146 parameter.
8147 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
8148 When creating an iv, assert that the step is not known to be zero.
8149 (vect_setup_realignment): Update call accordingly.
8150 * tree-vect-stmts.c (vectorizable_store): Likewise.
8151 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
8152
8153 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8154
8155 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
8156 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
8157 (vectorizable_reduction): Likewise.
8158 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8159 (vect_detect_hybrid_slp_stmts): Likewise.
8160 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8161
8162 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
8163
8164 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
8165 (wide_int_set_zero_nonzero_bits): ...this.
8166 (zero_nonzero_bits_from_vr): Rename to...
8167 (vrp_set_zero_nonzero_bits): ...this.
8168 (extract_range_from_multiplicative_op_1): Abstract wide int
8169 code...
8170 (wide_int_range_multiplicative_op): ...here.
8171 (extract_range_from_binary_expr_1): Extract wide int binary
8172 operations into their own functions.
8173 (wide_int_range_lshift): New.
8174 (wide_int_range_can_optimize_bit_op): New.
8175 (wide_int_range_shift_undefined_p): New.
8176 (wide_int_range_bit_xor): New.
8177 (wide_int_range_bit_ior): New.
8178 (wide_int_range_bit_and): New.
8179 (wide_int_range_trunc_mod): New.
8180 (extract_range_into_wide_ints): New.
8181 (vrp_shift_undefined_p): New.
8182 (extract_range_from_multiplicative_op): New.
8183 (vrp_can_optimize_bit_op): New.
8184 * tree-vrp.h (value_range::dump): New.
8185 (wide_int_range_multiplicative_op): New.
8186 (wide_int_range_lshift):New.
8187 (wide_int_range_shift_undefined_p): New.
8188 (wide_int_range_bit_xor): New.
8189 (wide_int_range_bit_ior): New.
8190 (wide_int_range_bit_and): New.
8191 (wide_int_range_trunc_mod): New.
8192 (zero_nonzero_bits_from_bounds): Rename to...
8193 (wide_int_set_zero_nonzero_bits): ...this.
8194 (zero_nonzero_bits_from_vr): Rename to...
8195 (vrp_set_zero_nonzero_bits): ...this.
8196 (range_easy_mask_min_max): Rename to...
8197 (wide_int_range_can_optimize_bit_op): this.
8198 * vr-values.c (simplify_bit_ops_using_ranges): Rename
8199 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8200
8201 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8202
8203 * tree-vectorizer.h (vect_orig_stmt): New function.
8204 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8205 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8206 (vect_create_epilog_for_reduction): Likewise.
8207 (vectorizable_live_operation): Likewise.
8208 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8209 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8210 * tree-vect-stmts.c (vectorizable_call): Likewise.
8211 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8212
8213 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8214
8215 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8216 argument.
8217 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8218 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8219 (vect_transform_loop): Likewise.
8220 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8221
8222 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8223
8224 * tree-vectorizer.h (vect_schedule_slp): Return void.
8225 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8226 (vect_schedule_slp): Likewise.
8227
8228 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8229
8230 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8231 argument.
8232 (vect_transform_loop): Update calls accordingly. Schedule SLP
8233 instances before the main loop, if any exist.
8234
8235 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8236
8237 PR tree-optimization/86749
8238 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8239 If the lhs is used in a COND_EXPR, check that it is being used
8240 as the "then" or "else" value.
8241
8242 2018-08-01 Tom de Vries <tdevries@suse.de>
8243
8244 PR target/86800
8245 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8246 speculation_safe_value_not_needed.
8247
8248 2018-08-01 Richard Biener <rguenther@suse.de>
8249
8250 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8251 as base and offset.
8252
8253 2018-08-01 Martin Liska <mliska@suse.cz>
8254
8255 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8256 format how successful transformation is dumped.
8257 (gimple_mod_pow2_value_transform): Likewise.
8258 (gimple_mod_subtract_transform): Likewise.
8259 (gimple_stringops_transform): Likewise.
8260
8261 2018-08-01 Martin Liska <mliska@suse.cz>
8262
8263 PR value-prof/35543
8264 * value-prof.c (interesting_stringop_to_profile_p):
8265 Simplify the code and add BUILT_IN_MEMMOVE.
8266 (gimple_stringops_transform): Likewise.
8267
8268 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
8269
8270 * config/aarch64/aarch64-simd.md
8271 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8272 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8273 use GPI iterator instead of SI mode.
8274
8275 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8276
8277 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8278 rs6000_speculation_barrier.
8279 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8280 new barrier pattern name.
8281
8282 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8283
8284 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8285 (speculation_barrier): New insn.
8286
8287 2018-08-01 Richard Biener <rguenther@suse.de>
8288
8289 PR bootstrap/86724
8290 * graphite.h: Include isl/id.h and isl/space.h to allow build
8291 with ISL 0.20.
8292
8293 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
8294
8295 PR target/86651
8296 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8297 mode for COFF targets.
8298 * defaults.h (TARGET_COFF): Define.
8299 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8300 TARGET_COFF): Define.
8301 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8302 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8303 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8304
8305 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8306
8307 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8308 * gimple-streamer-out.c (output_bb): Save it.
8309 * lto-streamer-in.c (input_struct_function_base): Restore
8310 instance discriminator if available. Create map on demand.
8311 * lto-streamer-out.c (output_struct_function_base): Save it if
8312 available.
8313 * final.c (decl_to_instance_map): Document LTO strategy.
8314
8315 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8316 Olivier Hainque <hainque@adacore.com>
8317
8318 * debug.h (decl_to_instance_map_t): New type.
8319 (decl_to_instance_map): Declare.
8320 (maybe_create_decl_to_instance_map): New inline function.
8321 * final.c (bb_discriminator, last_bb_discriminator): New statics,
8322 to track basic block discriminators.
8323 (final_start_function_1): Initialize them.
8324 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8325 bb_discriminator.
8326 (decl_to_instance_map): New variable.
8327 (map_decl_to_instance, maybe_set_discriminator): New functions.
8328 (notice_source_line): Set discriminator.
8329
8330 2018-07-31 Ian Lance Taylor <iant@golang.org>
8331
8332 * targhooks.c (default_have_speculation_safe_value): Add
8333 ATTRIBUTE_UNUSED.
8334
8335 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8336
8337 * dump-context.h: Include "pretty-print.h".
8338 (dump_context::refresh_dumps_are_enabled): New decl.
8339 (dump_context::emit_item): New decl.
8340 (class dump_context): Add fields "m_test_pp" and
8341 "m_test_pp_flags".
8342 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8343 (temp_dump_context::get_dumped_text): New decl.
8344 (class temp_dump_context): Add field "m_pp".
8345 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8346 (dump_context::refresh_dumps_are_enabled): ...and add a test for
8347 m_test_pp.
8348 (set_dump_file): Update for above change.
8349 (set_alt_dump_file): Likewise.
8350 (dump_loc): New overload, taking a pretty_printer *.
8351 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
8352 to any test pretty-printer.
8353 (make_item_for_dump_gimple_stmt): New function, adapted from
8354 optinfo::add_gimple_stmt.
8355 (dump_context::dump_gimple_stmt): Call it, and use the result,
8356 eliminating the direct usage of dump_file and alt_dump_file in
8357 favor of indirectly using them via emit_item.
8358 (make_item_for_dump_gimple_expr): New function, adapted from
8359 optinfo::add_gimple_expr.
8360 (dump_context::dump_gimple_expr): Call it, and use the result,
8361 eliminating the direct usage of dump_file and alt_dump_file in
8362 favor of indirectly using them via emit_item.
8363 (make_item_for_dump_generic_expr): New function, adapted from
8364 optinfo::add_tree.
8365 (dump_context::dump_generic_expr): Call it, and use the result,
8366 eliminating the direct usage of dump_file and alt_dump_file in
8367 favor of indirectly using them via emit_item.
8368 (make_item_for_dump_printf_va): New function, adapted from
8369 optinfo::add_printf_va.
8370 (make_item_for_dump_printf): New function.
8371 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8372 and use the result, eliminating the direct usage of dump_file and
8373 alt_dump_file in favor of indirectly using them via emit_item.
8374 (make_item_for_dump_dec): New function.
8375 (dump_context::dump_dec): Call it, and use the result,
8376 eliminating the direct usage of dump_file and alt_dump_file in
8377 favor of indirectly using them via emit_item.
8378 (make_item_for_dump_symtab_node): New function, adapted from
8379 optinfo::add_symtab_node.
8380 (dump_context::dump_symtab_node): Call it, and use the result,
8381 eliminating the direct usage of dump_file and alt_dump_file in
8382 favor of indirectly using them via emit_item.
8383 (dump_context::begin_scope): Reimplement, avoiding direct usage
8384 of dump_file and alt_dump_file in favor of indirectly using them
8385 via emit_item.
8386 (dump_context::emit_item): New member function.
8387 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8388 Set up test pretty-printer on the underlying context. Call
8389 refresh_dumps_are_enabled.
8390 (temp_dump_context::~temp_dump_context): Call
8391 refresh_dumps_are_enabled.
8392 (temp_dump_context::get_dumped_text): New member function.
8393 (selftest::verify_dumped_text): New function.
8394 (ASSERT_DUMPED_TEXT_EQ): New macro.
8395 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8396 and then without optinfo enabled. Add uses of
8397 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8398 * dumpfile.h: Update comment for the dump_* API.
8399 * optinfo-emit-json.cc
8400 (selftest::test_building_json_from_dump_calls): Update for new
8401 param for temp_dump_context ctor.
8402 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8403 and "m_owned" field.
8404 (optinfo_item::~optinfo_item): Likewise.
8405 (optinfo::add_item): New member function.
8406 (optinfo::emit): Update comment.
8407 (optinfo::add_string): Delete.
8408 (optinfo::add_printf): Delete.
8409 (optinfo::add_printf_va): Delete.
8410 (optinfo::add_gimple_stmt): Delete.
8411 (optinfo::add_gimple_expr): Delete.
8412 (optinfo::add_tree): Delete.
8413 (optinfo::add_symtab_node): Delete.
8414 (optinfo::add_dec): Delete.
8415 * optinfo.h (class dump_context): New forward decl.
8416 (optinfo::add_item): New decl.
8417 (optinfo::add_string): Delete.
8418 (optinfo::add_printf): Delete.
8419 (optinfo::add_printf_va): Delete.
8420 (optinfo::add_gimple_stmt): Delete.
8421 (optinfo::add_gimple_expr): Delete.
8422 (optinfo::add_tree): Delete.
8423 (optinfo::add_symtab_node): Delete.
8424 (optinfo::add_dec): Delete.
8425 (optinfo::add_poly_int): Delete.
8426 (optinfo_item::optinfo_item): Remove "owned" param.
8427 (class optinfo_item): Remove field "m_owned".
8428
8429 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8430
8431 PR middle-end/86705
8432 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8433 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8434 requested variable alignment.
8435 (expand_one_ssa_partition): Likewise.
8436 (expand_one_var): Likewise.
8437
8438 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8439
8440 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8441 to speculation_safe_value_not_needed.
8442
8443 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8444
8445 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8446 * targhooks.c (speculation_safe_value_not_needed): New function.
8447 * target.def (have_speculation_safe_value): Update documentation.
8448 * doc/tm.texi: Regenerated.
8449
8450 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8451
8452 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8453 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8454 expand.
8455 (despeculate_copy<ALLI:mode>_insn): New insn.
8456 (despeculate_copyti_insn): New insn.
8457 (despeculate_simple<ALLI:mode>): New insn
8458 (despeculate_simpleti): New insn.
8459 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8460 function.
8461 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8462 aarch64_speculation_safe_value.
8463 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8464
8465 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8466
8467 * config/aarch64/aarch64-speculation.cc: New file.
8468 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8469 before pass_reorder_blocks.
8470 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8471 prototype.
8472 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8473 X14 and X15 when tracking speculation.
8474 * config/aarch64/aarch64.md (register name constants): Add
8475 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8476 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8477 (speculation_barrier): New insn attribute.
8478 (cmp<mode>): Allow SP in comparisons.
8479 (speculation_tracker): New insn.
8480 (speculation_barrier): Add speculation_barrier attribute.
8481 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8482 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8483 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8484
8485 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8486
8487 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8488 aarch64_track_speculation is true.
8489 (tb<optab><mode>1): Likewise.
8490 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8491 generate CB[N]Z when tracking speculation.
8492 (aarch64_split_compare_and_swap): Likewise.
8493 (aarch64_split_atomic_op): Likewise.
8494
8495 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8496
8497 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8498
8499 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8500
8501 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8502 (speculation_barrier): New insn.
8503
8504 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8505
8506 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8507 * config/arm/arm.md (speculation_barrier): New expand.
8508 (speculation_barrier_insn): New pattern.
8509
8510 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8511
8512 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8513 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8514 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8515 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8516 list.
8517 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8518 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8519 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8520 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8521 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8522 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8523 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8524 * builtins.c (expand_speculation_safe_value): New function.
8525 (expand_builtin): Call it.
8526 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8527 * doc/extend.texi: Document __builtin_speculation_safe_value.
8528 * doc/md.texi: Document "speculation_barrier" pattern.
8529 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8530 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8531 * doc/tm.texi: Regenerated.
8532 * target.def (have_speculation_safe_value, speculation_safe_value): New
8533 hooks.
8534 * targhooks.c (default_have_speculation_safe_value): New function.
8535 (default_speculation_safe_value): New function.
8536 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8537 (default_speculation_safe_value): Add prototype.
8538
8539 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8540
8541 * dump-context.h (dump_context::dump_loc): New decl.
8542 * dumpfile.c (dump_context::dump_loc): New member function.
8543 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8544 and dump_gimple_stmt.
8545 (dump_context::dump_gimple_expr_loc): Likewise, using
8546 dump_gimple_expr.
8547 (dump_context::dump_generic_expr_loc): Likewise, using
8548 dump_generic_expr.
8549 (dump_context::dump_printf_loc_va): Likewise, using
8550 dump_printf_va.
8551 (dump_context::begin_scope): Explicitly using the global function
8552 "dump_loc", rather than the member function.
8553
8554 2018-07-31 Martin Sebor <msebor@redhat.com>
8555
8556 PR tree-optimization/86741
8557 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8558
8559 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8560
8561 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8562 depend on whether prefetch instructions will be emitted or not.
8563 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8564 will be emitted or not.
8565 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8566 (TARGET_SETMEM_PFD): New macros.
8567
8568 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8569
8570 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8571 (NULL_STMT_VEC_INFO): Delete.
8572 (stmt_vec_info::operator*): Likewise.
8573 (stmt_vec_info::operator gimple *): Likewise.
8574 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8575 of NULL_STMT_VEC_INFO.
8576 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8577 (vect_reassociating_reduction_p): Likewise.
8578 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8579 (vectorizable_store): Likewise.
8580 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8581 (vec_info::free_stmt_vec_infos): Likewise.
8582
8583 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8584
8585 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8586 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8587
8588 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8589
8590 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8591 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8592 (vec_info::free_stmt_vec_info): New private member functions.
8593 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8594 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8595 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8596 set_stmt_vec_info_vec and free_stmt_vec_infos.
8597 * tree-vect-loop.c (_loop_vec_info): Remove call to
8598 set_stmt_vec_info_vec.
8599 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8600 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8601 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8602 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8603 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8604 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8605 with the clearing in the xcalloc.
8606 (stmt_vec_info_vec): Delete.
8607 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8608 (vectorize_loops): Likewise.
8609 (vec_info::~vec_info): Remove argument from call to
8610 free_stmt_vec_infos.
8611 (vec_info::add_stmt): Remove vinfo argument from call to
8612 new_stmt_vec_info.
8613
8614 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8615
8616 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8617 rather than a gimple stmt.
8618 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8619 information for pattern statements when passed the original
8620 statement; instead wait to be passed the pattern statement itself.
8621 Don't call set_vinfo_for_stmt here.
8622 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8623 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8624 stmt_vec_infos here.
8625 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8626 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8627 stmt_vec_infos entry.
8628
8629 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8630
8631 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8632 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8633 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8634 * tree-vect-stmts.c (vectorizable_call): Likewise.
8635 (vectorizable_simd_clone_call): Likewise.
8636
8637 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8638
8639 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8640 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8641 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8642 * tree-vect-loop.c (vect_transform_loop): Likewise.
8643 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8644 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8645
8646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8647
8648 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8649 (vect_dr_stmt): Delete.
8650 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8651 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8652 of DR_VECT_AUX.
8653 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8654 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8655 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8656 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8657 (vect_analyze_data_refs): Likewise.
8658 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8659 argument.
8660 (vect_find_same_alignment_drs): Likewise.
8661 (vect_slp_analyze_node_dependences): Update calls accordingly.
8662 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8663 instead of DR_VECT_AUX.
8664 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8665 of a vector data references. Use vec_info::lookup_dr instead of
8666 DR_VECT_AUX.
8667 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8668 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8669 instead of DR_VECT_AUX.
8670
8671 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8672
8673 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8674 dr_vec_info.
8675 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8676 accordingly.
8677 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8678 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8679 (vect_gen_prolog_loop_niters): Likewise.
8680
8681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8682
8683 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8684 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8685 (vect_known_alignment_in_bytes, vect_dr_behavior)
8686 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8687 instead of data_references. Update calls to other routines for
8688 which the same change has been made.
8689 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8690 dr_vec_infos instead of stmt_vec_infos.
8691 (vect_analyze_data_ref_dependence): Update call accordingly.
8692 (vect_slp_analyze_data_ref_dependence)
8693 (vect_record_base_alignments): Use DR_VECT_AUX.
8694 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8695 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8696 (vector_alignment_reachable_p, vect_get_data_access_cost)
8697 (vect_peeling_supportable, vect_analyze_group_access_1)
8698 (vect_analyze_group_access, vect_analyze_data_ref_access)
8699 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8700 (vect_compile_time_alias, vect_small_gap_p)
8701 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8702 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8703 instead of data_references. Update calls to other routines for
8704 which the same change has been made.
8705 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8706 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8707 (vect_slp_analyze_and_verify_node_alignment)
8708 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8709 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8710 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8711 above changes.
8712 (_vect_peel_info::dr): Replace with...
8713 (_vect_peel_info::dr_info): ...this new field.
8714 (vect_peeling_hash_get_most_frequent)
8715 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8716 (vect_peeling_hash_get_lowest_cost):
8717 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8718 routines for which the same change has been made.
8719 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8720 data_reference.
8721 * tree-vect-loop-manip.c (get_misalign_in_elems)
8722 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8723 above changes.
8724 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8725 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8726 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8727 (get_group_load_store_type, get_negative_load_store_type)
8728 (vect_get_data_ptr_increment, vectorizable_store)
8729 (vectorizable_load): Likewise.
8730 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8731 Update calls to other routines for which the same change has been made.
8732
8733 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8734
8735 * tree-vectorizer.h (vec_info::move_dr): New member function.
8736 (dataref_aux): Rename to...
8737 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8738 (_stmt_vec_info::dr_aux): Update accordingly.
8739 (_stmt_vec_info::data_ref_info): Delete.
8740 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8741 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8742 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8743 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8744 of data_ref.
8745 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8746 (STMT_VINFO_DR_INFO): New macro.
8747 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8748 (set_dr_misalignment): Update after rename of dataref_aux.
8749 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8750 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8751 initialization of STMT_VINFO_DATA_REF.
8752 * tree-vectorizer.c (vec_info::move_dr): New function.
8753 * tree-vect-patterns.c (vect_recog_bool_pattern)
8754 (vect_recog_mask_conversion_pattern)
8755 (vect_recog_gather_scatter_pattern): Use it.
8756 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8757 the "dr" and "stmt" fields of dr_vec_info instead of
8758 STMT_VINFO_DATA_REF.
8759
8760 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8761
8762 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8763 (is_pattern_stmt_p): Use it.
8764 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8765 on pattern statements.
8766
8767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8768
8769 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8770 original stmt as a stmt_vec_info rather than a gimple stmt.
8771 (vect_pattern_recog_1): Take the statement directly as a
8772 stmt_vec_info, rather than via a gimple_stmt_iterator.
8773 Update call to vect_mark_pattern_stmts.
8774 (vect_pattern_recog): Update calls accordingly.
8775
8776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8777
8778 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8779 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8780 a vect_def_type for the first argument.
8781 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8782 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8783 operand if it isn't defined by a vectorized statement.
8784 (vect_build_gather_load_calls): Remove the mask_dt argument and
8785 update calls to vect_get_vec_def_for_stmt_copy.
8786 (vectorizable_bswap): Likewise the dt argument.
8787 (vectorizable_call): Update calls to vectorizable_bswap and
8788 vect_get_vec_def_for_stmt_copy.
8789 (vectorizable_simd_clone_call, vectorizable_assignment)
8790 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8791 (vectorizable_comparison): Update calls to
8792 vect_get_vec_def_for_stmt_copy.
8793 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8794 vect_is_simple_use.
8795 (vect_get_loop_based_defs): Remove dt argument and update call
8796 to vect_get_vec_def_for_stmt_copy.
8797 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8798 and vect_get_vec_def_for_stmt_copy.
8799 (vectorizable_load): Update calls to vect_build_gather_load_calls
8800 and vect_get_vec_def_for_stmt_copy.
8801 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8802 (vectorizable_reduction, vectorizable_live_operation): Update calls
8803 to vect_get_vec_def_for_stmt_copy.
8804
8805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8806
8807 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8808 and gimple stmt arguments with a stmt_vec_info.
8809 (vect_record_base_alignments): Update calls accordingly.
8810 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8811 and gimple stmt arguments with a stmt_vec_info.
8812 (vect_build_slp_tree_1): Remove vinfo argument and update call
8813 to vect_record_max_nunits.
8814 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8815 and vect_record_max_nunits.
8816
8817 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8818
8819 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8820 file and take a stmt_vec_info instead of a gimple stmt.
8821 (supportable_widening_operation, vect_finish_replace_stmt)
8822 (vect_finish_stmt_generation, vect_get_store_rhs)
8823 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8824 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8825 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8826 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8827 (vect_create_data_ref_ptr, bump_vector_ptr)
8828 (vect_permute_store_chain, vect_setup_realignment)
8829 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8830 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8831 (vectorizable_reduction, vectorizable_induction)
8832 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8833 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8834 than gimple stmts as arguments.
8835 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8836 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8837 (can_group_stmts_p, vect_check_gather_scatter)
8838 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8839 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8840 (vect_permute_load_chain, vect_shift_permute_load_chain)
8841 (vect_transform_grouped_load)
8842 (vect_record_grouped_load_vectors): Likewise.
8843 * tree-vect-loop.c (vect_fixup_reduc_chain)
8844 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8845 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8846 (vectorizable_reduction, vectorizable_induction)
8847 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8848 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8849 (vect_get_load_store_mask): Likewise.
8850 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8851 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8852 * tree-vect-stmts.c (vect_mark_relevant)
8853 (is_simple_and_all_uses_invariant)
8854 (exist_non_indexing_operands_for_use_p, process_use)
8855 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8856 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8857 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8858 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8859 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8860 (get_negative_load_store_type, get_load_store_type)
8861 (vect_check_load_store_mask, vect_check_store_rhs)
8862 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8863 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8864 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8865 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8866 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8867 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8868 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8869 (supportable_widening_operation): Likewise.
8870
8871 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8872
8873 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8874 a stmt_vec_info instead of a gcall.
8875 (vect_check_gather_scatter): Update call accordingly.
8876 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8877 of a gphi.
8878 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8879 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8880 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8881 instead of a gimple stmt.
8882 (vect_transform_loop): Update calls accordingly.
8883 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8884 stmt_vec_infos instead of gimple stmts.
8885 (vect_analyze_slp_instance): Update use accordingly.
8886 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8887 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8888 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8889 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8890 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8891 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8892 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8893 down to subroutines.
8894
8895 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8896
8897 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8898 of the worklist from a vector of gimple stmts to a vector of
8899 stmt_vec_infos.
8900 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8901 (vect_mark_stmts_to_be_vectorized): Likewise
8902
8903 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8904
8905 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8906 statement before passing it to vect_analyze_stmt.
8907 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8908 the chain of phi vector definitions. Track the exit phi via its
8909 stmt_vec_info.
8910 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8911 STMT_VINFO_REDUC_DEF.
8912 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8913 stmt_vec_infos to handle the statement chains.
8914 (vect_get_slp_defs): Record the first statement in the node
8915 using a stmt_vec_info.
8916 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8917 statements here and pass their stmt_vec_info down to subroutines.
8918 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8919 down to vect_finish_stmt_generation.
8920 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8921 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8922 stmt_vec_infos to subroutines.
8923 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8924 chains.
8925
8926 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8927
8928 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8929 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8930 (vect_permute_store_chain, vect_setup_realignment)
8931 (vect_permute_load_chain, vect_shift_permute_load_chain)
8932 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8933 stmts internally, and when passing values to other vectorizer routines.
8934 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8935 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8936 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8937 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8938 (vectorizable_reduction, vectorizable_induction)
8939 (vectorizable_live_operation, vect_transform_loop_stmt)
8940 (vect_transform_loop): Likewise.
8941 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8942 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8943 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8944 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8945 (vect_slp_analyze_node_operations_1): Likewise.
8946 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8947 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8948 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8949 (vect_finish_stmt_generation_1, get_group_load_store_type)
8950 (get_load_store_type, vect_build_gather_load_calls)
8951 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8952 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8953 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8954 (vectorizable_store, vectorizable_load, vectorizable_condition)
8955 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8956 (supportable_widening_operation): Likewise.
8957 (vect_get_vector_types_for_stmt): Likewise.
8958 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8959
8960 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8961
8962 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8963 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8964 (vect_permute_store_chain, vect_permute_load_chain)
8965 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8966 repeated stmt_vec_info lookups.
8967 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8968 (vect_update_ivs_after_vectorizer): Likewise.
8969 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8970 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8971 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8972 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8973 (vect_bb_slp_scalar_cost): Likewise.
8974 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8975
8976 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8977
8978 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8979 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8980 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8981 to get gassigns and gcalls, rather than operating on generc gimple
8982 stmts.
8983 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8984 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8985 (vectorizable_load, vect_analyze_stmt): Likewise.
8986 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8987
8988 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8989
8990 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8991 return stmt_vec_infos rather than gimple stmts. Do not accept
8992 null arguments.
8993 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8994 of a gimple stmt.
8995 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8996 Update use of get_later_stmt.
8997 (vect_get_constant_vectors): Update call accordingly.
8998 (vect_schedule_slp_instance): Likewise
8999 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
9000 (vect_slp_analyze_instance_dependence): Likewise.
9001 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
9002
9003 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9004
9005 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
9006 (stmt_info_for_cost::stmt_info): ...this new field.
9007 (add_stmt_costs): Update accordingly.
9008 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9009 (vect_get_known_peeling_cost): Likewise.
9010 (vect_estimate_min_profitable_iters): Likewise.
9011 * tree-vect-stmts.c (record_stmt_cost): Likewise.
9012
9013 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9014
9015 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
9016 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9017 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9018 accordingly.
9019 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
9020
9021 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9022
9023 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
9024 a gimple stmt to a stmt_vec_info.
9025 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9026
9027 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9028
9029 * tree-vectorizer.h (vec_info::grouped_stores): Change from
9030 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9031 (_loop_vec_info::reduction_chains): Likewise.
9032 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
9033 accordingly.
9034 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9035
9036 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9037
9038 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
9039 a gimple stmt to a stmt_vec_info.
9040 (_stmt_vec_info::next_element): Likewise.
9041 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
9042 (vect_slp_analyze_and_verify_node_alignment)
9043 (vect_analyze_group_access_1, vect_analyze_group_access)
9044 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
9045 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
9046 (vect_supportable_dr_alignment): Update accordingly.
9047 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
9048 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
9049 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
9050 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9051 * tree-vect-slp.c (vect_build_slp_tree_1)
9052 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
9053 (vect_split_slp_store_group, vect_analyze_slp_instance)
9054 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
9055 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
9056 (get_group_load_store_type, get_load_store_type)
9057 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
9058 (vect_transform_stmt, vect_remove_stores): Likewise.
9059
9060 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9061
9062 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
9063 than a gimple stmt.
9064 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9065 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
9066 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
9067 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
9068 (vector_alignment_reachable_p, vect_get_data_access_cost)
9069 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
9070 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
9071 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9072 (vect_analyze_group_access_1, vect_analyze_group_access)
9073 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
9074 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
9075 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
9076 result of vect_dr_stmt and use the stmt_vec_info instead of
9077 the associated gimple stmt.
9078 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9079 (vect_gen_prolog_loop_niters): Likewise.
9080 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9081
9082 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9083
9084 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
9085 to a vec<stmt_vec_info>.
9086 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
9087 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
9088 vec<stmt_vec_info>.
9089 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
9090 to a vec<stmt_vec_info>.
9091 (bst_traits::value_type, bst_traits::value_type): Likewise.
9092 (bst_traits::hash): Update accordingly.
9093 (vect_get_and_check_slp_defs): Change the stmts parameter from
9094 a vec<gimple *> to a vec<stmt_vec_info>.
9095 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
9096 (vect_build_slp_tree): Likewise.
9097 (vect_build_slp_tree_2): Likewise. Update uses of
9098 SLP_TREE_SCALAR_STMTS.
9099 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
9100 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
9101 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
9102 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
9103 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
9104 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
9105 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
9106 (vect_get_constant_vectors, vect_get_slp_defs)
9107 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
9108 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
9109 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
9110 instead of gimple stmts.
9111 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
9112 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
9113 (vect_slp_analyze_instance_dependence): Update uses of
9114 SLP_TREE_SCALAR_STMTS.
9115 (vect_slp_analyze_and_verify_node_alignment): Likewise.
9116 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
9117 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
9118 (get_initial_defs_for_reduction): Likewise.
9119 (vect_create_epilog_for_reduction): Likewise.
9120 (vectorize_fold_left_reduction): Likewise.
9121 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
9122 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
9123 (can_vectorize_live_stmts): Likewise.
9124
9125 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9126
9127 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
9128 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9129 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
9130 than gimple stmts.
9131 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
9132 of a gimple stmt.
9133 (gather_scalar_reductions): Update after above interface changes.
9134 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
9135 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
9136 than gimple stmts.
9137 (vect_force_simple_reduction): Likewise.
9138 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
9139 LOOP_VINFO_REDUCTIONS.
9140 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9141
9142 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9143
9144 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
9145 a gimple stmt to a stmt_vec_info.
9146 * tree-vect-loop.c (vect_active_double_reduction_p)
9147 (vect_force_simple_reduction, vectorizable_reduction): Update
9148 accordingly.
9149
9150 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9151
9152 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
9153 vec<gimple *> to a vec<stmt_vec_info>.
9154 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
9155 the reduction_phis argument from a vec<gimple *> to a
9156 vec<stmt_vec_info>.
9157 (vectorizable_reduction): Likewise the phis local variable that
9158 is passed to vect_create_epilog_for_reduction. Update for new type
9159 of SLP_TREE_VEC_STMTS.
9160 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
9161 (vectorizable_live_operation): Likewise.
9162 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
9163 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
9164
9165 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9166
9167 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9168 a gimple stmt to a stmt_vec_info.
9169 (vectorizable_condition, vectorizable_live_operation)
9170 (vectorizable_reduction, vectorizable_induction): Pass back the
9171 vectorized statement as a stmt_vec_info.
9172 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9173 use of STMT_VINFO_VEC_STMT.
9174 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9175 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9176 as stmt_vec_infos rather than gimple stmts.
9177 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9178 to a stmt_vec_info.
9179 (vectorizable_live_operation): Likewise.
9180 (vectorizable_reduction, vectorizable_induction): Likewise,
9181 updating use of STMT_VINFO_VEC_STMT.
9182 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9183 of STMT_VINFO_VEC_STMT.
9184 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9185 (vectorizable_simd_clone_call, vectorizable_conversion)
9186 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9187 (vectorizable_store, vectorizable_load, vectorizable_condition)
9188 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9189 from a gimple stmt to a stmt_vec_info.
9190 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
9191 pointer to a stmt_vec_info to the vectorizable_* routines.
9192
9193 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9194
9195 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9196 a gimple stmt to a stmt_vec_info.
9197 (is_pattern_stmt_p): Update accordingly.
9198 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9199 (vect_record_grouped_load_vectors): Likewise.
9200 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9201 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9202 (vect_model_reduction_cost): Likewise.
9203 (vect_create_epilog_for_reduction): Likewise.
9204 (vectorizable_reduction, vectorizable_induction): Likewise.
9205 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9206 Return the stmt_vec_info for the pattern statement.
9207 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9208 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9209 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9210 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9211 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9212 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9213 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9214 (free_stmt_vec_info, vect_is_simple_use): Likewise.
9215
9216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9217
9218 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9219 (vect_finish_stmt_generation): Likewise.
9220 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9221 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9222 (vect_build_gather_load_calls): Use the return value of the above
9223 functions instead of a separate call to vinfo_for_stmt. Use narrow
9224 scopes for the input gimple stmt and wider scopes for the associated
9225 stmt_vec_info. Use vec_info::lookup_def when setting these
9226 stmt_vec_infos from an SSA_NAME definition.
9227 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9228 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9229 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9230 (vectorizable_store, vectorizable_load, vectorizable_condition)
9231 (vectorizable_comparison): Likewise.
9232 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9233 (vectorizable_reduction): Likewise.
9234
9235 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9236
9237 * tree-vectorizer.h (vect_is_simple_use): Add an optional
9238 stmt_vec_info * parameter before the optional gimple **.
9239 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9240 (process_use, vect_get_vec_def_for_operand_1): Update callers.
9241 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9242 * tree-vect-loop.c (vectorizable_reduction): Likewise.
9243 (vectorizable_live_operation): Likewise.
9244 * tree-vect-patterns.c (type_conversion_p): Likewise.
9245 (vect_look_through_possible_promotion): Likewise.
9246 (vect_recog_rotate_pattern): Likewise.
9247 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9248
9249 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9250
9251 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9252 a typedef to a wrapper class.
9253 (NULL_STMT_VEC_INFO): New macro.
9254 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9255 (stmt_vec_info::operator*): New function.
9256 (stmt_vec_info::operator gimple *): Likewise.
9257 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9258 (add_stmt_costs): Likewise.
9259 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9260 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9261 (vect_get_known_peeling_cost): Likewise.
9262 (vect_estimate_min_profitable_iters): Likewise.
9263 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9264 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9265 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9266 (vectorizable_store, free_stmt_vec_infos): Likewise.
9267 (new_stmt_vec_info): Change return type of xcalloc to
9268 _stmt_vec_info *.
9269
9270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9271
9272 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9273 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9274 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9275 a single_imm_use-based sequence.
9276 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9277
9278 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9279
9280 * tree-vectorizer.h (vec_info::lookup_def): Declare.
9281 * tree-vectorizer.c (vec_info::lookup_def): New function.
9282 * tree-vect-patterns.c (vect_get_internal_def): Use it.
9283 (vect_widened_op_tree): Likewise.
9284 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9285 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9286 (vectorizable_reduction): Likewise.
9287 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9288 of a gimple *.
9289 (vect_is_slp_reduction): Update calls accordingly. Use
9290 vec_info::lookup_def.
9291 (vect_is_simple_reduction): Likewise
9292 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9293
9294 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9295
9296 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9297 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9298 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9299 of vinfo_for_stmt.
9300 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9301 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9302 (vect_update_vf_for_slp, vect_analyze_loop_operations)
9303 (vect_is_slp_reduction, vectorizable_induction)
9304 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9305 * tree-vect-patterns.c (vect_init_pattern_stmt):
9306 (vect_determine_min_output_precision_1, vect_determine_precisions)
9307 (vect_pattern_recog): Likewise.
9308 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9309 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9310 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9311 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9312 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9313 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
9314 info field from a loop to a loop_vec_info.
9315
9316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9317
9318 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9319 (vec_info::add_stmt): Declare.
9320 * tree-vectorizer.c (vec_info::add_stmt): New function.
9321 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9322 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9323 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9324 (vectorizable_induction): Likewise.
9325 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9326 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9327 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9328 (vectorizable_load): Likewise.
9329 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9330 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9331 (vect_recog_gather_scatter_pattern): Likewise.
9332 (append_pattern_def_seq): Likewise. Remove a check that is
9333 performed by add_stmt itself.
9334
9335 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9336
9337 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9338 which make_ssa_name was called with new_stmt before new_stmt
9339 had been created.
9340
9341 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9342
9343 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9344 split out from...
9345 (vect_is_slp_reduction): ...here...
9346 (vect_is_simple_reduction): ...and here. Remove repetition of tests
9347 that are already known to be false.
9348
9349 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9350
9351 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9352 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
9353 STMT_VINFO_NUM_SLP_USES when it's true.
9354 (vect_free_slp_instance): Add a final_p parameter and pass it to
9355 vect_free_slp_tree.
9356 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9357 (vect_analyze_slp_instance): Likewise.
9358 (vect_slp_analyze_operations): Likewise.
9359 (vect_slp_analyze_bb_1): Likewise.
9360 * tree-vectorizer.c (vec_info): Likewise.
9361 * tree-vect-loop.c (vect_transform_loop): Likewise.
9362
9363 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9364
9365 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9366 function is not called for second and subsequent members of
9367 a reduction group.
9368
9369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9370
9371 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9372 cases for nested loops from here to ...
9373 (vect_create_epilog_for_reduction): ...here. Only call
9374 vect_is_simple_use for inner-loop reductions.
9375
9376 2018-07-31 Martin Liska <mliska@suse.cz>
9377
9378 PR gcov-profile/85338
9379 PR gcov-profile/85350
9380 PR gcov-profile/85372
9381 * profile.c (struct location_triplet): New.
9382 (struct location_triplet_hash): Likewise.
9383 (output_location): Do not output a BB that
9384 is already recorded for a line.
9385 (branch_prob): Use streamed_locations.
9386
9387 2018-07-31 Martin Liska <mliska@suse.cz>
9388
9389 PR gcov-profile/85370
9390 * coverage.c (coverage_begin_function): Do not mark target
9391 clones as artificial functions.
9392
9393 2018-07-31 Martin Liska <mliska@suse.cz>
9394
9395 PR gcov-profile/83813
9396 PR gcov-profile/84758
9397 PR gcov-profile/85217
9398 PR gcov-profile/85332
9399 * profile.c (branch_prob): Do not record GOTO expressions
9400 for GIMPLE statements which locations are already streamed.
9401
9402 2018-07-31 Olivier Hainque <hainque@adacore.com>
9403
9404 * gcc.c (handle_spec_function): Accept a soft_matched_part
9405 argument, as do_spec_1. Pass it down to ...
9406 (eval_spec_function): Accept a soft_matched_part argument,
9407 and pass it down to ...
9408 (do_spec_2): Accept a soft_matched_part argument, and pass
9409 it down to do_spec_1.
9410 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9411 (handle_braces): Update call to handle_spec_function.
9412 (driver::set_up_specs): Update calls to do_spec_2.
9413 (compare_debug_dump_opt_spec_function): Likewise.
9414 (compare_debug_self_opt_spec_function): Likewise.
9415
9416 2018-07-31 Olivier Hainque <hainque@adacore.com>
9417
9418 * common.opt (nolibc): New option.
9419 * doc/invoke.texi (Link Options): Document it.
9420 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9421 * config/alpha/linux.h: Likewise.
9422 * config/arc/elf.h: Likewise.
9423 * config/arm/uclinux-elf.h: Likewise.
9424 * config/arm/unknown-elf.h: Likewise.
9425 * config/avr/avrlibc.h: Likewise.
9426 * config/bfin/bfin.h: Likewise.
9427 * config/bfin/linux.h: Likewise.
9428 * config/bfin/uclinux.h: Likewise.
9429 * config/darwin.h: Likewise.
9430 * config/darwin10.h: Likewise.
9431 * config/darwin12.h: Likewise.
9432 * config/gnu-user.h: Likewise.
9433 * config/lm32/uclinux-elf.h: Likewise.
9434 * config/pa/pa-hpux11.h: Likewise.
9435 * config/pa/pa64-hpux.h: Likewise.
9436 * config/sparc/sparc.h: Likewise.
9437
9438 2018-07-31 Olivier Hainque <hainque@adacore.com>
9439
9440 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9441 undefined variables.
9442
9443 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9444
9445 PR target/86640
9446 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9447 instead of GEN_INT.
9448
9449 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9450
9451 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9452 terminated string literal.
9453
9454 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9455
9456 PR rtl-optimization/85160
9457 * combine.c (is_just_move): New function.
9458 (try_combine): Allow combining two instructions into two if neither of
9459 the original instructions was a move.
9460
9461 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9462
9463 PR target/86673
9464 * doc/extend.texi (Global Register Variables): Discourage use of type
9465 qualifiers.
9466 (Local Register Variables): Likewise.
9467
9468 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9469
9470 PR tree-optimization/86506
9471 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9472
9473 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9474
9475 PR target/86547
9476 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9477 hard_regno, make sure no insn between `from` and `to` clobbers it.
9478
9479 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9480 Tom de Vries <tdevries@suse.de>
9481
9482 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9483 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9484 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9485 PTX_DEFAULT_RUNTIME_DIM.
9486 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9487
9488 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9489
9490 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9491 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9492 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9493
9494 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9495
9496 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9497 used.
9498 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9499 predicate to reflect toc fusion has been deleted.
9500 (toc_fusion_mem_raw): Delete, no longer used.
9501 (toc_fusion_mem_wrapped): Likewise.
9502 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9503 fusion mask bit.
9504 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9505 Delete, no longer used.
9506 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9507 meant to be used for toc fusion.
9508 (rs6000_debug_print_mode): Delete toc fusion debugging.
9509 (rs6000_debug_reg_global): Likewise.
9510 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9511 fusion and secondary reload support that were never used.
9512 (rs6000_option_override_internal): Delete TOC fusion, that was only
9513 partially defined, and it did not work unless you also used the
9514 -mcmodel= switch.
9515 (rs6000_legitimate_address_p): Delete TOC fusion support.
9516 (rs6000_opt_masks): Likewise.
9517 (fusion_wrap_memory_address): Delete function, no longer used.
9518 (fusion_split_address); Delete TOC fusion support.
9519 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9520 longer used with toc fusion being deleted.
9521 (TARGET_TOC_FUSION_FP): Likewise.
9522 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9523 UNSPEC.
9524 (toc fusion spliter): Delete TOC fusion support.
9525 (toc_fusionload_<mode>): Likewise.
9526 (toc_fusionload_di): Likewise.
9527 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9528 longer needs to be named. Rename predicate to delete TOC fusion.
9529 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9530 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9531 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9532 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9533 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9534
9535 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9536
9537 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9538 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9539 __int128 in built-in function prototypes.
9540 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9541 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9542
9543 2018-07-27 Martin Sebor <msebor@redhat.com>
9544
9545 PR tree-optimization/86696
9546 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9547 types, including enums.
9548 (handle_char_store): Be prepared for the above function to fail.
9549
9550 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9551
9552 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9553 when optimization level is lower than 2 or optimize for size.
9554
9555 2018-07-26 Martin Sebor <msebor@redhat.com>
9556
9557 PR tree-optimization/86043
9558 PR tree-optimization/86042
9559 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9560 (get_string_cst_length): Rename...
9561 (get_min_string_length): ...to this. Add argument.
9562 (handle_char_store): Extend to handle multi-character stores by
9563 MEM_REF.
9564 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9565 * tree.h (initializer_zerop): Add argument.
9566
9567 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9568
9569 PR middle-end/86660
9570 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9571 declare target to variables if they have always,{to,from,tofrom} map
9572 kinds.
9573
9574 2018-07-26 Martin Liska <mliska@suse.cz>
9575
9576 PR lto/86548
9577 * lto-wrapper.c: Add linker_output as prefix
9578 for ltrans_output_file.
9579
9580 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9581
9582 PR rtl-optimization/85805
9583 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9584 value for hard registers if that was written in the same mode.
9585
9586 2018-07-26 Martin Liska <mliska@suse.cz>
9587
9588 PR gcov-profile/86536
9589 * gcov.c (format_gcov): Use printf format %.*f directly
9590 and do not handle special values.
9591
9592 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9593
9594 * common/config/arc/arc-common.c (arc_option_optimization_table):
9595 Update default optimizations for size.
9596
9597 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9598
9599 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9600 * config/arc/constraints.md (CfZ): New constraint.
9601 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9602 (subsf3_fpu): Likewise.
9603 (cmpsf_fpu): Likewise.
9604 (cmpsf_fpu_uneq): Likewise.
9605
9606 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9607
9608 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9609 accesses as well.
9610 (arc_is_uncached_mem_p): uncached applies to both the variable and
9611 the pointer.
9612
9613 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9614
9615 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9616 register names.
9617
9618 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9619
9620 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9621 field "m_scopes" from vec to auto_vec.
9622
9623 2018-07-25 Martin Liska <mliska@suse.cz>
9624
9625 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9626 return type.
9627
9628 2018-07-25 Richard Biener <rguenther@suse.de>
9629
9630 PR debug/86654
9631 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9632 special wrt context_die late.
9633 (gen_subprogram_die): Re-use DIEs in local scope.
9634
9635 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9636
9637 PR tree-optimization/86644
9638 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9639
9640 2018-07-25 Martin Liska <mliska@suse.cz>
9641
9642 PR middle-end/86645
9643 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9644 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9645
9646 2018-07-25 Martin Liska <mliska@suse.cz>
9647
9648 PR sanitizer/79635
9649 * params.def: Explain ASan abbreviation and provide
9650 a documentation link.
9651
9652 2018-07-24 Martin Sebor <msebor@redhat.com>
9653
9654 PR tree-optimization/86622
9655 PR tree-optimization/86532
9656 * builtins.h (string_length): Declare.
9657 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9658 (check_access): Be prepared for non-constant length ranges.
9659 (string_length): Make extern.
9660 * expr.c (string_constant): Only handle the minor non-constant
9661 array index. Use string_constant to compute the length of
9662 a generic string constant.
9663
9664 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9665
9666 PR tree-optimization/86618
9667 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9668 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9669
9670 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9671
9672 PR tree-optimization/86636
9673 * json.cc (json::object::set): Fix comment. Add assertions.
9674 (json::array::append): Move here from json.h. Add comment and an
9675 assertion.
9676 (json::string::string): Likewise.
9677 * json.h (json::array::append): Move to json.cc.
9678 (json::string::string): Likewise.
9679 * optinfo-emit-json.cc
9680 (optrecord_json_writer::impl_location_to_json): Assert that we
9681 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9682 wrapper around it. Expand the location once, rather than three
9683 times.
9684 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9685 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9686 wrappers.
9687 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9688 places. Fix some overlong lines.
9689
9690 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9691
9692 * config/aarch64/aarch64-simd.md
9693 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9694 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9695 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9696 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9697 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9698 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9699 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9700 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9701 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9702
9703 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9704
9705 PR middle-end/86627
9706 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9707 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9708 and abs_d == d, do the power of two handling if profitable.
9709
9710 2018-07-24 Richard Biener <rguenther@suse.de>
9711
9712 * match.pd: Add BIT_FIELD_REF canonicalizations.
9713
9714 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9715
9716 PR c/86617
9717 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9718
9719 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9720
9721 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9722 terminated STRING_CST object.
9723
9724 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9725
9726 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9727
9728 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9729
9730 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9731 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9732 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9733 the elements into a register.
9734 (rs6000_split_v4si_init_di_reg): Delete.
9735 (rs6000_split_v4si_init): Delete.
9736 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9737 (vsx_init_v4si): Rewrite as a define_expand.
9738
9739 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9740
9741 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9742 zero_extend argument from memory): New.
9743
9744 2018-07-22 Martin Sebor <msebor@redhat.com>
9745
9746 PR bootstrap/86621
9747 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9748 diagnosing calls with unknown arguments unless -Walloca-larger-than
9749 is restricted to less than PTRDIFF_MAX bytes.
9750
9751 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9752
9753 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9754
9755 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9756
9757 * pretty-print.c (text_info::set_location): Remove redundant
9758 "line_table" parameter from call to rich_location::set_range.
9759
9760 2018-07-20 Martin Sebor <msebor@redhat.com>
9761
9762 PR middle-end/82063
9763 * builtins.c (expand_builtin_alloca): Adjust.
9764 * calls.c (alloc_max_size): Simplify.
9765 * cgraphunit.c (cgraph_node::expand): Adjust.
9766 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9767 variables.
9768 (frame_larger_than_size): Same.
9769 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9770 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9771 Initialize.
9772 * doc/invoke.texi (GCC Command Options): Document option arguments.
9773 Explain byte-size arguments and suffixes.
9774 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9775 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9776 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9777 * doc/options.texi (UInteger): Expand.
9778 (Host_Wide_Int, ByteSize): Document new properties.
9779 * final.c (final_start_function_1): Include sizes in an error message.
9780 * function.c (frame_offset_overflow): Same.
9781 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9782 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9783 Diagnose unbounded alloca calls only for limits of less than
9784 PTRDIFF_MAX.
9785 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9786 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9787 for alloca(0).
9788 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9789 only for limits of less than PTRDIFF_MAX.
9790 * langhooks-def.h (lhd_handle_option): Change function argument
9791 to HOST_WIDE_INT.
9792 * langhooks.c (lhd_handle_option): Same.
9793 * langhooks.h (handle_option): Same.
9794 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9795 ByteSize flags.
9796 (var_type, var_type_struct): Same.
9797 (var_set): Handle ByteSize flag.
9798 * optc-gen.awk: Add comments to output to ease debugging. Make
9799 use of HOST_WIDE_INT where appropriate.
9800 * opts-gen-save.awk: Use %lx to format unsigned long.
9801 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9802 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9803 arguments. Parse bytes-size suffixes.
9804 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9805 (enum_value_to_arg): Same.
9806 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9807 (handle_option): Adjust.
9808 (generate_option): Change function argument to HOST_WIDE_INT.
9809 (cmdline_handle_error): Adjust.
9810 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9811 (set_option): Change function argument to HOST_WIDE_INT.
9812 (option_enabled): Handle cl_host_wide_int.
9813 (get_option_state): Handle CLVC_SIZE.
9814 (control_warning_option): Same.
9815 * opts.c (common_handle_option): Change function argument to
9816 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9817 OPT_Wvla_larger_than_.
9818 * opts.h (enum cl_var_type): Add an enumerator.
9819 * stor-layout.c (layout_decl): Print a more meaningful warning.
9820 * toplev.c (output_stack_usage): Adjust.
9821
9822 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9823
9824 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9825 call to inline_expand_builtin_string_cmp.
9826 (expand_builtin_strcmp): Likewise.
9827 (expand_builtin_strncmp): Likewise.
9828 (inline_string_cmp): Delete the last parameter, change char_type_node
9829 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9830 two operands.
9831 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9832 the inlining expansion on target where the type of the call has same or
9833 narrower precision than unsigned char.
9834
9835 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9836
9837 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9838 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9839 * common.opt (fsave-optimization-record): New option.
9840 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9841 * doc/invoke.texi (-fsave-optimization-record): New option.
9842 * dumpfile.c: Include "optinfo-emit-json.h".
9843 (struct kv_pair): Move to coretypes.h.
9844 (optgroup_options): Make non-static.
9845 (dump_context::end_scope): Call
9846 optimization_records_maybe_pop_dump_scope.
9847 * dumpfile.h (optgroup_options): New decl.
9848 * json.cc: New file.
9849 * json.h: New file.
9850 * optinfo-emit-json.cc: New file.
9851 * optinfo-emit-json.h: New file.
9852 * optinfo.cc: Include "optinfo-emit-json.h".
9853 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9854 (optinfo_enabled_p): Check optimization_records_enabled_p.
9855 (optinfo_wants_inlining_info_p): Likewise.
9856 * optinfo.h: Update comment.
9857 * profile-count.c (profile_quality_as_string): New function.
9858 * profile-count.h (profile_quality_as_string): New decl.
9859 (profile_count::quality): New accessor.
9860 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9861 and optinfo_emit_json_cc_tests.
9862 * selftest.h (selftest::json_cc_tests): New decl.
9863 (selftest::optinfo_emit_json_cc_tests): New decl.
9864 * toplev.c: Include "optinfo-emit-json.h".
9865 (compile_file): Call optimization_records_finish.
9866 (do_compile): Call optimization_records_start.
9867 * tree-ssa-live.c: Include optinfo.h.
9868 (remove_unused_scope_block_p): Retain inlining information if
9869 optinfo_wants_inlining_info_p returns true.
9870
9871 2018-07-20 Richard Biener <rguenther@suse.de>
9872
9873 PR debug/86585
9874 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9875 to cover -flto-partition=none.
9876
9877 2018-07-20 Martin Liska <mliska@suse.cz>
9878
9879 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9880 (get_decl_source_range): Remove unused function.
9881
9882 2018-07-20 Richard Biener <rguenther@suse.de>
9883
9884 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9885 (struct vn_phi_s): Likewise.
9886 (struct vn_reference_s): Likewise.
9887 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9888 for searching the slot of an entry known to be in the hash itself.
9889 (vn_phi_hasher::equal): Likewise.
9890 (vn_reference_hasher::equal): Likewise.
9891 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9892 globals.
9893 (optimistic_info, current_info): Remove, keeping only valid_info.
9894 (vn_reference_lookup_1): Remove fallback lookup.
9895 (vn_reference_lookup_2): Likewise.
9896 (vn_nary_op_lookup_1): Likewise.
9897 (vn_phi_lookup): Likewise.
9898 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9899 hash element.
9900 (vn_reference_insert): Adjust, chain the inserted hash element
9901 at last_inserted_ref.
9902 (vn_reference_insert_pieces): Likewise.
9903 (visit_reference_op_call): Likewise.
9904 (vn_nary_op_insert_into): Chain the inserted hash element at
9905 last_inserted_nary.
9906 (vn_nary_op_insert_pieces): Adjust.
9907 (vn_nary_op_insert): Likewise.
9908 (vn_nary_op_insert_stmt): Likewise.
9909 (vn_phi_insert): Adjust, chain the inserted hash element at
9910 last_inserted_phi.
9911 (process_scc): Remove clearing and copying the optimistic
9912 table. Instead remove elements inserted during an optimistic
9913 iteration from the single table we maintain.
9914 (init_scc_vn): Adjust.
9915 (free_scc_vn): Likewise.
9916 (sccvn_dom_walker::record_cond): Likewise.
9917 (sccvn_dom_walker::after_dom_children): Likewise.
9918
9919 2018-07-19 Martin Sebor <msebor@redhat.com>
9920
9921 PR tree-optimization/84047
9922 PR tree-optimization/83776
9923 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9924 (check_array_bounds): Call it.
9925
9926 2018-07-19 Martin Sebor <msebor@redhat.com>
9927
9928 * align.h (align_flags): Use member initialization.
9929
9930 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9931
9932 * Makefile.in (OBJS): Add optinfo.o.
9933 * coretypes.h (class symtab_node): New forward decl.
9934 (struct cgraph_node): New forward decl.
9935 (class varpool_node): New forward decl.
9936 * dump-context.h: New file.
9937 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9938 "tree-pass.h".
9939 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9940 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9941 (set_alt_dump_file): Likewise.
9942 (dump_context::~dump_context): New dtor.
9943 (dump_gimple_stmt): Move implementation to...
9944 (dump_context::dump_gimple_stmt): ...this new member function.
9945 Add the stmt to any pending optinfo, creating one if need be.
9946 (dump_gimple_stmt_loc): Move implementation to...
9947 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9948 Start a new optinfo and add the stmt to it.
9949 (dump_gimple_expr): Move implementation to...
9950 (dump_context::dump_gimple_expr): ...this new member function.
9951 Add the stmt to any pending optinfo, creating one if need be.
9952 (dump_gimple_expr_loc): Move implementation to...
9953 (dump_context::dump_gimple_expr_loc): ...this new member function.
9954 Start a new optinfo and add the stmt to it.
9955 (dump_generic_expr): Move implementation to...
9956 (dump_context::dump_generic_expr): ...this new member function.
9957 Add the tree to any pending optinfo, creating one if need be.
9958 (dump_generic_expr_loc): Move implementation to...
9959 (dump_context::dump_generic_expr_loc): ...this new member
9960 function. Add the tree to any pending optinfo, creating one if
9961 need be.
9962 (dump_printf): Move implementation to...
9963 (dump_context::dump_printf_va): ...this new member function. Add
9964 the text to any pending optinfo, creating one if need be.
9965 (dump_printf_loc): Move implementation to...
9966 (dump_context::dump_printf_loc_va): ...this new member function.
9967 Start a new optinfo and add the stmt to it.
9968 (dump_dec): Move implementation to...
9969 (dump_context::dump_dec): ...this new member function. Add the
9970 value to any pending optinfo, creating one if need be.
9971 (dump_context::dump_symtab_node): New member function.
9972 (dump_context::get_scope_depth): New member function.
9973 (dump_context::begin_scope): New member function.
9974 (dump_context::end_scope): New member function.
9975 (dump_context::ensure_pending_optinfo): New member function.
9976 (dump_context::begin_next_optinfo): New member function.
9977 (dump_context::end_any_optinfo): New member function.
9978 (dump_context::s_current): New global.
9979 (dump_context::s_default): New global.
9980 (dump_scope_depth): Delete global.
9981 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9982 (dump_symtab_node): New function.
9983 (get_dump_scope_depth): Reimplement in terms of dump_context.
9984 (dump_begin_scope): Likewise.
9985 (dump_end_scope): Likewise.
9986 (selftest::temp_dump_context::temp_dump_context): New ctor.
9987 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9988 (selftest::verify_item): New function.
9989 (ASSERT_IS_TEXT): New macro.
9990 (ASSERT_IS_TREE): New macro.
9991 (ASSERT_IS_GIMPLE): New macro.
9992 (selftest::test_capture_of_dump_calls): New test.
9993 (selftest::dumpfile_c_tests): Call it.
9994 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9995 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9996 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9997 descriptive comment.
9998 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9999 (dump_node, dump_bb): Move these unrelated decls.
10000 (class dump_manager): Add leading comment.
10001 * optinfo.cc: New file.
10002 * optinfo.h: New file.
10003
10004 2018-07-19 Michael Collison <michael.collison@arm.com>
10005 Richard Henderson <rth@redhat.com>
10006
10007 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
10008 (subti): Handle op1 zero.
10009 (subvti4, usub4ti4): New.
10010 (*sub<GPI>3_compare1_imm): New.
10011 (sub<GPI>3_carryinCV): New.
10012 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
10013 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
10014
10015 2018-07-19 Michael Collison <michael.collison@arm.com>
10016 Richard Henderson <rth@redhat.com>
10017
10018 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
10019 (addti3): Create simpler code if low part is already known to be 0.
10020 (addvti4, uaddvti4): New.
10021 (*add<GPI>3_compareC_cconly_imm): New.
10022 (*add<GPI>3_compareC_cconly): New.
10023 (*add<GPI>3_compareC_imm): New.
10024 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
10025 handle constants within this pattern..
10026 (*add<GPI>3_compareV_cconly_imm): New.
10027 (*add<GPI>3_compareV_cconly): New.
10028 (*add<GPI>3_compareV_imm): New.
10029 (add<GPI>3_compareV): New.
10030 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
10031 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
10032 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
10033 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
10034 with 'comparison' operator.
10035 (*add<GPI>3_compareV_cconly_imm): Ditto.
10036 (*add<GPI>3_compareV_cconly): Ditto.
10037 (*add<GPI>3_compareV_imm): Ditto.
10038 (add<GPI>3_compareV): Ditto.
10039 (add<mode>3_carryinC): Ditto.
10040 (*add<mode>3_carryinC_zero): Ditto.
10041 (*add<mode>3_carryinC): Ditto.
10042 (add<mode>3_carryinV): Ditto.
10043 (*add<mode>3_carryinV_zero): Ditto.
10044 (*add<mode>3_carryinV): Ditto.
10045
10046 2018-07-19 Michael Collison <michael.collison@arm.com>
10047 Richard Henderson <rth@redhat.com>
10048
10049 * config/aarch64/aarch64-modes.def (CC_V): New.
10050 * config/aarch64/aarch64-protos.h
10051 (aarch64_addti_scratch_regs): Declare
10052 (aarch64_subvti_scratch_regs): Declare.
10053 (aarch64_expand_subvti): Declare.
10054 (aarch64_gen_unlikely_cbranch): Declare
10055 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
10056 for signed overflow using CC_Vmode.
10057 (aarch64_get_condition_code_1): Handle CC_Vmode.
10058 (aarch64_gen_unlikely_cbranch): New function.
10059 (aarch64_addti_scratch_regs): New function.
10060 (aarch64_subvti_scratch_regs): New function.
10061 (aarch64_expand_subvti): New function.
10062
10063 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10064
10065 * config/aarch64/aarch64-option-extensions.def: New entry for profile
10066 extension.
10067 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
10068 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
10069 extension.
10070
10071 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10072
10073 PR target/83009
10074 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10075 address check not strict.
10076
10077 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10078
10079 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
10080 Umq with Umn.
10081 (store_pair_lanes<mode>): Likewise.
10082 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
10083 enum value 'ADDR_QUERY_LDP_STP_N'.
10084 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
10085 (aarch64_print_address_internal): Add declaration.
10086 (aarch64_print_ldpstp_address): Remove.
10087 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
10088 (aarch64_print_operand): Change printing of 'y'.
10089 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
10090 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
10091 'true' rather than '1'.
10092 * config/aarch64/constraints.md (Uml): Likewise.
10093 (Uml): Rename to Umn.
10094 (Umq): Remove.
10095
10096 2018-07-19 Richard Biener <rguenther@suse.de>
10097
10098 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
10099 a trailing array.
10100 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
10101 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
10102 (vn_reference_hasher): Likewise.
10103 (struct vn_tables_s): Remove obstack and alloc-pool members.
10104 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
10105 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
10106 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
10107 (vn_reference_insert_pieces): Likewise.
10108 (alloc_vn_nary_op_noinit): Adjust.
10109 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
10110 (vn_phi_eq): Adjust.
10111 (shared_lookup_phiargs): Remove.
10112 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
10113 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
10114 (visit_reference_op_call): Likewise.
10115 (copy_nary, copy_phi, copy_reference): Remove.
10116 (process_scc): Rewind the obstack when iterating. Do not
10117 copy the elements to valid_info but just move them from one
10118 hashtable to the other.
10119 (allocate_vn_table): Adjust.
10120 (free_vn_table): Likewise.
10121 (init_scc_vn): Likewise.
10122 (free_scc_vn): Likewise.
10123
10124 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
10125
10126 PR target/86560
10127 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
10128 indirect_return as function type attribute.
10129 (ix86_attribute_table): Change indirect_return to function
10130 type attribute.
10131 * doc/extend.texi: Update indirect_return attribute.
10132
10133 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
10134
10135 * wide-int.h (widest2_int): New.
10136 * gimple-fold.c (arith_overflowed_p): Use it.
10137 * tree.h (widest2_int_cst): New.
10138 * tree-vrp.c (wide_int_binop_overflow): Rename from
10139 vrp_int_const_binop.
10140 Rewrite to work on trees.
10141 (extract_range_from_multiplicative_op_1): Abstract code to...
10142 (wide_int_range_min_max): ...here.
10143 (wide_int_range_cross_product): ...and here.
10144 (extract_range_from_binary_expr_1): Abstract overflow code to...
10145 (wide_int_range_mult_wrapping): ...here.
10146 * tree-vrp.h (wide_int_range_cross_product): New.
10147 (wide_int_range_mult_wrapping): New.
10148
10149 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
10150 Julia Koval <julia.koval@intel.com>
10151
10152 * config/i386/x86-tune-costs.h (skylake_memcpy,
10153 skylake_memset): Replace rep_prefix with unrolling for size 512.
10154
10155 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
10156
10157 PR middle-end/86544
10158 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
10159 comparision with EQ_EXPR in last stmt.
10160
10161 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
10162
10163 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
10164 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
10165 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
10166 previously known as "PowerPC AltiVec Built-in Functions". Move
10167 some material to new subsubsections "PowerPC AltiVec Built-in
10168 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10169 ISA 2.07".
10170 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10171 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10172 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10173 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10174
10175 2018-07-18 Richard Biener <rguenther@suse.de>
10176
10177 PR tree-optimization/86557
10178 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10179 EXACT_DIV_EXPR.
10180
10181 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
10182
10183 * config/s390/s390.c (s390_function_profiler): Generate CFI.
10184
10185 2018-07-17 Jeff Law <law@redhat.com>
10186
10187 * config/arm/arm.c (get_label_padding): Update for recent
10188 changes to label_to_alignment.
10189
10190 PR tree-optimization/86010
10191 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10192
10193 * config/mips/mips.c (vr4130_align_insns): Update for recent
10194 changes to label_to_alignment.
10195
10196 * config/frv/frv.c (frv_label_align): Update for recent changes
10197 to label_to_alignment.
10198
10199 * config/nios2/nios2.c (nios2_label_align): Update for recent
10200 changes which dropped ALIGN_LABELS_LOG.
10201
10202 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
10203
10204 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10205 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10206
10207 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
10208
10209 * config/arc/arc.c (arc_label_align): Use align_labels instead of
10210 deprecated align_labels_log.
10211
10212 2018-07-17 Richard Biener <rguenther@suse.de>
10213
10214 PR lto/86456
10215 * dwarf2out.c (init_sections_and_labels): Always generate
10216 a debug_line_str_section for early LTO debug.
10217 (dwarf2out_finish): Reset debug_line_str_hash output early.
10218 Bump counter for extra dwarf5 .debug_loc labels to not conflict
10219 with fat LTO part.
10220 (dwarf2out_early_finish): Output debug_line_str.
10221
10222 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10223
10224 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10225 index register on z196 or later.
10226
10227 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10228
10229 * config/s390/s390.c (s390_default_align): Set default function
10230 alignment to 16.
10231 (s390_override_options_after_change): Call s390_default align.
10232 (s390_option_override_internal): Call s390_default_align.
10233 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10234
10235 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10236
10237 PR middle-end/86542
10238 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10239 to _looptemp_ clauses, other than the first two.
10240
10241 2018-07-17 Martin Liska <mliska@suse.cz>
10242
10243 * opts.c: Do not enable OPT_falign_* for -Os.
10244
10245 2018-07-17 Martin Liska <mliska@suse.cz>
10246
10247 * align.h (MAX_CODE_ALIGN): New.
10248 (MAX_CODE_ALIGN_VALUE): New.
10249 * common/config/i386/i386-common.c (ix86_handle_option):
10250 (MAX_CODE_ALIGN): Moved to align.h.
10251 * final.c (MAX_CODE_ALIGN): Likewise.
10252 * opts.c (parse_and_check_align_values):
10253 (MAX_CODE_ALIGN): Likewise.
10254 (MAX_CODE_ALIGN_VALUE): Likewise.
10255
10256 2018-07-17 Martin Liska <mliska@suse.cz>
10257
10258 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10259 in order to fulfil coding style.
10260 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10261 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10262 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10263 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10264 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10265 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10266 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10267 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10268 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10269
10270 2018-07-17 Martin Liska <mliska@suse.cz>
10271
10272 * align.h: New file.
10273 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10274 directly.
10275 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10276 align_flags of label_to_alignment.
10277 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10278 align_flags class.
10279 * config/m68k/m68k.c: Do not use removed align_labels_value and
10280 align_loops_value.
10281 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10282 (LOOP_ALIGN): Likewise.
10283 (LABEL_ALIGN): Likewise.
10284 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10285 Remove not used macro.
10286 (rs6000_loop_align): Change return type to align_flags.
10287 (rs6000_loop_align_max_skip): Remove.
10288 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
10289 Change return type to align_flags.
10290 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10291 Remove not used macro.
10292 (rs6000_loop_align): Change return type to align_flags.
10293 (rs6000_loop_align_max_skip): Remove.
10294 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10295 * config/rx/rx-protos.h (rx_align_for_label): Make it
10296 static function.
10297 * config/rx/rx.c (rx_align_for_label): Change return type
10298 to align_flags.
10299 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10300 macro definitions.
10301 into align_flags class.
10302 (LABEL_ALIGN): Likewise.
10303 (LOOP_ALIGN): Likewise.
10304 * config/s390/s390.c (s390_label_align): Use align_flags
10305 class member.
10306 (s390_asm_output_function_label): Likewise.
10307 * config/sh/sh.c (sh_override_options_after_change):
10308 Use align_flags class directly without macros.
10309 (find_barrier): Likewise.
10310 (barrier_align): Likewise.
10311 (sh_loop_align): Likewise.
10312 * config/spu/spu.c (spu_option_override):
10313 Use align_flags_tuple::get_value instead of removed macros.
10314 (spu_sched_init): Likewise.
10315 * config/spu/spu.h (GTY): Likewise.
10316 * config/visium/visium.c (visium_option_override):
10317 Set "8" as default secondary alignment.
10318 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10319 in order to guarantee secondary alignment of 8.
10320 * coretypes.h: Include align.h header file.
10321 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10322 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10323 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10324 * doc/tm.texi.in: Likewise.
10325 * final.c (struct label_alignment): Remove not used structure.
10326 (LABEL_ALIGN): Change type to align_flags.
10327 (LOOP_ALIGN): Likewise.
10328 (JUMP_ALIGN): Likewise.
10329 (default_loop_align_max_skip): Remove.
10330 (default_label_align_max_skip): Likewise.
10331 (default_jump_align_max_skip): Likewise.
10332 (default_label_align_after_barrier_max_skip):
10333 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10334 (LABEL_TO_MAX_SKIP): Remove.
10335 (label_to_alignment): Return align_flags type instead of integer.
10336 (label_to_max_skip): Remove.
10337 (align_fuzz): Use align_flags type.
10338 (compute_alignments): Use align_flags type and use align_flags::max
10339 to combine multiple alignments.
10340 (grow_label_align): Grow vec instead of C array.
10341 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10342 (shorten_branches): Use align_flags type and use align_flags::max
10343 to combine multiple alignments.
10344 (final_scan_insn_1): Remove usage of secondary alignment that comes
10345 from label alignment, but instead use proper secondary alignment
10346 which is computed in grow_label_align.
10347 * flags.h (struct align_flags_tuple): Move to align.h.
10348 (struct align_flags): Likewise.
10349 (state_align_loops): Rename to align_loops.
10350 (state_align_jumps): Rename to align_jumps.
10351 (state_align_labels): Rename to align_labels.
10352 (state_align_functions): Rename to align_functions.
10353 (align_loops_log): Remove.
10354 (align_jumps_log): Remove.
10355 (align_labels_log): Remove.
10356 (align_functions_log): Remove.
10357 (align_loops_max_skip): Remove.
10358 (align_jumps_max_skip): Remove.
10359 (align_labels_max_skip): Remove.
10360 (align_functions_max_skip): Remove.
10361 (align_loops_value): Remove.
10362 (align_jumps_value): Remove.
10363 (align_labels_value): Remove.
10364 (align_functions_value): Remove.
10365 * output.h (label_to_alignment): Change return type to align_flags.
10366 (label_to_max_skip): Remove.
10367 * target.def: Remove loop_align_max_skip, label_align_max_skip,
10368 jump_align_max_skip macros.
10369 * targhooks.h (default_loop_align_max_skip): Remove.
10370 (default_label_align_max_skip): Likewise.
10371 (default_jump_align_max_skip): Likewise.
10372 (default_label_align_after_barrier_max_skip): Remove.
10373 * toplev.c (read_log_maxskip): Use ::normalize function.
10374 (parse_N_M): Remove not used argument and also call ::normalize.
10375 (parse_alignment_opts): Do not pass unused arguments.
10376 * varasm.c (assemble_start_function): Use directly align_functions
10377 instead of removed macros.
10378 * system.h: Do not poison removed macros.
10379
10380 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10381
10382 PR middle-end/86539
10383 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10384 and cond temporaries don't have reference type if iterator has
10385 pointer type. For init use &for_pre_body instead of pre_p if
10386 for_pre_body is non-empty.
10387
10388 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10389
10390 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10391 double-double modes to SFmode directly directly.
10392 (trunc<mode>sf2_fprs): Delete.
10393
10394 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10395
10396 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10397 for conversions between IFmode and the decimal floating point modes.
10398 (init_float128_ieee): Use the correct names for conversions between
10399 KFmode and the decimal floating point modes.
10400
10401 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10402
10403 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10404 for the conversions between TDmode and IFmode.
10405 (init_float128_ieee): Use more correct names for the conversions
10406 between TDmode and KFmode.
10407
10408 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10409
10410 PR tree-optimization/86526
10411 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10412 (inline_expand_builtin_string_cmp): Likewise.
10413 (inline_string_cmp): Likewise. Use c_readstr instead of
10414 builtin_memcpy_read_str. Add unit_mode temporary.
10415
10416 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10417
10418 PR middle-end/86528
10419 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10420 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10421
10422 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10423
10424 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10425 Alphabetize prototypes of built-in functions, separating out
10426 built-in functions that are listed in this section but should be
10427 described elsewhere.
10428
10429 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10430
10431 PR target/86511
10432 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10433 conditional move when trapping comparison was split to a
10434 non-trapping one (and vice versa).
10435
10436 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10437
10438 * config/s390/s390.c (s390_function_profiler): Generate nops
10439 instead of profiler call sequences.
10440 * config/s390/s390.opt: Add the new option.
10441
10442 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10443
10444 * config/s390/s390.c (s390_function_profiler): Generate
10445 __mcount_loc section.
10446 * config/s390/s390.opt: Add the new option.
10447
10448 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10449
10450 * common.opt: Add the new warning.
10451 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10452 %r0,__fentry__" when -mfentry is specified.
10453 (s390_option_override_internal): Disallow -mfentry for 31-bit
10454 CPUs.
10455 * config/s390/s390.opt: Add the new option.
10456
10457 2018-07-16 Richard Biener <rguenther@suse.de>
10458
10459 PR lto/86523
10460 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10461 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10462
10463 2018-07-16 Martin Liska <mliska@suse.cz>
10464
10465 PR ipa/86529
10466 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10467 to ::get_create.
10468
10469 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10470
10471 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10472
10473 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10474
10475 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10476 for ARCHS4x.
10477 * config/arc/arc-cpus.def (hs4x): New cpu.
10478 (hs4xd): Likewise.
10479 * config/arc/arc-tables.opt: Regenerate.
10480 * config/arc/arc.c (arc_sched_issue_rate): New function.
10481 (TARGET_SCHED_ISSUE_RATE): Define.
10482 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10483 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10484 fpu_cvt.
10485 (attr tune): Add ARCHS4x tune values.
10486 (attr tune_dspmpy): Define.
10487 (*tst): Correct instruction type.
10488 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10489 * config/arc/arcHS4x.md: New file.
10490 * config/arc/fpu.md: Update instruction type attributes.
10491 * config/arc/t-multilib: Regenerate.
10492
10493 2018-07-16 Tom de Vries <tdevries@suse.de>
10494
10495 PR debug/86455
10496 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10497
10498 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10499
10500 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10501 early clobber.
10502
10503 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10504
10505 PR tree-optimization/86514
10506 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10507 conversion to a boolean type from a type with greater precision.
10508
10509 2018-07-16 Tom de Vries <tdevries@suse.de>
10510
10511 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10512 dump_flags request TDF_SLIM.
10513
10514 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10515
10516 * fold-const.c (int_const_binop_1): Abstract...
10517 (wide_int_binop): ...wide int code here.
10518 (poly_int_binop): ...poly int code here.
10519 Abstract the rest of int_const_binop_1 into int_const_binop.
10520 * fold-const.h (wide_int_binop): New.
10521 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10522 Remove useless PLUS/MINUS_EXPR case.
10523 (zero_nonzero_bits_from_vr): Move wide int code...
10524 (zero_nonzero_bits_from_bounds): ...here.
10525 (extract_range_from_binary_expr_1): Move mask optimization code...
10526 (range_easy_mask_min_max): ...here.
10527 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10528 (range_easy_mask_min_max): New.
10529
10530 2018-07-15 Jeff Law <law@redhat.com>
10531
10532 PR target/85993
10533 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10534 block.
10535
10536 2018-07-14 Jim Wilson <jimw@sifive.com>
10537
10538 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10539
10540 2018-07-14 Paul Koning <ni1d@arrl.net>
10541
10542 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10543
10544 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10545
10546 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10547 copying section.
10548
10549 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10550 Steve Munroe <munroesj52@gmail.com>
10551
10552 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10553 (_mm_andnot_si128): Likewise.
10554 (_mm_or_si128): Likewise.
10555 (_mm_xor_si128): Likewise.
10556
10557 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10558
10559 PR middle-end/78809
10560 * builtins.c (expand_builtin_memcmp): Inline the calls first
10561 when result_eq is false.
10562 (expand_builtin_strcmp): Inline the calls first.
10563 (expand_builtin_strncmp): Likewise.
10564 (inline_string_cmp): New routine. Expand a string compare
10565 call by using a sequence of char comparison.
10566 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10567 a call to str(n)cmp/memcmp.
10568 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10569 New option.
10570 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10571
10572 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10573
10574 * config/arm/driver-arm.c: Include arm-native.h.
10575 (host_detect_local_cpu): Use auto-generated data tables.
10576 (vendors, arm_cpu_table): Delete. Move part information to ...
10577 * config/arm/arm-cpus.in: ... here.
10578 * config/arm/parsecpu.awk (gen_native): New function.
10579 (vendor, part): New CPU fields.
10580 (END): Add support for building the native CPU detection tables.
10581 * config/arm/t-arm (arm-native.h): Add build rule.
10582 (driver-arm.o): Add dependency on arm-native.h.
10583
10584 2018-07-13 Richard Biener <rguenther@suse.de>
10585
10586 PR middle-end/85974
10587 * match.pd (addr1 - addr2): Allow either of the operand to
10588 have a conversion.
10589
10590 2018-07-13 Tom de Vries <tdevries@suse.de>
10591
10592 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10593 in remap_ssa_name.
10594
10595 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10596
10597 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10598 arrays instead of numbered variables.
10599
10600 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10601
10602 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10603 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10604
10605 2018-07-13 Richard Biener <rguenther@suse.de>
10606
10607 PR debug/86452
10608 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10609 instead of get_context_die.
10610
10611 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10612 Richard Biener <rguenther@suse.de>
10613
10614 PR middle-end/86489
10615 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10616 that the loop latch destination where phi is defined.
10617
10618 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10619
10620 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10621 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10622 (riscv_set_current_function): Extract getting interrupt type to new
10623 function.
10624 (riscv_get_interrupt_type): New function.
10625 (riscv_merge_decl_attributes): New function, checking interrupt type is
10626 same.
10627 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10628
10629 2018-07-12 Paul Koning <ni1d@arrl.net>
10630
10631 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10632 directive.
10633
10634 2018-07-12 Paul Koning <ni1d@arrl.net>
10635
10636 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10637 zero reference, add doloop_end instead.
10638 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10639 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10640 detail for doloop_end.
10641
10642 2018-07-12 Martin Sebor <msebor@redhat.com>
10643
10644 PR c/86453
10645 * attribs.c (decl_attributes): Reject conflicting attributes before
10646 calling attribute handlers.
10647
10648 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10649
10650 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10651 parameter.
10652 (gcc::dump_manager::get_dump_file_name): likewise.
10653 (dump_begin): Likewise.
10654 * dumpfile.h (dump_begin): Update prototype.
10655 (gcc::dump_manager::get_dump_file_name,
10656 gcc::dump_manager::get_dump_file_name): Update prototype.
10657
10658 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10659
10660 * internal-fn.h (vectorizable_internal_fn_p): New function.
10661 * tree-vect-slp.c (compatible_calls_p): Likewise.
10662 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10663 to internal functions.
10664 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10665
10666 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10667
10668 * fold-const.h (inverse_conditions_p): Declare.
10669 * fold-const.c (inverse_conditions_p): New function.
10670 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10671 that test the inverse condition of a conditional internal function.
10672 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10673 * internal-fn.c (internal_fn_mask_index): Handle conditional
10674 internal functions.
10675 (vectorized_internal_fn_supported_p): New function.
10676 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10677 (any_pred_load_store): Replace with...
10678 (need_to_predicate): ...this new variable.
10679 (redundant_ssa_names): New variable.
10680 (ifcvt_can_use_mask_load_store): Move initial checks to...
10681 (ifcvt_can_predicate): ...this new function. Handle tree codes
10682 for which a conditional internal function exists.
10683 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10684 instead of ifcvt_can_use_mask_load_store. Update after variable
10685 name change.
10686 (predicate_load_or_store): New function, split out from
10687 predicate_mem_writes.
10688 (check_redundant_cond_expr): New function.
10689 (value_available_p): Likewise.
10690 (predicate_rhs_code): Likewise.
10691 (predicate_mem_writes): Rename to...
10692 (predicate_statements): ...this. Use predicate_load_or_store
10693 and predicate_rhs_code.
10694 (combine_blocks, tree_if_conversion): Update after above name changes.
10695 (ifcvt_local_dce): Handle redundant_ssa_names.
10696 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10697 general conditional functions.
10698 * tree-vect-stmts.c (vectorizable_call): Likewise.
10699
10700 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10701 Alan Hayward <alan.hayward@arm.com>
10702 David Sherwood <david.sherwood@arm.com>
10703
10704 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10705 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10706 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10707 plus and minus and convert them into IFN_COND_FMA-based sequences.
10708 (convert_mult_to_fma): Handle conditional plus and minus.
10709
10710 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10711
10712 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10713 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10714 (cond_fnms_optab): New optabs.
10715 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10716 internal functions.
10717 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10718 * internal-fn.h (get_conditional_internal_fn): Declare.
10719 (get_unconditional_internal_fn): Likewise.
10720 * internal-fn.c (cond_ternary_direct): New macro.
10721 (expand_cond_ternary_optab_fn): Likewise.
10722 (direct_cond_ternary_optab_supported_p): Likewise.
10723 (FOR_EACH_COND_FN_PAIR): Likewise.
10724 (get_conditional_internal_fn): New function.
10725 (get_unconditional_internal_fn): Likewise.
10726 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10727 (gimple_match_op::gimple_match_op): Add a new overload for 5
10728 operands.
10729 (gimple_match_op::set_op): Likewise.
10730 (gimple_resimplify5): Declare.
10731 * genmatch.c (decision_tree::gen): Generate simplifications for
10732 5 operands.
10733 * gimple-match-head.c (gimple_simplify): Define an overload for
10734 5 operands. Handle calls with 5 arguments in the top-level overload.
10735 (convert_conditional_op): Handle conversions from unconditional
10736 internal functions to conditional ones.
10737 (gimple_resimplify5): New function.
10738 (build_call_internal): Pass a fifth operand.
10739 (maybe_push_res_to_seq): Likewise.
10740 (try_conditional_simplification): Try converting conditional
10741 internal functions to unconditional internal functions.
10742 Handle 3-operand unconditional forms.
10743 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10744 Define ternary equivalents of the current rules for binary conditional
10745 internal functions.
10746 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10747 ternary operations.
10748 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10749 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10750 (optab): Handle them.
10751 (SVE_COND_FP_TERNARY): New int iterator.
10752 (sve_fmla_op, sve_fmad_op): New int attributes.
10753 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10754 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10755 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10756
10757 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10758
10759 * target.def (preferred_else_value): New target hook.
10760 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10761 * doc/tm.texi: Regenerate.
10762 * targhooks.h (default_preferred_else_value): Declare.
10763 * targhooks.c (default_preferred_else_value): New function.
10764 * internal-fn.h (conditional_internal_fn_code): Declare.
10765 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10766 (get_conditional_internal_fn): Use it.
10767 (conditional_internal_fn_code): New function.
10768 * gimple-match.h (gimple_match_cond): New struct.
10769 (gimple_match_op): Add a cond member function.
10770 (gimple_match_op::gimple_match_op): Update all forms to take a
10771 gimple_match_cond.
10772 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10773 for the suboperation, but don't specify a particular else_value.
10774 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10775 (visit_nary_op, visit_reference_op_load): Pass
10776 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10777 * gimple-match-head.c: Include tree-eh.h
10778 (convert_conditional_op): New function.
10779 (maybe_resimplify_conditional_op): Likewise.
10780 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10781 (gimple_resimplify2): Likewise.
10782 (gimple_resimplify3): Likewise.
10783 (gimple_resimplify4): Likewise.
10784 (maybe_push_res_to_seq): Return null for conditional operations.
10785 (try_conditional_simplification): New function.
10786 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10787 constructor.
10788 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10789 IFN_COND_* call.
10790 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10791 function.
10792 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10793
10794 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10795
10796 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10797 DECL_FCONTEXT
10798 (hash_tree): Do not hash DECL_FCONTEXT
10799 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10800 Do not stream DECL_FCONTEXT.
10801 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10802 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10803
10804 2018-07-12 Richard Biener <rguenther@suse.de>
10805
10806 PR debug/86462
10807 * dwarf2out.c (gen_block_die): Only output blocks when they have
10808 at least one !DECL_IGNORED_P variable.
10809
10810 2018-07-12 Richard Biener <rguenther@suse.de>
10811
10812 PR target/84829
10813 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10814 Remove -mieee-fp handling.
10815
10816 2018-07-12 Richard Biener <rguenther@suse.de>
10817
10818 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10819 left-over from last patch.
10820
10821 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10822
10823 PR tree-optimization/86492
10824 * gimple-ssa-store-merging.c
10825 (imm_store_chain_info::coalesce_immediate_stores): Call
10826 check_no_overlap even for the merge_overlapping case. Formatting fix.
10827
10828 2018-07-12 Richard Biener <rguenther@suse.de>
10829
10830 PR middle-end/86479
10831 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10832 move possibly trapping operations into the conditional.
10833
10834 2018-07-12 Richard Biener <rguenther@suse.de>
10835
10836 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10837 (vn_lookup_simplify_result): Remove recursion limit applied
10838 here.
10839 (vn_nary_build_or_lookup_1): Adjust.
10840 (try_to_simplify): Likewise.
10841 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10842 here.
10843 (gimple_resimplify2): Likewise.
10844 (gimple_resimplify3): Likewise.
10845 (gimple_resimplify4): Likewise.
10846
10847 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10848
10849 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10850 Use __mmask64 type instead of __mmask8 for __M argument.
10851 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10852 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10853 __U argument.
10854 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10855 __mmask16 for __M argument.
10856 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10857 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10858 to __mmask16 instead of __mmask8.
10859 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10860 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10861 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10862 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10863 instead of __mmask16 for __U argument.
10864 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10865 __mmask16 instead of __mmask8 for __U argument.
10866 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10867 __U argument.
10868 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10869 __mmask16.
10870 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10871 argument.
10872 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10873 __U argument.
10874 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10875 __mmask16.
10876 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10877 of __mmask16.
10878 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10879 __U argument.
10880 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10881 __U argument.
10882 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10883 __U argument.
10884 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10885 __U argument.
10886 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10887 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10888 return type as well as __M argument type and all casts from __mmask8
10889 to __mmask32.
10890 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10891 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10892 return type as well as __M argument type and all casts from __mmask8
10893 to __mmask16.
10894 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10895 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10896 return type as well as __M argument type and all casts from __mmask8
10897 to __mmask32.
10898 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10899 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10900 return type as well as __M argument type and all casts from __mmask8
10901 to __mmask16.
10902 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10903 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10904 __mmask16.
10905
10906 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10907
10908 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10909 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10910 for __U argument.
10911
10912 2018-07-11 Paul Koning <ni1d@arrl.net>
10913
10914 * doc/md.texi (define_subst): Document how multiple occurrences of
10915 the same argument in the replacement pattern are handled.
10916
10917 2018-07-11 Paul Koning <ni1d@arrl.net>
10918
10919 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10920 alphabetical order.
10921 (Common Type Attributes): Add "mode" attribute.
10922
10923 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10924
10925 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10926 stream DECL_ORIGINAL_TYPE.
10927 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10928 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10929 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10930 Do not walk original type.
10931 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10932 external decls.
10933 (write_ts_decl_non_common_tree_pointers): Do not stream
10934 DECL_ORIGINAL_TYPE
10935 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10936 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10937
10938 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10939
10940 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10941 thread twice from the same starting edge.
10942
10943 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10944
10945 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10946 * gimple.c (gimple_call_nonnull_result_p): ...here...
10947 (gimple_call_nonnull_arg): ...and here.
10948 * gimple.h (gimple_call_nonnull_result_p): New.
10949 (gimple_call_nonnull_arg): New.
10950
10951 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10952
10953 * config/arm/arm-cpus.in: Move information from fpu field of each
10954 cpu definition to the isa field.
10955 * config/arm/parsecpu.awk (fpu): Delete match rule.
10956 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10957
10958 2018-07-11 Richard Biener <rguenther@suse.de>
10959
10960 PR debug/86457
10961 * dwarf2out.c (init_sections_and_labels): Use
10962 output_asm_line_debug_info consistently.
10963 (dwarf2out_early_finish): Likewise.
10964 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10965 type units.
10966
10967 2018-07-11 Richard Biener <rguenther@suse.de>
10968
10969 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10970 Rework father_bb setting in a way to avoid propagating constants
10971 multiple times on a loop body.
10972
10973 2018-07-10 Mark Wielaard <mark@klomp.org>
10974
10975 PR debug/86459
10976 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10977
10978 2018-07-10 Richard Biener <rguenther@suse.de>
10979
10980 * hash-map.h (hash_map::iterator::operator*): Return
10981 references to key and value.
10982
10983 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10984
10985 PR c++/86443
10986 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10987 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10988 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10989 (gimplify_omp_for): For composite loops, move outer
10990 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10991 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10992 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10993 TREE_LIST for both the original class iterator and the "last" helper
10994 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10995 loop, remember has_decl_expr from outer composite loops for the
10996 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10997
10998 2018-07-09 Martin Sebor <msebor@redhat.com>
10999
11000 PR middle-end/77357
11001 PR middle-end/86428
11002 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
11003 accessing implicitly initialized array elements.
11004 * expr.c (string_constant): Handle string initializers of
11005 character arrays within aggregates.
11006 * gimple-fold.c (fold_array_ctor_reference): Add argument.
11007 Store element offset. As a special case, handle zero size.
11008 (fold_nonarray_ctor_reference): Same.
11009 (fold_ctor_reference): Add argument. Store subobject offset.
11010 * gimple-fold.h (fold_ctor_reference): Add argument.
11011
11012 2018-07-09 Paul Koning <ni1d@arrl.net>
11013
11014 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
11015 (pdp11_insn_cost): New function.
11016 (pdp11_md_asm_adjust): New function.
11017 (TARGET_INVALID_WITHIN_DOLOOP): Define.
11018 (pdp11_rtx_costs): Update to match machine better.
11019 (output_addr_const_pdp11): Correct format mismatch warnings.
11020 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
11021 * config/pdp11/pdp11.md: General change to add base_cost and/or
11022 length attributes for use by new pdp11_insn_cost function.
11023 (MIN_BRANCH): Correct definition.
11024 (MIN_SOB): Ditto.
11025 (doloop_end): Use standard pattern name for looping pattern.
11026 (doloop_end_nocc): New.
11027 (movsf): Add another constraint alternative.
11028 (zero_extendqihi2): Add constraint alternatives for not in place
11029 extend.
11030 (zero_extendhisi2): Remove.
11031 (shift patterns): Add CC handling variants.
11032 (bswaphi2): New.
11033 (bswapsi2): New.
11034 (rothi3): New.
11035 (define_peephole2): New peephole to recognize mov that sets CC for
11036 subsequent test.
11037
11038 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11039
11040 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
11041 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
11042 wi::add.
11043
11044 2018-07-09 Jakub Jelinek <jakub@redhat.com>
11045
11046 PR c/86420
11047 * real.c (real_nextafter): Return true if result is denormal.
11048
11049 2018-07-09 Martin Liska <mliska@suse.cz>
11050
11051 * common.opt: Add back wrongly removed attribute.
11052
11053 2018-07-09 Richard Biener <rguenther@suse.de>
11054
11055 PR debug/86413
11056 * dwarf2out.c (gen_block_die): For an early generated DIE
11057 always output high/low PC attributes.
11058
11059 2018-07-09 Tom de Vries <tdevries@suse.de>
11060
11061 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
11062 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
11063 onto VAR_DECL with abstract origin.
11064
11065 2018-07-07 Jim Wilson <jimw@sifive.com>
11066
11067 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
11068
11069 2018-07-07 Tom de Vries <tdevries@suse.de>
11070
11071 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
11072
11073 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
11074
11075 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
11076 overflow_type.
11077 (combine_bound): Use wide-int overflow calculation instead of
11078 rolling our own.
11079 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
11080 overflow_type.
11081 * fold-const.c (int_const_binop_2): Same.
11082 (extract_muldiv_1): Same.
11083 (fold_div_compare): Same.
11084 (fold_abs_const): Same.
11085 * match.pd: Same.
11086 * poly-int.h (add): Same.
11087 (sub): Same.
11088 (neg): Same.
11089 (mul): Same.
11090 * predict.c (predict_iv_comparison): Same.
11091 * profile-count.c (slow_safe_scale_64bit): Same.
11092 * simplify-rtx.c (simplify_const_binary_operation): Same.
11093 * tree-chrec.c (tree_fold_binomial): Same.
11094 * tree-data-ref.c (split_constant_offset_1): Same.
11095 * tree-if-conv.c (idx_within_array_bound): Same.
11096 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
11097 * tree-ssa-phiopt.c (minmax_replacement): Same.
11098 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
11099 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
11100 * vr-values.c (vr_values::adjust_range_with_scev): Same.
11101 * wide-int.cc (wi::add_large): Same.
11102 (wi::mul_internal): Same.
11103 (wi::sub_large): Same.
11104 (wi::divmod_internal): Same.
11105 * wide-int.h: Change overflow type to overflow_type for neg, add,
11106 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
11107 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
11108 mul_internal, divmod_internal.
11109 (overflow_type): New enum.
11110 (accumulate_overflow): New.
11111
11112 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11113
11114 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
11115 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
11116
11117 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11118
11119 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
11120 argument is checked for zero before entering loop, avoid checking again.
11121
11122 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11123
11124 * gimplify.h (generic_expr_could_trap_p): Set as global function.
11125 * gimplify.h (generic_expr_could_trap_p): Likwise.
11126 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
11127
11128 2018-07-06 Jakub Jelinek <jakub@redhat.com>
11129
11130 PR tree-optimization/86401
11131 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
11132 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
11133 (fold_bit_and_mask): ... here. New helper function for match.pd.
11134 * fold-const.h (fold_bit_and_mask): Declare.
11135 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
11136
11137 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
11138
11139 PR target/86324
11140 * target.def (translate_mode_attribute): New hook.
11141 * targhooks.h (default_translate_mode_attribute): Declare.
11142 * targhooks.c (default_translate_mode_attribute): New function.
11143 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
11144 * doc/tm.texi: Regenerate.
11145 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
11146 (rs6000_translate_mode_attribute): New function.
11147
11148 2018-07-06 Paul Koning <ni1d@arrl.net>
11149
11150 * doc/md.texi (define_split): Document DONE and FAIL.
11151 (define_peephole2): Ditto.
11152
11153 2018-07-05 Jeff Law <law@redhat.com>
11154
11155 PR tree-optimization/86010
11156 * tree-ssa-dse.c (compute_trims): More aggressively trim at
11157 both the head and tail of mem* and str* calls.
11158
11159 2018-07-05 Jim Wilson <jimw@sifive.com>
11160
11161 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
11162
11163 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
11164
11165 * config/aarch64/aarch64-simd.md: correct flags text for
11166 MIN_EXPR replacement.
11167
11168 2018-07-05 James Clarke <jrtc27@jrtc27.com>
11169
11170 * configure: Regenerated.
11171
11172 2018-07-05 Carl Love <cel@us.ibm.com>
11173
11174 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11175 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11176 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11177 VSX_BUILTIN_DOUBLEL_V4SF.
11178
11179 2018-07-05 Martin Sebor <msebor@redhat.com>
11180
11181 PR c++/86400
11182 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11183 than its domain to compute its the upper bound of a char array.
11184
11185 2018-07-05 Nathan Sidwell <nathan@acm.org>
11186
11187 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11188 * doc/cpp.texi: Update comment.
11189 * doc/tm.texi: Rebuilt.
11190 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11191 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11192 * doc/extend.texi (Backwards Compatibility): Clarify it is system
11193 headers affected by extern "C".
11194 * system.h: Poison NO_IMPLICIT_EXTERN_C.
11195 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11196 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11197 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11198 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11199 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11200 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11201 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11202 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11203 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11204 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11205 config/sparc/sp64-elf.h, config/spu/spu.h,
11206 config/stormy16/stormy16.h, config/v850/v850.h,
11207 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11208 define NO_IMPLICIT_EXTERN_C.
11209 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11210
11211 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11212
11213 PR target/84711
11214 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11215 instead of GET_MODE_SIZE when comparing Units.
11216
11217 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11218
11219 PR target/84711
11220 * rtlanal.c (set_noop_p): Constrain on mode change,
11221 include hard-reg-set.h
11222
11223 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11224
11225 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11226
11227 2018-07-05 Jakub Jelinek <jakub@redhat.com>
11228
11229 Revert
11230 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11231
11232 PR sanitizer/84250
11233 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11234 libasan.
11235 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11236
11237 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11238
11239 PR sanitizer/84250
11240 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11241 libasan.
11242 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11243
11244 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
11245
11246 PR middle-end/86380
11247 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11248
11249 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
11250
11251 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11252 neg_*_op* variables.
11253
11254 2018-07-04 Martin Liska <mliska@suse.cz>
11255
11256 * tree-switch-conversion.c: Define
11257 max_ratio_for_speed and max_ratio_for_size constants.
11258
11259 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11260 Martin Liska <mliska@suse.cz>
11261
11262 PR middle-end/66240
11263 PR target/45996
11264 PR c/84100
11265 * common.opt: Rename align options with 'str_' prefix.
11266 * common/config/i386/i386-common.c (set_malign_value): New
11267 function.
11268 (ix86_handle_option): Use it to set -falign-* options/
11269 * config/aarch64/aarch64-protos.h (struct tune_params): Change
11270 type from int to string.
11271 * config/aarch64/aarch64.c: Update default values from int
11272 to string.
11273 * config/alpha/alpha.c (alpha_override_options_after_change):
11274 Likewise.
11275 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11276 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11277 max skip conditionally.
11278 * config/i386/freebsd.h (SUBALIGN_LOG): New.
11279 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11280 max skip conditionally.
11281 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11282 max skip conditionally.
11283 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11284 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11285 max skip conditionally.
11286 * config/i386/i386.c (struct ptt): Change type from int to
11287 string.
11288 (ix86_default_align): Set default values.
11289 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11290 max skip conditionally.
11291 * config/i386/iamcu.h (SUBALIGN_LOG): New.
11292 (ASM_OUTPUT_MAX_SKIP_ALIGN):
11293 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11294 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11295 max skip conditionally.
11296 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11297 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11298 * config/i386/x86-64.h (SUBALIGN_LOG): New.
11299 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11300 max skip conditionally.
11301 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11302 * config/ia64/ia64.c (ia64_option_override): Set default values
11303 for alignment options.
11304 * config/m68k/m68k.c: Handle new str_align_* options.
11305 * config/mips/mips.c (mips_set_compression_mode): Change
11306 type of constants.
11307 (mips_option_override): Set default values for options.
11308 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11309 Likewise.
11310 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11311 Likewise.
11312 * config/rx/rx.c (rx_option_override): Likewise.
11313 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11314 (LABEL_ALIGN): Use align_labels_log.
11315 (LOOP_ALIGN): Use align_loops_align.
11316 * config/s390/s390.c (s390_asm_output_function_label): Use new
11317 macros.
11318 * config/sh/sh.c (sh_override_options_after_change):
11319 Change type of constants.
11320 * config/spu/spu.c (spu_sched_init): Likewise.
11321 * config/sparc/sparc.c (sparc_option_override): Set default
11322 values for options.
11323 * config/visium/visium.c (visium_option_override): Likewise.
11324 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11325 emit p2align format with last argument if it's not needed.
11326 * doc/invoke.texi: Document extended format of -falign-*.
11327 * final.c: Use align_labels alignment.
11328 * flags.h (struct target_flag_state): Change type to use
11329 align_flags.
11330 (struct align_flags_tuple): New.
11331 (struct align_flags): Likewise.
11332 (align_loops_log): Redefine macro to use new types.
11333 (align_loops_max_skip): Redefine macro to use new types.
11334 (align_jumps_log): Redefine macro to use new types.
11335 (align_jumps_max_skip): Redefine macro to use new types.
11336 (align_labels_log): Redefine macro to use new types.
11337 (align_labels_max_skip): Redefine macro to use new types.
11338 (align_functions_log): Redefine macro to use new types.
11339 (align_loops): Redefine macro to use new types.
11340 (align_jumps): Redefine macro to use new types.
11341 (align_labels): Redefine macro to use new types.
11342 (align_functions): Redefine macro to use new types.
11343 (align_functions_max_skip): Redefine macro to use new types.
11344 (align_loops_value): New macro.
11345 (align_jumps_value): New macro.
11346 (align_labels_value): New macro.
11347 (align_functions_value): New macro.
11348 * function.c (invoke_set_current_function_hook): Propagate
11349 alignment values from flags to global variables default in
11350 topleev.h.
11351 * ipa-icf.c (sem_function::equals_wpa): Use
11352 cl_optimization_option_eq instead of memcmp.
11353 * lto-streamer.h (cl_optimization_stream_out): Support streaming
11354 of string types.
11355 (cl_optimization_stream_in): Likewise.
11356 * optc-save-gen.awk: Support strings in cl_optimization.
11357 * opth-gen.awk: Likewise.
11358 * opts.c (finish_options): Remove error checking of invalid
11359 value ranges.
11360 (MAX_CODE_ALIGN): Remove.
11361 (MAX_CODE_ALIGN_VALUE): Likewise.
11362 (parse_and_check_align_values): New function.
11363 (check_alignment_argument): Likewise.
11364 (common_handle_option): Use check_alignment_argument.
11365 * opts.h (parse_and_check_align_values): Declare.
11366 * toplev.c (init_alignments): Remove.
11367 (read_log_maxskip): New.
11368 (parse_N_M): Likewise.
11369 (parse_alignment_opts): Likewise.
11370 (backend_init_target): Remove usage of init_alignments.
11371 * toplev.h (parse_alignment_opts): Declare.
11372 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11373 argument.
11374 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11375 * tree.c (cl_option_hasher::equal): New.
11376 * varasm.c: Use new global macros.
11377
11378 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11379
11380 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11381 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11382 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11383 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11384 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11385 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11386 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11387 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11388 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11389 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11390 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11391 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11392 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11393
11394 2018-07-04 Martin Liska <mliska@suse.cz>
11395 Jonathan Wakely <jwakely@redhat.com>
11396
11397 * coverage.c: Use correct type.
11398 * doc/invoke.texi: Language correction.
11399
11400 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11401
11402 PR target/85620
11403 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11404 ENDBRANCH for non-tail call which may return via indirect branch.
11405 * doc/extend.texi: Document indirect_return attribute.
11406
11407 2018-07-03 Martin Sebor <msebor@redhat.com>
11408
11409 PR tree-optimization/86274
11410 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11411 precondition.
11412 (format_floating): Correct handling of infinities and NaNs.
11413
11414 2018-07-03 Martin Sebor <msebor@redhat.com>
11415
11416 * print-tree.c (print_real_cst): New function.
11417 (print_node_brief): Call it.
11418 (print_node): Ditto.
11419
11420 2018-07-03 Jeff Law <law@redhat.com>
11421
11422 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11423 into a single pattern.
11424
11425 * config/h8300/h8300.md (ors code_iterator): New.
11426 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11427 a single pattern and single splitter.
11428 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11429 (iorqi3_1, xorqi3_1): Likewise.
11430 (iorqi3, xorqi3 expanders): Similarly.
11431
11432 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11433 (movmd_internal) into a single pattern using the P mode iterator.
11434 (movmd splitters): Similarly.
11435 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11436 (movsd splitters): Similarly.
11437
11438 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11439 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11440 right table based on the size of the operand.
11441 * config/h8300/h8300.md (length_table): Corresponding changes. All
11442 references to "addb", "addw" and "addl" changed to "add".
11443 (btst patterns): Merge two variants into a single pattern.
11444 (tstqi, tsthi): Likewise.
11445 (addhi3_incdec, addsi3_incdec): Likewise.
11446 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11447 (mulhi3, mulsi3): Likewise.
11448 (udivhi3, udivsi3): Likewise.
11449 (divhi3, divsi3): Likewise.
11450 (andorqi3, andorhi3, andorsi3): Likewise.
11451
11452 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11453
11454 PR target/85694
11455 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11456 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11457
11458 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11459
11460 PR tree-optimization/85694
11461 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11462 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11463 UNSPEC_URHADD.
11464 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11465 (<u>avg<mode>3_ceil): New patterns.
11466
11467 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11468
11469 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11470 scan-tree-dump directive.
11471 * gcc.dg/vect/slp-perm-2.c: Likewise.
11472 * gcc.dg/vect/slp-perm-3.c: Likewise.
11473 * gcc.dg/vect/slp-perm-5.c: Likewise.
11474 * gcc.dg/vect/slp-perm-6.c: Likewise.
11475 * gcc.dg/vect/slp-perm-7.c: Likewise.
11476 * gcc.dg/vect/slp-perm-8.c: Likewise.
11477
11478 2018-07-03 Marek Polacek <polacek@redhat.com>
11479
11480 PR middle-end/86202
11481 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11482
11483 2018-07-03 Richard Biener <rguenther@suse.de>
11484
11485 PR ipa/86389
11486 * tree-ssa-structalias.c (find_func_clobbers): Properly
11487 handle indirect calls.
11488
11489 2018-07-03 Jeff Law <law@redhat.com>
11490
11491 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11492 (shifts): New code iterator.
11493 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11494 expander. Fix HImode handling on H8/SX.
11495 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11496 (subqi3, subhi3, subsi3 expanders): Likewise.
11497 (andqi3, andhi3, andsi3 expanders): Likewise.
11498 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11499 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11500 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11501 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11502 (zero_extendqihi2, zero_extendqisi2): Likewise.
11503 (extendqihi2, extendqisi2): Likewise.
11504 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11505 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11506 (rotlqi3_1, rotlhi3_1): Likewise.
11507 (logicalhi3_sn, logicalsi3_sn): Likewise.
11508 (logicalhi3, logicalsi3): Likewise.
11509
11510 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11511
11512 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11513 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11514 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11515 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11516 type to append_pattern_def_seq instead of creating a stmt_vec_info
11517 directly.
11518 (build_mask_conversion): Likewise. Remove vinfo argument.
11519 (vect_add_conversion_to_patterm): Likewise, renaming to...
11520 (vect_add_conversion_to_pattern): ...this.
11521 (vect_recog_mask_conversion_pattern): Update call to
11522 build_mask_conversion. Pass the vector type to
11523 append_pattern_def_seq here too.
11524 (vect_recog_gather_scatter_pattern): Update call to
11525 vect_add_conversion_to_pattern.
11526
11527 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11528
11529 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11530 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11531 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11532 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11533 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11534 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11535 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11536 append_pattern_def_seq instead of new_pattern_def_seq.
11537 (vect_recog_divmod_pattern): Do both of the above.
11538 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11539 is null.
11540
11541 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11542
11543 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11544 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11545 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11546 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11547 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11548 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11549 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11550 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11551 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11552 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11553 parameter with a single stmt_vec_info.
11554 (vect_recog_func_ptr): Likewise.
11555 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11556 (vect_try_gather_scatter_pattern): ...this.
11557 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11558 the stmt_vec_info of the statement to be matched. Don't clear
11559 STMT_VINFO_RELATED_STMT.
11560 (vect_pattern_recog): Update call accordingly.
11561
11562 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11563
11564 PR tree-optimization/85694
11565 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11566 (uavgM3_ceil): Document new optabs.
11567 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11568 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11569 functions.
11570 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11571 (savg_ceil_optab): New optabs.
11572 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11573 (vect_vect_recog_func_ptrs): Add it.
11574 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11575 constant directly from the associated lhs.
11576
11577 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11578
11579 * tree-vect-patterns.c (vect_split_statement): New function.
11580 (vect_convert_input): Use it to try to split an existing cast.
11581
11582 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11583
11584 * poly-int.h (print_hex): New function.
11585 * dumpfile.h (dump_dec, dump_hex): Declare.
11586 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11587 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11588 min_input_precision, operation_precision and operation_sign.
11589 * tree-vect-patterns.c (vect_get_range_info): New function.
11590 (vect_same_loop_or_bb_p, vect_single_imm_use)
11591 (vect_operation_fits_smaller_type): Delete.
11592 (vect_look_through_possible_promotion): Add an optional
11593 single_use_p parameter.
11594 (vect_recog_over_widening_pattern): Rewrite to use new
11595 stmt_vec_info infomration. Handle one operation at a time.
11596 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11597 (vect_truncatable_operation_p, vect_set_operation_type)
11598 (vect_set_min_input_precision): New functions.
11599 (vect_determine_min_output_precision_1): Likewise.
11600 (vect_determine_min_output_precision): Likewise.
11601 (vect_determine_precisions_from_range): Likewise.
11602 (vect_determine_precisions_from_users): Likewise.
11603 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11604 (vect_vect_recog_func_ptrs): Put over_widening first.
11605 Add cast_forwprop.
11606 (vect_pattern_recog): Call vect_determine_precisions.
11607
11608 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11609
11610 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11611 statements that have been replaced by further pattern statements.
11612 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11613
11614 2018-07-03 Richard Biener <rguenther@suse.de>
11615
11616 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11617 always set *dt. Dump vectype in vectype overload.
11618 * dumpfile.h (dump_gimple_expr): New function.
11619 (dump_gimple_expr_loc): Likewise.
11620 * dumpfile.c (dump_gimple_expr): New function.
11621 (dump_gimple_expr_loc): Likewise.
11622
11623 2018-07-02 Jeff Law <law@redhat.com>
11624
11625 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11626 the H8/300, H8/300H and H8/S variants into a single pattern.
11627 (movhi_h8300, movqi_h8300hs): Similarly.
11628 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11629 (QHI mode iterator): New.
11630
11631 * config/h8300/h8300.md: Remove trailing whitespace.
11632
11633 2018-07-02 Jim Wilson <jimw@sifive.com>
11634
11635 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11636 instead of emit_insn for interrupt returns.
11637 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11638 (riscv_sret, riscv_uret): Likewise.
11639
11640 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11641
11642 * pretty-print.c (selftest::test_pp_format): Move save and restore
11643 of quotes to class auto_fix_quotes, and add an instance.
11644 * selftest.c: Include "intl.h".
11645 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11646 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11647 * selftest.h (selftest::auto_fix_quotes): New class.
11648
11649 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11650
11651 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11652 (aarch64_sve_prepare_conditional_op): Remove.
11653 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11654 Allow aarch64_simd_reg_or_zero as select operand; remove
11655 the aarch64_sve_prepare_conditional_op call.
11656 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11657 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11658 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11659 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11660 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11661 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11662 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11663 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11664 and a splitters to match all of the *_any patterns.
11665 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11666
11667 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11668 (SVE_COND_FP_BINARY_REV): Remove.
11669 (sve_int_op_rev, sve_fp_op_rev): New.
11670 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11671 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11672 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11673 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11674 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11675 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11676 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11677 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11678 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11679
11680 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11681 Remove match_dup 1 from the inner unspec.
11682 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11683
11684 * config/aarch64/aarch64.md (movprfx): New attr.
11685 (length): Default movprfx to 8.
11686 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11687 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11688 (*<su>mul<SVE_I>3_highpart): Likewise.
11689 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11690 (*v<ASHIFT><SVE_I>3): Likewise.
11691 (*<su><MAXMIN><SVE_I>3): Likewise.
11692 (*<su><MAXMIN><SVE_F>3): Likewise.
11693 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11694 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11695 (*div<SVE_F>4): Likewise.
11696
11697 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11698
11699 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11700 in dump string.
11701
11702 2018-07-02 Richard Biener <rguenther@suse.de>
11703
11704 PR tree-optimization/86363
11705 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11706 memset argument refers to a non-variable address.
11707
11708 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11709
11710 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11711 {PLUS,MINUS}_EXPR code to...
11712 (adjust_symbolic_bound): ...here,
11713 (combine_bound): ...here,
11714 (set_value_range_with_overflow): ...and here.
11715
11716 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11717
11718 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11719 code...
11720 (extract_range_from_abs_expr): ...here.
11721
11722 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11723
11724 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11725 -fno-omit-frame-pointer when not optimizing.
11726
11727 2018-07-02 Martin Liska <mliska@suse.cz>
11728
11729 PR ipa/86279
11730 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11731 (propagate_nothrow): Likewise.
11732
11733 2018-07-02 Martin Liska <mliska@suse.cz>
11734
11735 PR ipa/86323
11736 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11737
11738 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11739
11740 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11741 function in r262149, changing "loc" param from source_location to
11742 const dump_location_t &.
11743 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11744 declaration, as above.
11745
11746 2018-07-01 Paul Koning <ni1d@arrl.net>
11747
11748 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11749 -munit-asm, -mgnu-asm, -mdec-asm.
11750 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11751 (pdp11_output_labelref): New.
11752 (pdp11_output_def): New.
11753 (pdp11_output_addr_vec_elt): New.
11754 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11755 %# and %@ format codes.
11756 (pdp11_option_override): New.
11757 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11758 (pdp11_output_ident): New.
11759 (pdp11_asm_named_section): New.
11760 (pdp11_asm_init_sections): New.
11761 (pdp11_file_start): New.
11762 (pdp11_file_end): New.
11763 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11764 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11765 %o, like %c but octal.
11766 (pdp11_option_override): New.
11767 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11768 -mdec-asm.
11769 (DATA_SECTION_ASM_OP): Ditto.
11770 (READONLY_DATA_SECTION_ASM_OP): New.
11771 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11772 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11773 (ASM_OUTPUT_LABELREF): Ditto.
11774 (ASM_OUTPUT_DEF): Ditto.
11775 (ASM_OUTPUT_EXTERNAL): New.
11776 (ASM_OUTPUT_SOURCE_FILENAME): New.
11777 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11778 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11779 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11780 %# and %@ format codes.
11781 * config/pdp11/pdp11.opt (mgnu-asm): New.
11782 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11783 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11784 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11785
11786 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11787
11788 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11789 dereferencing path[] beyond its length.
11790 (debug_path): New.
11791 (debug_all_paths): New.
11792 (rewire_first_differing_edge): New.
11793 (adjust_paths_after_duplication): New.
11794 (duplicate_thread_path): Call adjust_paths_after_duplication.
11795 Add new argument.
11796 (thread_through_all_blocks): Add new argument to
11797 duplicate_thread_path.
11798
11799 2018-06-30 Jim Wilson <jimw@sifive.com>
11800
11801 * config/riscv/predicates.md (p2m1_shift_operand): New.
11802 (high_mask_shift_operand): New.
11803 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11804 pattern using p2m1_shift_operand.
11805 (lshsi3_zero_extend_3+2): New combiner pattern using
11806 high_mask_shift_operand.
11807
11808 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11809
11810 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11811 split out from...
11812 (vect_recog_rotate_pattern): ...here.
11813 (vect_convert_input): Try to insert casts of invariants in the
11814 preheader.
11815 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11816 preheader to be empty.
11817
11818 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11819
11820 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11821 vector type. If given, install it in the new statement's
11822 STMT_VINFO_VECTYPE.
11823 (vect_element_precision): New function.
11824 (vect_unpromoted_value): New struct.
11825 (vect_unpromoted_value::vect_unpromoted_value): New function.
11826 (vect_unpromoted_value::set_op): Likewise.
11827 (vect_look_through_possible_promotion): Likewise.
11828 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11829 (vect_widened_op_tree, vect_convert_input): Likewise.
11830 (vect_convert_inputs, vect_convert_output): Likewise.
11831 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11832 to handle the optional cast of the multiplication result and
11833 vect_widened_op_tree to detect the widened multiplication itself.
11834 Do not require the input and output of promotion casts to have
11835 the same sign, but base the signedness of the operation on the
11836 input rather than the result. If the pattern includes two
11837 promotions, check that those promotions have the same sign.
11838 Do not restrict the MULT_EXPR handling to a double-width result;
11839 handle quadruple-width results and wider. Use vect_convert_inputs
11840 to convert the inputs to the common type.
11841 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11842 to handle the optional cast of the ABS result. Also allow a sign
11843 change or a sign extension between the ABS and MINUS.
11844 Use vect_widened_op_tree to detect the widened subtraction and use
11845 vect_convert_inputs to convert the inputs to the common type.
11846 (vect_handle_widen_op_by_const): Delete.
11847 (vect_recog_widen_op_pattern): New function.
11848 (vect_recog_widen_mult_pattern): Use it.
11849 (vect_recog_widen_shift_pattern): Likewise.
11850 (vect_recog_widen_sum_pattern): Use
11851 vect_look_through_possible_promotion to handle the promoted
11852 PLUS_EXPR operand.
11853
11854 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11855
11856 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11857 the containing gimple_seq *.
11858 * gimple-iterator.h (gsi_for_stmt): Declare it.
11859 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11860 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11861 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11862 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11863 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11864 checks.
11865 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11866 split out from...
11867 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11868 statement being replaced is part of an existing pattern
11869 definition sequence, inserting the new pattern statements before
11870 the original one.
11871 (vect_pattern_recog_1): Don't return a bool. If the statement
11872 is already part of a pattern, instead apply pattern matching
11873 to the pattern definition statements. Don't clear the
11874 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11875 (vect_pattern_recog): Don't break after the first match;
11876 continue processing the pattern definition statements instead.
11877 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11878
11879 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11880
11881 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11882 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11883 (vect_recog_widen_sum_pattern): Use it.
11884
11885 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11886
11887 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11888 phi is not a pattern statement and has not been replaced by
11889 a pattern statement.
11890 * tree-vect-patterns.c (type_conversion_p): Don't check
11891 STMT_VINFO_IN_PATTERN_P.
11892 (vect_recog_vector_vector_shift_pattern): Likewise.
11893 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11894 the pattern statement rather than the original statement; check
11895 directly for a WIDEN_MULT_EXPR here.
11896 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11897 vect_is_simple_use to return the pattern statement rather
11898 than the original statement; use is_pattern_stmt_p to check
11899 for such a pattern statement.
11900 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11901 to return the pattern statement rather than the original statement;
11902 don't do the same transformation here.
11903 (vect_is_simple_use): If the defining statement has been replaced
11904 by a pattern statement, return the pattern statement instead.
11905 Remove the corresponding (local) transformation from the vectype
11906 overload.
11907
11908 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11909
11910 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11911 end and default to null.
11912 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11913 (vectorizable_reduction): Update calls accordingly, dropping the
11914 gimple ** argument if the passed-back statement isn't needed.
11915 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11916 (vect_recog_rotate_pattern): Likewise.
11917 (vect_recog_mask_conversion_pattern): Likewise.
11918 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11919 (vect_mask_constant_operand_p): Likewise.
11920 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11921 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11922 (get_group_load_store_type, get_load_store_type): Likewise.
11923 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11924 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11925 (vectorizable_conversion, vectorizable_assignment): Likewise.
11926 (vectorizable_shift, vectorizable_operation): Likewise.
11927 (vectorizable_store, vect_is_simple_cond): Likewise.
11928 (vectorizable_condition, vectorizable_comparison): Likewise.
11929 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11930 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11931 and move it to the end. Cope with null def_stmt_outs.
11932
11933 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11934
11935 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11936
11937 2018-06-29 Jeff Law <law@redhat.com>
11938
11939 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11940 displacements for TARGET_V850E2V3 and newer.
11941 (TARGET_LRA_P): Remove. Defaults to LRA now.
11942 * config/v850/v850.md (sign23byte_load): Remove.
11943 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11944 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11945
11946 2018-06-29 Martin Liska <mliska@suse.cz>
11947
11948 PR lto/85759
11949 * coverage.c (coverage_init): Mangle full path name.
11950 * doc/invoke.texi: Document the change.
11951 * gcov-io.c (mangle_path): New.
11952 * gcov-io.h (mangle_path): Likewise.
11953 * gcov.c (mangle_name): Use mangle_path for path mangling.
11954
11955 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11956
11957 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11958 if starting source register is not even.
11959
11960 2018-06-29 Martin Liska <mliska@suse.cz>
11961
11962 PR tree-optimization/86263
11963 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11964 Make edge redirection.
11965
11966 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11967
11968 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11969 (dump_scope_depth): New variable.
11970 (get_dump_scope_depth): New function.
11971 (dump_begin_scope): New function.
11972 (dump_end_scope): New function.
11973 * dumpfile.h (get_dump_scope_depth): New declaration.
11974 (dump_begin_scope): New declaration.
11975 (dump_end_scope): New declaration.
11976 (class auto_dump_scope): New class.
11977 (AUTO_DUMP_SCOPE): New macro.
11978 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11979 AUTO_DUMP_SCOPE.
11980
11981 2018-06-29 Richard Biener <rguenther@suse.de>
11982
11983 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11984 compute_all_dependences succeeds.
11985 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11986 exceed --param loop-max-datarefs-for-datadeps.
11987
11988 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11989
11990 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11991
11992 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11993
11994 PR target/86348
11995 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11996 alternative 0 in preferred_for_speed attribute.
11997
11998 2018-06-28 Paul Koning <ni1d@arrl.net>
11999
12000 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
12001 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
12002 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
12003 * config/pdp11/pdp11.md: Correct "length" attribute calculation
12004 for shift insn patterns.
12005
12006 2018-06-28 David Malcolm <dmalcolm@redhat.com>
12007
12008 * cgraph.c (cgraph_node::get_body): Replace assignments to
12009 "dump_file" with calls to set_dump_file.
12010 * dumpfile.c (alt_dump_file): Make static, and group with...
12011 (alt_flags): ...this definition.
12012 (dumps_are_enabled): New variable.
12013 (refresh_dumps_are_enabled): New function.
12014 (set_dump_file): New function.
12015 (set_alt_dump_file): New function.
12016 (gcc::dump_manager::dump_start): Replace assignments to
12017 "dump_file" and "alt_dump_file" with calls to set_dump_file and
12018 set_alt_dump_file.
12019 (gcc::dump_manager::dump_finish): Likewise.
12020 * dumpfile.h (alt_dump_file): Delete decl.
12021 (dumps_are_enabled): New variable decl.
12022 (set_dump_file): New function decl.
12023 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
12024 global.
12025 * tree-nested.c (lower_nested_functions): Replace assignments to
12026 "dump_file" with calls to set_dump_file.
12027
12028 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12029
12030 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
12031 goto_locus of each outgoing edge of each basic block.
12032
12033 2018-06-28 Richard Biener <rguenther@suse.de>
12034
12035 * dwarf2out.c (decl_scope_table): Remove.
12036 (push_decl_scope): Likewise.
12037 (pop_decl_scope): Likewise.
12038 (gen_type_die_for_member): Do not call push/pop_decl_scope.
12039 (gen_struct_or_union_type_die): Likewise.
12040 (gen_tagged_type_die): Likewise.
12041 (dwarf2out_init): Do not initialize decl_scope_table.
12042 (dwarf2out_c_finalize): Do not free it.
12043
12044 2018-06-28 Richard Biener <rguenther@suse.de>
12045
12046 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
12047 deciding whether to not re-use a DIE.
12048
12049 2018-06-28 Richard Biener <rguenther@suse.de>
12050
12051 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
12052 DW_AT_abstract_origin attribute.
12053
12054 2018-06-28 Martin Liska <mliska@suse.cz>
12055
12056 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12057 Use newly introduced constants.
12058 * tree-switch-conversion.h (struct jump_table_cluster):
12059 Define max_ratio_for_size and max_ratio_for_speed.
12060
12061 2018-06-28 Martin Liska <mliska@suse.cz>
12062
12063 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12064 Add new checking assert to catch invalid state.
12065 (jump_table_cluster::can_be_handled): Handle single case
12066 clusters.
12067 (jump_table_cluster::is_beneficial): Bail out for such case.
12068 (bit_test_cluster::find_bit_tests):
12069 Add new checking assert to catch invalid state.
12070 (bit_test_cluster::can_be_handled): Handle single case
12071 clusters.
12072 (bit_test_cluster::is_beneficial): Bail out for such case.
12073 (switch_decision_tree::analyze_switch_statement):
12074 Fix comment.
12075
12076 2018-06-28 Martin Liska <mliska@suse.cz>
12077
12078 * common.opt: Introduce -completion option.
12079 * gcc.c (driver_handle_option): Handle it.
12080 (driver::main): Print completions if completion
12081 is set.
12082 * opt-suggestions.c (option_proposer::get_completions):
12083 New function.
12084 (option_proposer::suggest_completion): Likewise.
12085 (option_proposer::find_param_completions): Likewise.
12086 (verify_autocompletions): Likewise.
12087 (test_completion_valid_options): Likewise.
12088 (test_completion_valid_params): Likewise.
12089 (in_completion_p): Likewise.
12090 (empty_completion_p): Likewise.
12091 (test_completion_partial_match): Likewise.
12092 (test_completion_garbage): Likewise.
12093 (opt_proposer_c_tests): Likewise.
12094 * opt-suggestions.h: Declare new functions.
12095 * opts.c (common_handle_option): Handle OPT__completion_.
12096 * selftest-run-tests.c (selftest::run_tests): Add
12097 opt_proposer_c_tests.
12098 * selftest.c (assert_str_startswith): New.
12099 * selftest.h (assert_str_startswith): Likewise.
12100 (opt_proposer_c_tests): New.
12101 (ASSERT_STR_STARTSWITH): Likewise.
12102
12103 2018-06-28 Martin Liska <mliska@suse.cz>
12104
12105 * Makefile.in: Add opt-suggestions.o.
12106 * gcc-main.c: Include opt-suggestions.h.
12107 * gcc.c (driver::driver): Likewise.
12108 (driver::~driver): Remove m_option_suggestions.
12109 (driver::build_option_suggestions): Moved to option_proposer.
12110 (driver::suggest_option): Likewise.
12111 (driver::handle_unrecognized_options): Use option_proposer.
12112 * gcc.h (class driver): Add new memver m_option_proposer.
12113 * opt-suggestions.c: New file.
12114 * opt-suggestions.h: New file.
12115
12116 2018-06-28 Martin Liska <mliska@suse.cz>
12117
12118 * vec.h (class auto_string_vec): New (moved from auto_argvec).
12119 (auto_string_vec::~auto_string_vec): Likewise.
12120
12121 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12122
12123 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
12124 prevent_decl_creation_for_types fields up and add reset_location field.
12125 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
12126 statement if id->reset_location is true.
12127 (copy_edges_for_bb): Do not set goto_locus on the new edges if
12128 id->reset_location is true.
12129 (copy_phis_for_bb): Force input_location on the arguments if
12130 id->reset_location is true.
12131 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
12132 is set on the function to be inlined.
12133
12134 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
12135
12136 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
12137
12138 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
12139
12140 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
12141 registers for Pmode.
12142 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
12143 hard registers for the clobbered pseudo.
12144
12145 2018-06-27 Paul Koning <ni1d@arrl.net>
12146
12147 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12148 mutually exclusive options.
12149 * config/pdp11/constraints.md (h): New constraint.
12150 (O): Update definition to match shift code generation.
12151 (D): New constraint.
12152 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
12153 (CCFP): Remove.
12154 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
12155 function.
12156 (output_jump): Change arguments.
12157 (pdp11_fixed_cc_regs): New function.
12158 (pdp11_cc_mode): Ditto.
12159 (pdp11_expand_shift): Ditto.
12160 (pdp11_assemble_shift): Ditto.
12161 (pdp11_small_shift): Ditto.
12162 (pdp11_branch_cost): Remove.
12163 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
12164 from output.
12165 (pdp11_register_move_cost): Update for CC registers.
12166 (pdp11_rtx_costs): Add case for LSHIFTRT.
12167 (pdp11_output_jump): Add CCNZ mode conditional branches.
12168 (notice_update_cc_on_set): Remove.
12169 (pdp11_cc_mode): New function.
12170 (simple_memory_operand): Correct pre/post decrement case.
12171 (no_side_effect_operand): New function.
12172 (pdp11_regno_reg_class): Add CC_REGS class.
12173 (pdp11_fixed_cc_regs): New function.
12174 (pdp11_small_shift): New function.
12175 (pdp11_expand_shift): New function to expand shift insns.
12176 (pdp11_assemble_shift): New function to output shifts.
12177 (pdp11_branch_cost): Remove.
12178 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12179 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12180 (WCHAR_TYPE): Ditto.
12181 (PTRDIFF_TYPE): Ditto.
12182 (ADJUST_INSN_LENGTH): New macro.
12183 (FIXED_REGISTERS): Add CC registers.
12184 (CALL_USED_REGISTERS): Ditto.
12185 (reg_class): Ditto.
12186 (REG_CLASS_NAMES): Ditto.
12187 (REG_CLASS_CONTENTS): Ditto.
12188 (SELECT_CC_MODE): Use new function.
12189 (TARGET_FLAGS_REGNUM): New macro.
12190 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12191 (cc0_reg_rtx): Remove.
12192 (CC_STATUS_MDEP): Remove.
12193 (CC_STATUS_MDEFP_INIT): Remove.
12194 (CC_IN_FPU): Remove.
12195 (NOTICE_UPDATE_CC): Remove.
12196 (REGISTER_NAMES): Add CC registers.
12197 (BRANCH_COST): Change to constant 1.
12198 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12199 handling.
12200 * config/pdp11/pdp11.opt (mbcopy): Remove.
12201 (mbcopy-builtin): Remove.
12202 (mbranch-cheap): Remove.
12203 (mbranch-expensive): Remove.
12204 * config/pdp11/predicates.md (expand_shift_operand): Update to
12205 match shift code generation.
12206 (ccnz_operator): New predicate.
12207 * doc/invoke.texi (PDP-11 Options): Remove deleted options
12208 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12209 Remove non-existent option -mabshi, -mno-abshi. Document mutually
12210 exclusive options.
12211 * doc/md.texi (PDP-11): Document new D and h constraints. Update
12212 description of O constraint.
12213
12214 2018-06-27 Jeff Law <law@redhat.com>
12215 Austin Law <austinklaw@gmail.com>
12216
12217 * config/v850/v850.md (addsi3_set_flags): New pattern.
12218 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12219 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12220 (zero_extendhisi2_v850_set_flags): Likewise.
12221 (zero_extendqisi2_v850_set_flags): Likewise.
12222 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12223 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12224 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12225
12226 * config/v850/v850-protos.h (notice_update_cc): Remove.
12227 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12228 (v850_print_operand): Handle 'D' and "d".
12229 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12230 Add handling of arithmetic/logical operations compared against zero.
12231 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12232 Do not look at v850_compare_op, instead get mode from last argument.
12233 (v850_gen_compare): Remove
12234 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12235 after reload for prologue insns.
12236 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12237 patterns.
12238 (construct_save_jarl): Likewise.
12239 (TARGET_FLAGS_REGNUM): Define.
12240 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12241 (NOTICE_UPDATE_CC): Remove.
12242 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12243 than cc0. Conditionalize on reload_completed.
12244 (cmpsi_insn, setfcc_insn): Likewise.
12245 (tst1 splitter): Turn into define_and_split which sets the flags
12246 after reload.
12247 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12248 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12249 (cstoresf4, cstoredf4): Clobber the flags.
12250 (cmpsi, cmpsf, cmpdf): Remove expanders.
12251 (setf_insn): Remove pattern.
12252 (addsi3): Turn into define_and_split which clobbers the flags after
12253 reload and a suitable pattern (addsi3_clobber_flags) for use after
12254 reload.
12255 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12256 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12257 (ashrsi3, ashrsi3_v850e2): Likewise.
12258 (bins): Clobber the flags.
12259 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12260 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12261 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12262 (call_value_internal_short, call_value_internal_long): Likewise.
12263 (callt_save_interrupt, callt_return_interrupt): Likewise.
12264 (save_interrupt, return_interrupt): Likewise.
12265 (callt_save_all_interrupt, save_all_interrupt): Likewise.
12266 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12267 (restore_all_interrupt, _restore_all_interrupt): Likewise.
12268 (All FP comparisons): Only allow after reload has completed.
12269 (trfsr): Likewise.
12270 (divh, divhu): Tweak output template.
12271 (branch_z_normal, branch_z_invert): Remove
12272 (branch_nz_normal, branch_nz_invert): Likewise.
12273 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12274
12275 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12276 * config/v850/v850.c (notice_update_cc): Remove.
12277 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
12278 (CC_NO_CARRY): Likewise.
12279 (NOTICE_UPDATE_CC): Define to nothing.
12280 * config/v850/v850.md: Remove block comment on cc0 handling
12281 Remove "cc" attribute from all patterns. Remove cc_status handling
12282 from all patterns. Minor formatting fixes.
12283
12284 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12285
12286 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12287 (cortex-a76.cortex-a55): Likewise.
12288 * config/aarch64/aarch64-tune.md: Regenerate.
12289 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12290 cortex-a76.cortex-a55.
12291
12292 2018-06-27 Jeff Law <law@redhat.com>
12293
12294 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12295 (MULTILIB_DIRNAMES): Similarly.
12296
12297 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
12298
12299 * gimple.h (gimple_return_retbnd): Delete.
12300 (gimple_return_set_retbnd): Likewise.
12301 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12302 gimple_return_set_retbnd.
12303 * gimple-pretty-print.c (dump_gimple_return): Remove call to
12304 gimple_return_retbnd and adjust.
12305 * tree-inline.h (struct copy_body_data): Remove retbnd field.
12306 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12307 Explicitly return NULL in a couple more cases. Move assertion
12308 on debug statements and remove unreachable code.
12309 (reset_debug_binding): Do not test id->retbnd.
12310 (expand_call_inline): Do not set it.
12311
12312 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12313
12314 * configure.ac: Add --disable-gcov option.
12315 * configure: Regenerate.
12316 * Makefile.in: Honour @enable_gcov@.
12317 * doc/install.texi: Document --disable-gcov.
12318
12319 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12320
12321 * config/arm/arm-cpus.in (cortex-a76): New entry.
12322 (cortex-a76.cortex-a55): Likewise.
12323 * config/arm/arm-tables.opt: Regenerate.
12324 * config/arm/arm-tune.md: Likewise.
12325 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12326 * doc/invoke.texi (ARM Options): Document cortex-a76 and
12327 cortex-a76.cortex-a55.
12328
12329 2018-06-27 Tamar Christina <tamar.christina@arm.com>
12330
12331 PR target/85769
12332 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12333
12334 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
12335
12336 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12337 comment.
12338 (EPILOGUE_USES): Likewise.
12339
12340 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
12341
12342 * tree-inline.c (remap_location): New function extracted from...
12343 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
12344 (copy_phis_for_bb): ...here. Call remap_location.
12345 (copy_cfg_body): Adjust call to copy_edges_for_bb.
12346
12347 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
12348
12349 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12350 unaligned vsx for 16B memset.
12351
12352 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
12353
12354 PR target/86285
12355 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12356 ieee128_float_type_node to long_double_type_node unless
12357 TARGET_LONG_DOUBLE_128 is set.
12358
12359 2018-06-26 David Malcolm <dmalcolm@redhat.com>
12360
12361 * cfgloop.c (get_loop_location): Convert return type from
12362 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12363 by implicit construction from rtx_insn *, and using
12364 dump_user_location_t::from_function_decl for the fallback case.
12365 * cfgloop.h (get_loop_location): Convert return type from
12366 location_t to dump_user_location_t.
12367 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12368 dump_printf_loc to pass in a dump_location_t rather than a
12369 location_t, via the gimple stmt.
12370 * coverage.c (get_coverage_counts): Update calls to
12371 dump_printf_loc to pass in dump_location_t rather than a
12372 location_t.
12373 * doc/optinfo.texi (Dump types): Convert example of
12374 dump_printf_loc from taking "locus" to taking "insn". Update
12375 description of the "_loc" calls to cover dump_location_t.
12376 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12377 "selftest.h".
12378 (dump_user_location_t::dump_user_location_t): New constructors,
12379 from gimple *stmt and rtx_insn *.
12380 (dump_user_location_t::from_function_decl): New function.
12381 (dump_loc): Make static.
12382 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12383 const dump_location_t &.
12384 (dump_generic_expr_loc): Delete.
12385 (dump_printf_loc): Convert param "loc" from location_t to
12386 const dump_location_t &.
12387 (selftest::test_impl_location): New function.
12388 (selftest::dumpfile_c_tests): New function.
12389 * dumpfile.h: Include "profile-count.h".
12390 (class dump_user_location_t): New class.
12391 (struct dump_impl_location_t): New struct.
12392 (class dump_location_t): New class.
12393 (dump_printf_loc): Convert 2nd param from source_location to
12394 const dump_location_t &.
12395 (dump_generic_expr_loc): Delete.
12396 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12397 const dump_location_t &.
12398 * gimple-fold.c (fold_gimple_assign): Update call to
12399 dump_printf_loc to pass in a dump_location_t rather than a
12400 location_t, via the gimple stmt.
12401 (gimple_fold_call): Likewise.
12402 * gimple-loop-interchange.cc
12403 (loop_cand::analyze_iloop_reduction_var): Update for change to
12404 check_reduction_path.
12405 (tree_loop_interchange::interchange): Update for change to
12406 find_loop_location.
12407 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12408 change in return-type of find_loop_location.
12409 (graphite_regenerate_ast_isl): Likewise.
12410 * graphite-optimize-isl.c (optimize_isl): Likewise.
12411 * graphite.c (graphite_transform_loops): Likewise.
12412 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12413 pass in a dump_location_t rather than a location_t, via the
12414 gimple stmt.
12415 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12416 * ipa.c (walk_polymorphic_call_targets): Likewise.
12417 * loop-unroll.c (report_unroll): Convert "locus" param from
12418 location_t to dump_location_t.
12419 (decide_unrolling): Update for change to get_loop_location's
12420 return type.
12421 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12422 location_t to dump_user_location_t.
12423 (grid_find_single_omp_among_assignments_1): Updates calls to
12424 dump_printf_loc to pass in a dump_location_t rather than a
12425 location_t, via the gimple stmt.
12426 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12427 location_t to dump_location_t. Updates calls to dump_printf_loc
12428 to pass in a dump_location_t rather than a location_t, via the
12429 gimple stmt.
12430 (grid_inner_loop_gridifiable_p): Likewise.
12431 (grid_dist_follows_simple_pattern): Likewise.
12432 (grid_gfor_follows_tiling_pattern): Likewise.
12433 (grid_target_follows_gridifiable_pattern): Likewise.
12434 (grid_attempt_target_gridification): Convert initialization
12435 of local "grid" from memset to zero-initialization; FIXME: does
12436 this require C++11? Update call to dump_printf_loc to pass in a
12437 optinfo_location rather than a location_t, via the gimple stmt.
12438 * profile.c (read_profile_edge_counts): Updates call to
12439 dump_printf_loc to pass in a dump_location_t rather than a
12440 location_t
12441 (compute_branch_probabilities): Likewise.
12442 * selftest-run-tests.c (selftest::run_tests): Call
12443 dumpfile_c_tests.
12444 * selftest.h (dumpfile_c_tests): New decl.
12445 * tree-loop-distribution.c (pass_loop_distribution::execute):
12446 Update for change in return type of find_loop_location.
12447 * tree-parloops.c (parallelize_loops): Likewise.
12448 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12449 "locus" from location_t to dump_user_location_t.
12450 (canonicalize_loop_induction_variables): Likewise.
12451 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12452 for change in return type of find_loop_location.
12453 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12454 to dump_printf_loc to pass in a dump_location_t rather than a
12455 location_t, via the stmt.
12456 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12457 Likewise.
12458 * tree-vect-loop-manip.c (find_loop_location): Convert return
12459 type from source_location to dump_user_location_t.
12460 (vect_do_peeling): Update for above change.
12461 (vect_loop_versioning): Update for change in type of
12462 vect_location.
12463 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12464 from location_t to dump_user_location_t.
12465 (vect_estimate_min_profitable_iters): Update for change in type
12466 of vect_location.
12467 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12468 location_t to dump_location_t.
12469 (vect_slp_bb): Update for change in type of vect_location.
12470 * tree-vectorizer.c (vect_location): Convert from source_location
12471 to dump_user_location_t.
12472 (try_vectorize_loop_1): Update for change in vect_location's type.
12473 (vectorize_loops): Likewise.
12474 (increase_alignment): Likewise.
12475 * tree-vectorizer.h (vect_location): Convert from source_location
12476 to dump_user_location_t.
12477 (find_loop_location): Convert return type from source_location to
12478 dump_user_location_t.
12479 (check_reduction_path): Convert 1st param from location_t to
12480 dump_user_location_t.
12481 * value-prof.c (check_counter): Update call to dump_printf_loc to
12482 pass in a dump_user_location_t rather than a location_t; update
12483 call to error_at for change in type of "locus".
12484 (check_ic_target): Update call to dump_printf_loc to
12485 pass in a dump_user_location_t rather than a location_t, via the
12486 call_stmt.
12487
12488 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12489
12490 * config/s390/s390.h (enum processor_flags): Do not use
12491 default tune parameter when -march was specified.
12492
12493 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12494
12495 PR target/86314
12496 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12497 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12498 operands.
12499
12500 2018-06-26 Richard Biener <rguenther@suse.de>
12501
12502 PR tree-optimization/86287
12503 PR bootstrap/86316
12504 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12505 (vect_analyze_loop): Initialize n_stmts.
12506
12507 2018-06-26 Richard Biener <rguenther@suse.de>
12508
12509 PR middle-end/86271
12510 * fold-const.c (fold_convertible_p): Pointer extension
12511 isn't valid.
12512
12513 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12514
12515 PR debug/86064
12516 * dwarf2out.c (loc_list_has_views): Adjust comments.
12517 (dw_loc_list): Split single cross-partition range with
12518 nonzero locview.
12519
12520 2018-06-25 Jeff Law <law@redhat.com>
12521
12522 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12523 on -mbig-switch by default.
12524
12525 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12526 test.
12527 (const_float_0_operand): Remove unused predicate.
12528 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12529 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12530 (recipsf2): New expander. Original pattern now called
12531 (recipsf2_insn).
12532 (recipdf2, recipdf2_insn): Similarly.
12533 (rsqrtsf2, rsqrtsf2_insn): Similarly
12534 (rsqrtdf2, rsqrtdf2_insn): Similarly
12535
12536 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12537
12538 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12539 Simplify logic for FreeBSD (twice).
12540
12541 2018-06-25 Martin Sebor <msebor@redhat.com>
12542
12543 PR tree-optimization/86204
12544 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12545 a strnlen result if it's less than the length of the string.
12546
12547 2018-06-25 Martin Sebor <msebor@redhat.com>
12548
12549 PR tree-optimization/85700
12550 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12551 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12552 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12553
12554 2018-06-25 Martin Sebor <msebor@redhat.com>
12555
12556 * doc/extend.texi (Zero-length arrays): Update and clarify.
12557
12558 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12559
12560 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12561 added IEEE/IBM long double multilib support on PowerPC little
12562 endian Linux systems.
12563 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12564 (MULTILIB_DEFAULTS): Likewise.
12565 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12566 Likewise.
12567 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12568 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12569 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12570
12571 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12572
12573 PR middle-end/86311
12574 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12575 (REORDER_45): Likewise.
12576
12577 2018-06-25 Jeff Law <law@redhat.com>
12578
12579 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12580 dividend to 32 bits. Adjust length.
12581 (udivmodhi4): Cleanup output template. Fix length.
12582
12583 2018-06-25 Carl Love <cel@us.ibm.com>
12584
12585 * config/rs6000/vsx.md: Change word selector to prefered location.
12586
12587 2018-06-25 Richard Biener <rguenther@suse.de>
12588
12589 PR tree-optimization/86304
12590 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12591 epilogue-if-converted loops as well.
12592
12593 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12594
12595 * lto-section-out.c (lto_begin_section): Do not print section
12596 name for noaddr and unnumbered dumps.
12597
12598 2018-06-25 Richard Biener <rguenther@suse.de>
12599
12600 * tree-vectorizer.h (struct vec_info_shared): New structure
12601 with parts split out from struct vec_info and loop_nest from
12602 struct _loop_vec_info.
12603 (struct vec_info): Adjust accordingly.
12604 (struct _loop_vec_info): Likewise.
12605 (LOOP_VINFO_LOOP_NEST): Adjust.
12606 (LOOP_VINFO_DATAREFS): Likewise.
12607 (LOOP_VINFO_DDRS): Likewise.
12608 (struct _bb_vec_info): Likewise.
12609 (BB_VINFO_DATAREFS): Likewise.
12610 (BB_VINFO_DDRS): Likewise.
12611 (struct _stmt_vec_info): Add dr_aux member.
12612 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12613 (DR_MISALIGNMENT_UNINITIALIZED): New.
12614 (set_dr_misalignment): Adjust.
12615 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12616 (vect_analyze_loop): Adjust prototype.
12617 (vect_analyze_loop_form): Likewise.
12618 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12619 Compute dependences lazily.
12620 (vect_record_base_alignments): Use shared datarefs/ddrs.
12621 (vect_verify_datarefs_alignment): Likewise.
12622 (vect_analyze_data_refs_alignment): Likewise.
12623 (vect_analyze_data_ref_accesses): Likewise.
12624 (vect_analyze_data_refs): Likewise.
12625 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12626 constructor parameter for shared part.
12627 (vect_analyze_loop_form): Pass in shared part and adjust.
12628 (vect_analyze_loop_2): Pass in storage for the number of
12629 stmts. Move loop nest finding to the caller. Compute
12630 datarefs lazily.
12631 (vect_analyze_loop): Pass in shared part.
12632 (vect_transform_loop): Verify shared datarefs are unchanged.
12633 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12634 constructor parameter for shared part.
12635 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12636 (vect_slp_bb): Verify shared datarefs are unchanged before
12637 transform.
12638 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12639 change.
12640 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12641 DR_MISALIGNMENT_UNINITIALIZED.
12642 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12643 parameter for shared part.
12644 (vec_info::~vec_info): Adjust.
12645 (vec_info_shared::vec_info_shared): New.
12646 (vec_info_shared::~vec_info_shared): Likewise.
12647 (vec_info_shared::save_datarefs): Likewise.
12648 (vec_info_shared::check_datarefs): Likewise.
12649 (try_vectorize_loop_1): Construct shared part live for analyses
12650 of a single loop for multiple vector sizes.
12651 * tree-parloops.c (gather_scalar_reductions): Adjust.
12652
12653 2018-06-25 Richard Biener <rguenther@suse.de>
12654
12655 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12656 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12657 (vect_analyze_data_refs): Remove similar code from here and
12658 simplify accordingly.
12659
12660 2018-06-25 Richard Biener <rguenther@suse.de>
12661
12662 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12663 for reverse storage order accesses rather than asserting
12664 they cannot happen here.
12665
12666 2018-06-25 Tom de Vries <tdevries@suse.de>
12667
12668 PR debug/86257
12669 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12670 Use data16 instead of .byte for insn prefix.
12671
12672 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12673
12674 PR C++/86082
12675 * parser.c (make_char_string_pack): Pass this literal chars
12676 through cpp_interpret_string.
12677 (cp_parser_userdef_numeric_literal): Check the result of
12678 make_char_string_pack.
12679
12680 2018-06-24 Maya Rashish <coypu@sdf.org>
12681
12682 * ginclude/stddef.h: Simplify conditions around avoiding
12683 re-definition of __size_t.
12684
12685 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12686
12687 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12688 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12689
12690 2018-06-22 Maya Rashish <coypu@sdf.org>
12691
12692 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12693 made to OpenBSD and NetBSD through the years.
12694
12695 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12696
12697 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12698 behavior of vec_pack (vector double, vector double) to match
12699 behavior of vec_float2 (vector double, vector double).
12700
12701 2018-06-22 Olivier Hainque <hainque@adacore.com>
12702
12703 * gimplify.c (gimplify_function_tree): Prevent creation
12704 of a trampoline for the address of the current function
12705 passed to entry/exit instrumentation hooks.
12706
12707 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12708
12709 PR target/86222
12710 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12711 correctly.
12712
12713 2018-06-22 Martin Liska <mliska@suse.cz>
12714
12715 PR tree-optimization/86263
12716 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12717 Bail out if is_enabled is false.
12718 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12719 New declaration.
12720 (jump_table_cluster::is_enabled): New function.
12721
12722 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12723
12724 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12725 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12726 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12727 (lto_input_ts_binfo_tree_pointers): Likewise.
12728 * tree-streamer-out.c (streamer_write_tree_bitfields,
12729 write_ts_binfo_tree_pointers): Likewise.
12730 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12731
12732 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12733
12734 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12735
12736 2018-06-22 Martin Liska <mliska@suse.cz>
12737
12738 * symbol-summary.h (get): Make it pure and inline move
12739 functionality from ::get function.
12740 (get): Remove and inline into ::get and ::get_create.
12741 (get_create): Move code from ::get function.
12742
12743 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12744
12745 PR target/85994
12746 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12747 -x assembler-with-cpp.
12748
12749 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12750
12751 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12752 _FILE_OFFSET_BITS=64 for C++.
12753
12754 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12755
12756 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12757 conversion insn that shows up when pr85657-3.c is compiled using
12758 IEEE 128-bit long double.
12759 (neg<mode>2_internal): Use the correct mode to check whether the
12760 mode is IBM extended.
12761 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12762 multiply and divide external functions from being created more
12763 than once.
12764
12765 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12766
12767 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12768 functions.
12769 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12770 the edge can be forwarded.
12771 (cfg_layout_merge_blocks): Likewise.
12772
12773 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12774
12775 * except.c (finish_eh_generation): Commit edge insertions only after
12776 the EH edges have been redirected from post-landing to landing pads.
12777
12778 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12779
12780 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12781 create_tmp_var_for to create the FRAME decl.
12782 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12783
12784 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12785
12786 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12787 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12788 debug statement when resetting its value.
12789 (expand_call_inline): Copy the locus of the call onto the assignment
12790 of the return value, if any. Use local variable in more cases.
12791
12792 2018-06-21 Martin Liska <mliska@suse.cz>
12793
12794 * ipa-pure-const.c (propagate_nothrow): Use
12795 funct_state_summaries->get.
12796 (dump_malloc_lattice): Likewise.
12797 (propagate_malloc): Likewise.
12798
12799 2018-06-21 Richard Biener <rguenther@suse.de>
12800
12801 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12802 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12803 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12804 comment.
12805 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12806 BLOCK_ABSTRACT_ORIGIN unconditionally.
12807
12808 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12809
12810 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12811 deleting it.
12812 * ipa-reference.c (ipa_reference_c_finalize): Delete
12813 ipa_ref_opt_sum_summaries and set it to NULL.
12814
12815 2018-06-21 Tom de Vries <tdevries@suse.de>
12816
12817 PR tree-optimization/85859
12818 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12819 test with comment from bb_no_side_effects_p.
12820
12821 2018-06-21 Richard Biener <rguenther@suse.de>
12822
12823 PR tree-optimization/86232
12824 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12825 max for constant niter.
12826
12827 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12828
12829 * config/aarch64/aarch64-simd.md
12830 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12831
12832 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12833
12834 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12835 Make opernads of the unspec commutative.
12836
12837 2018-06-21 Richard Biener <rguenther@suse.de>
12838
12839 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12840 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12841 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12842 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12843 NULL DR_STEP.
12844 (vect_record_base_alignments): Do not record base alignment
12845 for gathers or scatters.
12846 (vect_compute_data_ref_alignment): Drop return value that is always
12847 true. Bail out early for gathers or scatters.
12848 (vect_enhance_data_refs_alignment): Bail out early for gathers
12849 or scatters.
12850 (vect_find_same_alignment_drs): Likewise.
12851 (vect_analyze_data_refs_alignment): Remove dead code.
12852 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12853 (vect_analyze_data_refs): For possible gathers or scatters do
12854 not create an alternate DR, just check their possible validity
12855 and mark them. Adjust DECL_NONALIASED handling to not rely
12856 on DR_BASE_ADDRESS.
12857 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12858 update inits of gathers or scatters.
12859 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12860 Also copy gather/scatter flag to pattern vinfo.
12861
12862 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12863
12864 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12865 behavior of vec_packsu (vector unsigned long long, vector unsigned
12866 long long) to match behavior of vec_packs with same signature.
12867
12868 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12869 Thomas Schwinge <thomas@codesourcery.com>
12870 Cesar Philippidis <cesar@codesourcery.com>
12871
12872 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12873 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12874 (gimplify_adjust_omp_clauses): Likewise.
12875 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12876 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12877 (gimplify_omp_target_update): Update handling of acc update and
12878 enter/exit data.
12879 * omp-low.c (install_var_field): Remove unused parameter
12880 base_pointers_restrict.
12881 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12882 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12883 FINALIZE}
12884 (omp_target_base_pointers_restrict_p): Delete.
12885 (scan_omp_target): Update call to scan_sharing_clauses.
12886 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12887 FINALIZE}.
12888 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12889 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12890 (convert_local_omp_clauses): Likewise.
12891 * tree-pretty-print.c (dump_omp_clause): Likewise.
12892 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12893 FINALIZE}.
12894 (omp_clause_code_name): Likewise.
12895
12896 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12897
12898 PR debug/86194
12899 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12900 be narrowed.
12901
12902 PR tree-optimization/86231
12903 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12904 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12905
12906 2018-06-20 Tom de Vries <tdevries@suse.de>
12907
12908 PR tree-optimization/86097
12909 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12910 iv type if signedness of iv type is not the same as that of *nit.
12911
12912 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12913
12914 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12915 EDGE_EH edges, verify they are all EDGE_EH.
12916
12917 2018-06-20 Maya Rashish <coypu@sdf.org>
12918
12919 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12920
12921 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12922
12923 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12924 * config/aarch64/aarch64.c (xgene1_tunings): Add
12925 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12926 (aarch64_mode_valid_for_sched_fusion_p):
12927 Allow 16-byte modes.
12928 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12929 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12930 128-bit modes.
12931 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12932 New pattern.
12933 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12934 * config/aarch64/iterators.md (VQ2): New mode iterator.
12935
12936 2018-06-20 Martin Liska <mliska@suse.cz>
12937
12938 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12939 Change default ratio from 10 to 8.
12940
12941 2018-06-20 Martin Liska <mliska@suse.cz>
12942
12943 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12944 New.
12945 (bit_test_cluster::find_bit_tests): Likewise.
12946 (switch_decision_tree::analyze_switch_statement): Find clusters.
12947 * tree-switch-conversion.h (struct jump_table_cluster): Document
12948 hierarchy.
12949
12950 2018-06-20 Martin Liska <mliska@suse.cz>
12951
12952 * tree-switch-conversion.c (switch_conversion::collect):
12953 Record m_uniq property.
12954 (switch_conversion::expand): Bail out for special conditions.
12955 (group_cluster::~group_cluster): New.
12956 (group_cluster::group_cluster): Likewise.
12957 (group_cluster::dump): Likewise.
12958 (jump_table_cluster::emit): New.
12959 (switch_decision_tree::fix_phi_operands_for_edges): New.
12960 (struct case_node): Remove struct.
12961 (jump_table_cluster::can_be_handled): New.
12962 (case_values_threshold): Moved to header.
12963 (reset_out_edges_aux): Likewise.
12964 (jump_table_cluster::is_beneficial): New.
12965 (bit_test_cluster::can_be_handled): Likewise.
12966 (add_case_node): Remove.
12967 (bit_test_cluster::is_beneficial): New.
12968 (case_bit_test::cmp): New.
12969 (bit_test_cluster::emit): New.
12970 (expand_switch_as_decision_tree_p): Remove.
12971 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12972 (fix_phi_operands_for_edge): Likewise.
12973 (switch_decision_tree::analyze_switch_statement): New.
12974 (compute_cases_per_edge): Move ...
12975 (switch_decision_tree::compute_cases_per_edge): ... here.
12976 (try_switch_expansion): Likewise.
12977 (switch_decision_tree::try_switch_expansion): Likewise.
12978 (record_phi_operand_mapping): Likewise.
12979 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12980 (emit_case_decision_tree): Likewise.
12981 (switch_decision_tree::emit): Likewise.
12982 (balance_case_nodes): Likewise.
12983 (switch_decision_tree::balance_case_nodes): Likewise.
12984 (dump_case_nodes): Likewise.
12985 (switch_decision_tree::dump_case_nodes): Likewise.
12986 (emit_jump): Likewise.
12987 (switch_decision_tree::emit_jump): Likewise.
12988 (emit_cmp_and_jump_insns): Likewise.
12989 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12990 (emit_case_nodes): Likewise.
12991 (switch_decision_tree::emit_case_nodes): Likewise.
12992 (conditional_probability): Remove.
12993 * tree-switch-conversion.h (enum cluster_type): New.
12994 (PRINT_CASE): New.
12995 (struct cluster): Likewise.
12996 (cluster::cluster): Likewise.
12997 (struct simple_cluster): Likewise.
12998 (simple_cluster::simple_cluster): Likewise.
12999 (struct group_cluster): Likewise.
13000 (struct jump_table_cluster): Likewise.
13001 (struct bit_test_cluster): Likewise.
13002 (struct min_cluster_item): Likewise.
13003 (struct case_tree_node): Likewise.
13004 (case_tree_node::case_tree_node): Likewise.
13005 (jump_table_cluster::case_values_threshold): Likewise.
13006 (struct case_bit_test): Likewise.
13007 (struct switch_decision_tree): Likewise.
13008 (struct switch_conversion): Likewise.
13009 (switch_decision_tree::reset_out_edges_aux): Likewise.
13010
13011 2018-06-20 Martin Liska <mliska@suse.cz>
13012
13013 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
13014 (hoist_edge_and_branch_if_true): Likewise.
13015 (expand_switch_using_bit_tests_p): Likewise.
13016 (struct case_bit_test): Likewise.
13017 (case_bit_test_cmp): Likewise.
13018 (emit_case_bit_tests): Likewise.
13019 (switch_conversion::switch_conversion): New class.
13020 (struct switch_conv_info): Remove old struct.
13021 (collect_switch_conv_info): More to ...
13022 (switch_conversion::collect): ... this.
13023 (check_range): Likewise.
13024 (switch_conversion::check_range): Likewise.
13025 (check_all_empty_except_final): Likewise.
13026 (switch_conversion::check_all_empty_except_final): Likewise.
13027 (check_final_bb): Likewise.
13028 (switch_conversion::check_final_bb): Likewise.
13029 (create_temp_arrays): Likewise.
13030 (switch_conversion::create_temp_arrays): Likewise.
13031 (free_temp_arrays): Likewise.
13032 (gather_default_values): Likewise.
13033 (switch_conversion::gather_default_values): Likewise.
13034 (build_constructors): Likewise.
13035 (switch_conversion::build_constructors): Likewise.
13036 (constructor_contains_same_values_p): Likewise.
13037 (switch_conversion::contains_same_values_p): Likewise.
13038 (array_value_type): Likewise.
13039 (switch_conversion::array_value_type): Likewise.
13040 (build_one_array): Likewise.
13041 (switch_conversion::build_one_array): Likewise.
13042 (build_arrays): Likewise.
13043 (switch_conversion::build_arrays): Likewise.
13044 (gen_def_assigns): Likewise.
13045 (switch_conversion::gen_def_assigns): Likewise.
13046 (prune_bbs): Likewise.
13047 (switch_conversion::prune_bbs): Likewise.
13048 (fix_phi_nodes): Likewise.
13049 (switch_conversion::fix_phi_nodes): Likewise.
13050 (gen_inbound_check): Likewise.
13051 (switch_conversion::gen_inbound_check): Likewise.
13052 (process_switch): Use the newly created class.
13053 (switch_conversion::expand): New.
13054 (switch_conversion::~switch_conversion): New.
13055 * tree-switch-conversion.h: New file.
13056
13057 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13058
13059 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
13060 tree-vect-patterns.c.
13061 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
13062 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
13063 (vect_recog_sad_pattern): Likewise.
13064 (vect_recog_widen_sum_pattern): Likewise.
13065 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
13066 (vect_recog_widen_shift_pattern): Remove the type_in argument.
13067 (vect_recog_rotate_pattern): Likewise.
13068 (vect_recog_mult_pattern): Likewise.
13069 (vect_recog_vector_vector_shift_pattern): Likewise.
13070 (vect_recog_divmod_pattern): Likewise.
13071 (vect_recog_mixed_size_cond_pattern): Likewise.
13072 (vect_recog_bool_pattern): Likewise.
13073 (vect_recog_mask_conversion_pattern): Likewise.
13074 (vect_try_gather_scatter_pattern): Likewise.
13075 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
13076 (vect_recog_over_widening_pattern): Likewise.
13077 (vect_recog_gather_scatter_pattern): Likewise.
13078 (vect_recog_func_ptr): Move from tree-vectorizer.h
13079 (vect_vect_recog_func_ptrs): Move further down the file.
13080 (vect_recog_func): Likewise. Remove the third argument.
13081 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
13082 (vect_pattern_recog_1): Expect the pattern function to do any
13083 necessary target tests. Also expect it to provide a vector type.
13084 Remove the type_in handling.
13085
13086 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13087
13088 * tree-vect-patterns.c (vect_pattern_detected): New function.
13089 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
13090 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
13091 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
13092 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
13093 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13094 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13095 (vect_recog_mask_conversion_pattern)
13096 (vect_try_gather_scatter_pattern): Likewise.
13097
13098 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13099
13100 * tree-vect-patterns.c (vect_get_internal_def): New function.
13101 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13102 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
13103 (search_type_for_mask_1): Use it.
13104
13105 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13106
13107 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13108 redundant WIDEN_SUM_EXPR handling.
13109 (vect_recog_sad_pattern): Likewise.
13110
13111 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13112
13113 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13114 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
13115 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
13116 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13117 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
13118
13119 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13120
13121 * tree-vect-stmts.c (vectorizable_call): Make sure that we
13122 use the stmt_vec_info of the original bb statement for the
13123 new zero assignment, even if the call is part of a pattern.
13124
13125 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13126
13127 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
13128 that the sequence is attached to the original statement rather
13129 than the pattern statement.
13130 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
13131 PATTERN_DEF_SEQ from the original statement rather than
13132 the main pattern statement.
13133 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
13134 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
13135 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
13136
13137 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13138
13139 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
13140 definition statements before the early exit for statements that aren't
13141 live or relevant.
13142 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
13143 split out from...
13144 (vect_transform_loop): ...here. Process pattern definition
13145 statements without first checking whether the main pattern
13146 statement is live or relevant.
13147
13148 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13149
13150 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
13151 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
13152
13153 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
13154
13155 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
13156 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
13157 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
13158 (expand_block_compare): Change select_block_compare_mode call.
13159 (expand_strncmp_align_check): Use new functions, fix comment.
13160 (emit_final_str_compare_gpr): New function.
13161 (expand_strn_compare): Refactor and clean up code.
13162 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
13163
13164 2018-06-19 Tony Reix <tony.reix@atos.com>
13165 Damien Bergamini <damien.bergamini@atos.com>
13166 David Edelsohn <dje.gcc@gmail.com>
13167
13168 * collect2.c (static_obj): New variable.
13169 (static_libs): New variable.
13170 (is_in_list): Uncomment declaration.
13171 (main): Track AIX libraries linked statically.
13172 (is_in_list): Uncomment definition.
13173 (scan_prog_file): Don't add AIX shared libraries initializer
13174 to constructor list if linking statically.
13175
13176 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
13177
13178 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13179 constant.
13180 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13181
13182 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
13183
13184 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13185 blocks.
13186
13187 2018-06-19 Martin Liska <mliska@suse.cz>
13188
13189 * config/i386/i386.c (ix86_can_inline_p): Do not use
13190 ipa_fn_summaries::get_create.
13191 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13192 get.
13193 (devirtualization_time_bonus): Likewise.
13194 (ipcp_propagate_stage): Likewise.
13195 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13196 (edge_set_predicate): Likewise.
13197 (evaluate_conditions_for_known_args): Likewise.
13198 (evaluate_properties_for_edge): Likewise.
13199 (ipa_call_summary::reset): Tranform to ...
13200 (ipa_call_summary::~ipa_call_summary): ... this.
13201 (ipa_fn_summary::reset): Transform to ...
13202 (ipa_fn_summary::~ipa_fn_summary): ... this.
13203 (ipa_fn_summary_t::remove): Rename to ...
13204 (ipa_fn_summary_t::remove_callees): ... this.
13205 (ipa_fn_summary_t::duplicate): Use placement new
13206 instead of memory copy.
13207 (ipa_call_summary_t::duplicate): Likewise.
13208 (ipa_call_summary_t::remove): Remove.
13209 (dump_ipa_call_summary): Change get_create to get.
13210 (ipa_dump_fn_summary): Dump only when summary exists.
13211 (analyze_function_body): Use symbol_summary::get instead
13212 of get_create.
13213 (compute_fn_summary): Likewise.
13214 (estimate_edge_devirt_benefit): Likewise.
13215 (estimate_edge_size_and_time): Likewise.
13216 (inline_update_callee_summaries): Likewise.
13217 (remap_edge_change_prob): Likewise.
13218 (remap_edge_summaries): Likewise.
13219 (ipa_merge_fn_summary_after_inlining): Likewise.
13220 (write_ipa_call_summary): Likewise.
13221 (ipa_fn_summary_write): Likewise.
13222 (ipa_free_fn_summary): Likewise.
13223 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13224 (struct ipa_call_summary): Likewise.
13225 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13226 of get_create.
13227 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13228 (estimate_size_after_inlining): Likewise.
13229 (estimate_growth): Likewise.
13230 (growth_likely_positive): Likewise.
13231 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13232 (inline_call): Likewise.
13233 * ipa-inline.c (caller_growth_limits): Likewise.
13234 (can_inline_edge_p): Likewise.
13235 (can_inline_edge_by_limits_p): Likewise.
13236 (compute_uninlined_call_time): Likewise.
13237 (compute_inlined_call_time): Likewise.
13238 (want_inline_small_function_p): Likewise.
13239 (edge_badness): Likewise.
13240 (update_caller_keys): Likewise.
13241 (update_callee_keys): Likewise.
13242 (inline_small_functions): Likewise.
13243 (inline_to_all_callers_1): Likewise.
13244 (dump_overall_stats): Likewise.
13245 (early_inline_small_functions): Likewise.
13246 (early_inliner): Likewise.
13247 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13248 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13249 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13250 * ipa-split.c (execute_split_functions): Likewise.
13251 * symbol-summary.h: Likewise.
13252 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13253
13254 2018-06-19 Richard Biener <rguenther@suse.de>
13255
13256 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13257 (vectorize_loops): ... here. Fix dbgcnt handling.
13258 (try_vectorize_loop): Wrap try_vectorize_loop_1.
13259
13260 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
13261
13262 PR target/86197
13263 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13264 ieee128 argument takes up only one (vector) register, not two (floating
13265 point) registers.
13266
13267 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13268
13269 * gimplify.c (gimplify_init_constructor): Really never clear for an
13270 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13271
13272 2018-06-19 Richard Biener <rguenther@suse.de>
13273
13274 PR tree-optimization/86179
13275 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13276 after failed recognition.
13277
13278 2018-06-18 Martin Sebor <msebor@redhat.com>
13279
13280 PR middle-end/85602
13281 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13282 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13283 Handle integer subtraction.
13284 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13285 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13286
13287 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13288
13289 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13290 param from rtx to rtx_insn *.
13291 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13292 param.
13293 (frv_ifcvt_modify_insn): Likwise.
13294 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13295 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
13296 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13297 as_a <rtx_insn *> cast to local "unprotected_region" once
13298 it's been established that it's not NULL or pc_rtx.
13299 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13300 param "sethi" from rtx to rtx_insn *.
13301 (nds32_group_float_insns): Likewise for param "insn".
13302 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13303 param.
13304 (vax_output_int_subtract): Likewise.
13305 * config/vax/vax.c (vax_output_int_add): Likewise for param
13306 "insn".
13307 (vax_output_int_subtract): Likewise.
13308 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13309 (emit_pattern_after): Likewise for param "after".
13310 (emit_insn_after): Likewise.
13311 (emit_jump_insn_after): Likewise.
13312 (emit_call_insn_after): Likewise.
13313 (emit_debug_insn_after): Likewise.
13314 (emit_pattern_before): Likewise for param "before".
13315 (emit_insn_before): Likewise.
13316 (emit_jump_insn_before): Likewise.
13317 * final.c (get_insn_template): Likewise for param "insn", removing
13318 a cast.
13319 * output.h (get_insn_template): Likewise for 2nd param.
13320 * rtl.h (emit_insn_before): Likewise.
13321 (emit_jump_insn_before): Likewise.
13322 (emit_debug_insn_before_noloc): Likewise.
13323 (emit_insn_after): Likewise.
13324 (emit_jump_insn_after): Likewise.
13325 (emit_call_insn_after): Likewise.
13326 (emit_debug_insn_after): Likewise.
13327 (set_insn_deleted): Likewise for param.
13328
13329 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
13330
13331 PR target/85358
13332 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13333 floating point modes, so that IFmode is numerically greater than
13334 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13335 to declare the ordering. This prevents IFmode from being
13336 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13337 machine. Include rs6000-modes.h to share the fractional values
13338 between genmodes* and the rest of the compiler.
13339 (IFmode): Likewise.
13340 (KFmode): Likewise.
13341 (TFmode): Likewise.
13342 * config/rs6000/rs6000-modes.h: New file.
13343 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13344 meaning of rs6000_long_double_size so that 126..128 selects an
13345 appropriate 128-bit floating point type.
13346 (rs6000_option_override_internal): Likewise.
13347 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13348 (TARGET_LONG_DOUBLE_128): Change the meaning of
13349 rs6000_long_double_size so that 126..128 selects an appropriate
13350 128-bit floating point type.
13351 (LONG_DOUBLE_TYPE_SIZE): Update comment.
13352 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13353 source and destination to match the standard usage.
13354 (truncifkf2): Likewise.
13355 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13356 ISA 2.07 to use an explicit clobber, instead of passing in a
13357 temporary.
13358 (copysign<mode>3_soft): Likewise.
13359
13360 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13361
13362 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13363 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13364 (vect_slp_analyze_instance_dependence): Likewise.
13365 (vect_enhance_data_refs_alignment): Likewise.
13366 (vect_analyze_data_refs_alignment): Likewise.
13367 (vect_slp_analyze_and_verify_instance_alignment
13368 (vect_analyze_data_ref_accesses): Likewise.
13369 (vect_prune_runtime_alias_test_list): Likewise.
13370 (vect_analyze_data_refs): Likewise.
13371 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13372 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13373 (vect_analyze_scalar_cycles_1): Likewise.
13374 (vect_get_loop_niters): Likewise.
13375 (vect_analyze_loop_form_1): Likewise.
13376 (vect_update_vf_for_slp): Likewise.
13377 (vect_analyze_loop_operations): Likewise.
13378 (vect_analyze_loop): Likewise.
13379 (vectorizable_induction): Likewise.
13380 (vect_transform_loop): Likewise.
13381 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13382 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13383 (vect_make_slp_decision): Likewise.
13384 (vect_detect_hybrid_slp): Likewise.
13385 (vect_slp_analyze_operations): Likewise.
13386 (vect_slp_bb): Likewise.
13387 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13388 (vectorizable_bswap): Likewise.
13389 (vectorizable_call): Likewise.
13390 (vectorizable_simd_clone_call): Likewise.
13391 (vectorizable_conversion): Likewise.
13392 (vectorizable_assignment): Likewise.
13393 (vectorizable_shift): Likewise.
13394 (vectorizable_operation): Likewise.
13395 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13396
13397 2018-06-18 Martin Sebor <msebor@redhat.com>
13398
13399 PR tree-optimization/81384
13400 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13401 * builtins.c (expand_builtin_strnlen): New function.
13402 (expand_builtin): Call it.
13403 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13404 * builtins.def (BUILT_IN_STRNLEN): New.
13405 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13406 Warn for bounds in excess of maximum object size.
13407 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13408 single-value ranges. Handle strnlen.
13409 (handle_builtin_strlen): Handle strnlen.
13410 (strlen_check_and_optimize_stmt): Same.
13411 * doc/extend.texi (Other Builtins): Document strnlen.
13412
13413 2018-06-18 Maya Rashish <coypu@sdf.org>
13414
13415 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13416 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13417 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13418
13419 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13420 here to ...
13421 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13422
13423 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13424
13425 * tree.c (escaped_string::escape): Replace cast to char * by
13426 const_cast<char *> (unescaped).
13427
13428 2018-06-18 Nick Clifton <nickc@redhat.com>
13429
13430 PR 84195
13431 * tree.c (escaped_string): New class. Converts an unescaped
13432 string into its escaped equivalent.
13433 (warn_deprecated_use): Use the new class to convert the
13434 deprecation message, if present.
13435 (test_escaped_strings): New self test.
13436 (test_c_tests): Add test_escaped_strings.
13437 * doc/extend.texi (deprecated): Add a note that the
13438 deprecation message is affected by the -fmessage-length
13439 option, and that control characters will be escaped.
13440 (#pragma GCC error): Document this pragma.
13441 (#pragma GCC warning): Likewise.
13442 * doc/invoke.texi (-fmessage-length): Document this option's
13443 effect on the #warning and #error preprocessor directives and
13444 the deprecated attribute.
13445
13446 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13447
13448 * tree.c (decl_value_expr_lookup): Revert latest change.
13449 (decl_value_expr_insert): Likewise.
13450
13451 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13452
13453 * gimplify.c (nonlocal_vlas): Delete.
13454 (nonlocal_vla_vars): Likewise.
13455 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13456 referenced VLAs.
13457 (gimplify_body): Do not create and destroy nonlocal_vlas.
13458 * tree-nested.c: Include diagnostic.h.
13459 (use_pointer_in_frame): Tweak.
13460 (lookup_field_for_decl): Add assertion and declare the transformation.
13461 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13462 internal error when the reference is in a wrong context. Do not
13463 create a debug decl by default.
13464 (note_nonlocal_block_vlas): Delete.
13465 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13466 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13467 create a debug decl by default.
13468 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13469 call is in a wrong context.
13470 (fixup_vla_decls): New function.
13471 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13472 debug variables were created.
13473 * tree.c (decl_value_expr_lookup): Add checking assertion.
13474 (decl_value_expr_insert): Likewise.
13475
13476 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13477
13478 PR middle-end/82479
13479 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13480 * tree-scalar-evolution.c (interpret_expr): Likewise.
13481 (expression_expensive_p): Likewise.
13482 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13483 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13484 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13485 (ssa_defined_by_minus_one_stmt_p): New.
13486
13487 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13488
13489 PR middle-end/64946
13490 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13491 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13492 * dojump.c (do_jump): Likewise.
13493 * expr.c (expand_expr_real_2): Check operand type's sign.
13494 * fold-const.c (const_unop): Handle ABSU_EXPR.
13495 (fold_abs_const): Likewise.
13496 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13497 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13498 (strip_sign_op_1): Likesise.
13499 * match.pd: Add new pattern to generate ABSU_EXPR.
13500 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13501 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13502 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13503 * tree-inline.c (estimate_operator_cost): Likewise.
13504 * tree-pretty-print.c (dump_generic_node): Likewise.
13505 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13506 * tree.def (ABSU_EXPR): New.
13507
13508 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13509
13510 PR middle-end/86095
13511 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13512 documented as preserved for backward compatibility only.
13513 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13514
13515 PR rtl-optimization/86108
13516 * bb-reorder.c (create_forwarder_block): Renamed to ...
13517 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13518 jump from new landing pad to the second part.
13519 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13520 Adjust callers.
13521
13522 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13523
13524 PR middle-end/85878
13525 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13526 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13527 Only call store_expr for halves if the mode is the same.
13528
13529 PR middle-end/86123
13530 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13531 Fix up comment formatting.
13532
13533 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13534
13535 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13536 (typed_splay_tree::closure,
13537 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13538 (typed_splay_tree::typed_splay_tree,
13539 typed_splay_tree::operator =): Declared private.
13540 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13541 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13542 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13543 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13544 typed_splay_tree::splay_tree_splay,
13545 typed_splay_tree::splay_tree_foreach_helper,
13546 typed_splay_tree::splay_tree_insert,
13547 typed_splay_tree::splay_tree_remove,
13548 typed_splay_tree::splay_tree_lookup,
13549 typed_splay_tree::splay_tree_predecessor,
13550 typed_splay_tree::splay_tree_successor,
13551 typed_splay_tree::splay_tree_min,
13552 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13553 (typed_splay_tree::root, typed_splay_tree::comp,
13554 typed_splay_tree::delete_key,
13555 typed_splay_tree::delete_value): New data members.
13556 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13557 typed_splay_tree::remove.
13558
13559 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13560
13561 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13562 -mginv and -mno-ginv to the assembler.
13563 * config/mips/mips.opt (-mcrc): New option.
13564 (-mginv): Likewise.
13565 * doc/invoke.text (-mcrc): Document.
13566 (-mginv): Likewise.
13567
13568 2018-06-15 Nick Clifton <nickc@redhat.com>
13569
13570 PR 84195
13571 * tree.c (escaped_string): New class. Converts an unescaped
13572 string into its escaped equivalent.
13573 (warn_deprecated_use): Use the new class to convert the
13574 deprecation message, if present.
13575 (test_escaped_strings): New self test.
13576 (test_c_tests): Add test_escaped_strings.
13577 * doc/extend.texi (deprecated): Add a note that the
13578 deprecation message is affected by the -fmessage-length
13579 option, and that control characters will be escaped.
13580 (#pragma GCC error): Document this pragma.
13581 (#pragma GCC warning): Likewise.
13582 * doc/invoke.texi (-fmessage-length): Document this option's
13583 effect on the #warning and #error preprocessor directives and
13584 the deprecated attribute.
13585
13586 2018-06-15 Richard Biener <rguenther@suse.de>
13587
13588 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13589 here, also noting vector size used.
13590 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13591 size used in MSG_OPTIMIZED_LOCATIONS dump.
13592 (pass_slp_vectorize::execute): Adjust.
13593
13594 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13595
13596 PR target/85968
13597 * config/arc/arc.c (arc_return_address_register): Fix
13598 if-condition.
13599
13600 2018-06-15 Richard Biener <rguenther@suse.de>
13601
13602 PR middle-end/86159
13603 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13604 leave useless conversion stripping to force_gimple_operand_gsi.
13605 (gimplify_build2): Likewise.
13606 (gimplify_build1): Likewise.
13607
13608 2018-06-15 Richard Biener <rguenther@suse.de>
13609
13610 PR middle-end/86076
13611 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13612 before adjusting their block.
13613
13614 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13615
13616 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13617 multilibs for *-*-rtems*.
13618 * config/riscv/t-rtems: New file.
13619
13620 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13621
13622 PR middle-end/86122
13623 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13624 unsigned_type_for returns NULL.
13625
13626 PR target/85945
13627 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13628 subregs of multi-word pseudos unless the float mode has word size.
13629
13630 2018-06-14 Richard Biener <rguenther@suse.de>
13631
13632 PR middle-end/86139
13633 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13634 duplicate and harmful type_hash_canon.
13635 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13636
13637 2018-06-14 Richard Biener <rguenther@suse.de>
13638
13639 PR ipa/86124
13640 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13641 NULL cgraph_node.
13642
13643 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13644
13645 * config/rtems.h (STDINT_LONG32): Define.
13646
13647 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13648 Prachi Godbole <prachi.godbole@imgtec.com>
13649
13650 * config/mips/mips-cpus.def: Define P6600.
13651 * config/mips/mips-tables.opt: Regenerate.
13652 * config/mips/mips.c (mips_ucbranch_type): New enum.
13653 (mips_rtx_cost_data): Add support for P6600.
13654 (mips_issue_rate): Likewise.
13655 (mips_multipass_dfa_lookahead): Likewise.
13656 (mips_avoid_hazard): Likewise.
13657 (mips_reorg_process_insns): Likewise.
13658 (mips_classify_branch_p6600): New function.
13659 * config/mips/mips.h (TUNE_P6600): New define.
13660 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13661 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13662 * config/mips/mips.md: Include p6600.md.
13663 (processor): Add p6600.
13664 * config/mips/p6600.md: New file.
13665 * doc/invoke.texi: Add p6600 to supported architectures.
13666
13667 2018-06-13 Martin Sebor <msebor@redhat.com>
13668
13669 PR tree-optimization/86114
13670 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13671 of integer types.
13672 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13673
13674 2018-06-13 Richard Biener <rguenther@suse.de>
13675
13676 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13677 Properly set vector type of the intermediate stmt.
13678 * tree-vect-stmts.c (vectorizable_operation): The destination
13679 var always has vectype_out type.
13680
13681 2018-06-13 Jeff Law <law@redhat.com>
13682
13683 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13684 integer 0 for argument to print_rtl_with_bb.
13685 (rl78_reorg): Likewise.
13686
13687 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13688
13689 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13690 from rtx to rtx_insn *.
13691 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13692 "label".
13693 (add_sched_insns_for_speculation): Likewise for local "target",
13694 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13695 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13696 from rtx_insn ** to rtx_code_label **.
13697 (reorg_emit_nops): Likewise.
13698 (c6x_reorg): Likewise for local "call_labels".
13699 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13700 rtx to rtx_insn *.
13701 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13702 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13703 the loops over LABEL_REFS.
13704 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13705 braf_label.
13706 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13707 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13708 (split_branches): Strengthen local "olabel" from rtx to
13709 rtx_insn *, adding a safe_as_a cast.
13710 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13711 to "rtx_insn *".
13712 (add_insn_after): Likewise for first two params.
13713 (add_insn_before): Likewise.
13714 (remove_insn): Likewise for param.
13715 (emit_pattern_before_noloc): Likewise for second and third params.
13716 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13717 (emit_call_insn_before_noloc): Likewise.
13718 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13719 to "rtx_insn *".
13720 (emit_barrier_before): Likewise.
13721 (emit_label_before): Strengthen "label" param from "rtx" to
13722 "rtx_code_label *". Strengthen "before" param from "rtx" to
13723 "rtx_insn *".
13724 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13725 "rtx_insn *".
13726 (emit_pattern_after_noloc): Likewise.
13727 (emit_insn_after_noloc): Likewise.
13728 (emit_jump_insn_after_noloc): Likewise.
13729 (emit_call_insn_after_noloc): Likewise.
13730 (emit_debug_insn_after_noloc): Likewise.
13731 (emit_barrier_after): Likewise.
13732 (emit_label_after): Likewise for both params.
13733 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13734 "loc" param from "int" to "location_t".
13735 (emit_insn_after_setloc): Likewise.
13736 (emit_jump_insn_after_setloc): Likewise.
13737 (emit_call_insn_after_setloc): Likewise.
13738 (emit_debug_insn_after_setloc): Likewise.
13739 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13740 "loc" param from "int" to "location_t".
13741 (emit_pattern_before): Convert NULL_RTX to NULL.
13742 (emit_insn_before_setloc): Convert "loc" param from "int" to
13743 "location_t".
13744 (emit_jump_insn_before_setloc): Likewise.
13745 (emit_call_insn_before_setloc): Likewise.
13746 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13747 rtx_insn *. Convert "loc" param from "int" to "location_t".
13748 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13749 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13750 Convert 3rd param from "int" to "location_t".
13751 (emit_barrier_before, emit_barrier_after, next_real_insn):
13752 Strengthen param from rtx to rtx_insn *.
13753 (emit_label_before): Strengthen 1st param from "rtx" to
13754 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13755 "rtx_insn *".
13756 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13757 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13758 Strengthen 2nd param from "rtx" to "rtx_insn *".
13759 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13760 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13761 Likewise. Convert 3rd param from "int" to "location_t".
13762 (emit_label_after): Strengthen 1st param from "rtx" to
13763 "rtx_code_label *".
13764 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13765 "rtx_insn *".
13766 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13767 from "rtx" to "rtx_insn *".
13768
13769 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13770
13771 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13772 bodies streamed in with -Q.
13773 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13774 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13775 * gimple-streamer-out.c: Include gimple-pretty-print.h
13776 (output_bb): Dump stmts streamed.
13777 * lto-section-out.c: Include print-tree.h
13778 (lto_begin_section): Dump sections created.
13779 (lto_output_decl_index): Dump decl encoded.
13780 * lto-streamer-out.c: Include print-tree.h
13781 (create_output_block): Dump output block created.
13782 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13783 (output_function): Dump function output.
13784 (output_constructor): Dump constructor streamed.
13785 (write_global_stream): Output indexes encoded.
13786 (produce_asm_for_decls): Dump streams encoded.
13787 * lto-streamer.c (streamer_dump_file): New global var.
13788 * lto-streamer.h (streamer_dump_file): Declare.
13789 * passes.c (ipa_write_summaries): Initialize streamer dump.
13790 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13791 in.
13792
13793 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13794
13795 PR target/86048
13796 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13797 offsets for register save directives. Emit a second batch of save
13798 directives, if need be, when the function accesses prior frames.
13799
13800 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13801
13802 * config/arc/fpu.md (fmasf4): Force operand to register.
13803 (fnmasf4): Likewise.
13804
13805 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13806
13807 * config/arc/arc-protos.h (arc_pad_return): Remove.
13808 * config/arc/arc.c (machine_function): Remove force_short_suffix
13809 and size_reason.
13810 (arc_print_operand): Adjust printing of '&'.
13811 (arc_verify_short): Remove conditional printing of short suffix.
13812 (arc_final_prescan_insn): Remove reference to size_reason.
13813 (pad_return): New function.
13814 (arc_reorg): Call pad_return.
13815 (arc_pad_return): Remove.
13816 (arc_init_machine_status): Remove reference to force_short_suffix.
13817 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13818 (attr length): When attribute iscompact is true force to 2
13819 regardless; in the case of maybe check if we want to force the
13820 instruction to have 4 bytes length.
13821 (nopv): Change it to generate 4 byte long nop as well.
13822 (blockage): New pattern.
13823 (simple_return): Remove call to arc_pad_return.
13824 (p_return_i): Likewise.
13825
13826 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13827
13828 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13829
13830 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13831
13832 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13833 ARC cores.
13834
13835 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13836
13837 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13838 for ARC700 and ARCv2.
13839
13840 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13841
13842 PR target/86076
13843 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13844 operands[2] instead of operands[1].
13845
13846
13847 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13848
13849 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13850 case, check whether the outer register overlaps an unallocatable
13851 register, not just whether it fits the required class.
13852
13853 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13854
13855 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13856 are poly_ints.
13857 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13858 (memrefs_conflict_p): Likewise.
13859 (init_alias_analysis): Likewise.
13860 * cfgexpand.c (expand_debug_expr): Likewise.
13861 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13862 * cse.c (fold_rtx): Likewise.
13863 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13864 * expr.c (emit_block_move_hints): Likewise.
13865 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13866 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13867 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13868 (emit_group_store): Likewise.
13869 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13870 to read the PRE/POST_MODIFY increment.
13871 * calls.c (store_one_arg): Use strip_offset.
13872 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13873 poly_int_rtx_p.
13874 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13875 by a VEC_SELECT.
13876 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13877 (simplify_binary_operation_1): Extend CONST_INT handling to
13878 poly_int_rtx_p.
13879 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13880 than a HOST_WIDE_INT.
13881 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13882 poly_int64.
13883 (adjust_mems, add_stores): Update accodingly.
13884 (vt_canonicalize_addr): Track polynomial offsets.
13885 (emit_note_insn_var_location): Likewise.
13886 (vt_add_function_parameter): Likewise.
13887 (vt_initialize): Likewise.
13888
13889 2018-06-12 Jeff Law <law@redhat.com>
13890
13891 * config.gcc (alpha*-*-freebsd*): Remove.
13892 * config/alpha/freebsd.h: Remove.
13893
13894 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13895
13896 PR other/69968
13897 * spellcheck-tree.c (levenshtein_distance): Rename to...
13898 (get_edit_distance): ...this, and update for underlying renaming.
13899 * spellcheck-tree.h (levenshtein_distance): Rename to...
13900 (get_edit_distance): ...this.
13901 * spellcheck.c (levenshtein_distance): Rename to...
13902 (get_edit_distance): ...this. Convert from Levenshtein distance
13903 to Damerau-Levenshtein distance by supporting transpositions of
13904 adjacent characters. Rename "v1" to "v_next" and "v0" to
13905 "v_one_ago".
13906 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13907 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13908 update for underlying renaming.
13909 (selftest::levenshtein_distance_unit_test): Rename to...
13910 (selftest::test_get_edit_distance_unit): ...this, and update for
13911 underlying renaming.
13912 (selftest::test_find_closest_string): Add example from PR 69968
13913 where transposition helps
13914 (selftest::test_metric_conditions): Update for renaming.
13915 (selftest::test_metric_conditions): Likewise.
13916 (selftest::spellcheck_c_tests): Likewise.
13917 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13918 (get_edit_distance): ...this.
13919 (best_match::consider): Update for renaming.
13920
13921 2018-06-12 Martin Sebor <msebor@redhat.com>
13922
13923 PR tree-optimization/85259
13924 * builtins.c (compute_objsize): Handle constant offsets.
13925 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13926 true iff a warning has been issued.
13927 * gimple.h (gimple_nonartificial_location): New function.
13928 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13929 gimple_nonartificial_location and handle -Wno-system-headers.
13930 (handle_builtin_stxncpy): Same.
13931
13932 2018-06-12 Martin Sebor <msebor@redhat.com>
13933
13934 PR c/85931
13935 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13936
13937 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13938
13939 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13940 BUILTIN_VEC_XST entries for pointer to double and long long.
13941
13942 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13943
13944 PR target/85990
13945 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13946 Update comments.
13947 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13948 Likewise.
13949
13950 2018-06-12 Martin Liska <mliska@suse.cz>
13951
13952 * doc/options.texi: Document IntegerRange.
13953
13954 2018-06-12 Martin Liska <mliska@suse.cz>
13955
13956 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13957 * opt-functions.awk: Handle Deprecated flag.
13958 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13959 and report error.
13960 (read_cmdline_option): Report warning for a deprecated option.
13961 * opts.h (struct cl_option): Add new field cl_deprecated.
13962 (CL_ERR_DEPRECATED): New.
13963
13964 2018-06-12 Martin Liska <mliska@suse.cz>
13965
13966 * doc/options.texi: Document Deprecated option flag.
13967
13968 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13969
13970 * config/arc/arc-arch.h (arc_extras): New enum.
13971 (arc_cpu_t):Add field extra.
13972 (arc_cpu_types): Consider the extras.
13973 * config/arc/arc-cpus.def: Add extras info.
13974 * config/arc/arc-opts.h (processor_type): Consider extra field.
13975 * config/arc/arc.c (arc_override_options): Handle extra field.
13976
13977 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13978
13979 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13980 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13981 field.
13982 * config/arc/arc.c (arc_init): Update pic warning.
13983 (irq_range): Update irq range parsing warnings.
13984 (arc_override_options): Update various warning messages.
13985 (arc_handle_aux_attribute): Likewise.
13986
13987 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13988
13989 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13990
13991 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13992
13993 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13994 compiler messages directives.
13995
13996 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13997
13998 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13999 * config/mips/mips-tables.opt: Regenerate.
14000 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
14001 mips64r6.
14002 * doc/invoke.texi: Document -march=i6500.
14003
14004 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
14005
14006 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
14007 (i6400_gpmul): Add cpu_unit.
14008 (i6400_gpdiv): Likewise.
14009 (i6400_msa_add_d): Update reservations.
14010 (i6400_msa_int_add) Likewise.
14011 (i6400_msa_short_logic3) Likewise.
14012 (i6400_msa_short_logic2) Likewise.
14013 (i6400_msa_short_logic) Likewise.
14014 (i6400_msa_move) Likewise.
14015 (i6400_msa_cmp) Likewise.
14016 (i6400_msa_short_float2) Likewise.
14017 (i6400_msa_div_d) Likewise.
14018 (i6400_msa_long_logic1) Likewise.
14019 (i6400_msa_long_logic2) Likewise.
14020 (i6400_msa_mult) Likewise.
14021 (i6400_msa_long_float2) Likewise.
14022 (i6400_msa_long_float4) Likewise.
14023 (i6400_msa_long_float5) Likewise.
14024 (i6400_msa_long_float8) Likewise.
14025 (i6400_fpu_fadd): Include frint type.
14026 (i6400_fpu_store): New define_insn_reservation.
14027 (i6400_fpu_load): Likewise.
14028 (i6400_fpu_move): Likewise.
14029 (i6400_fpu_fcmp): Likewise.
14030 (i6400_fpu_fmadd): Likewise.
14031 (i6400_int_mult): Include imul3nc type and update reservation.
14032 (i6400_int_div): Include idiv3 type and update reservation.
14033 (i6400_int_load): Update to check type not move_type.
14034 (i6400_int_store): Likewise.
14035 (i6400_int_prefetch): Set zero latency.
14036
14037 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
14038
14039 * gcc.c: Document new %@{...} sequence.
14040 (LINK_COMMAND_SPEC): Use it for the -L switches.
14041 (cpp_unique_options): Use it for the -I switches.
14042 (at_file_argbuf): New global variable.
14043 (in_at_file): Likewise.
14044 (alloc_args): Create at_file_argbuf.
14045 (clear_args): Truncate at_file_argbuf.
14046 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
14047 (open_at_file): New function.
14048 (close_at_file): Likewise.
14049 (create_at_file): Delete.
14050 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
14051 <'o'>: Likewise.
14052 <'@'>: New case.
14053 (validate_switches_from_spec): Deal with %@{...} sequence.
14054 (validate_switches): Likewise.
14055 (driver::finalize): Call clear_args.
14056
14057 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
14058
14059 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
14060
14061 2018-06-11 Martin Sebor <msebor@redhat.com>
14062
14063 * doc/invoke.texi (-Wall): List -Wc++17-compat.
14064 (Wno-class-memaccess): Add @opindex.
14065 (Wno-templates, Wno-multiple-inheritance): Same.
14066 (Wno-virtual-inheritance, Wno-namespaces): Same.
14067 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
14068 (Wno-format-overflow, Wno-format-truncation): Same.
14069 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
14070 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
14071 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
14072 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
14073 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
14074 (Wno-misspelled-isr): Same.
14075
14076 2018-06-11 Martin Sebor <msebor@redhat.com>
14077
14078 * PR tree-optimization/86083
14079 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
14080
14081 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
14082
14083 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
14084
14085 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
14086
14087 PR target/85755
14088 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
14089 on the correct operand.
14090 (*movdi_internal64): Ditto.
14091
14092 2018-06-11 Martin Liska <mliska@suse.cz>
14093
14094 PR tree-optimization/86089
14095 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
14096
14097 2018-06-11 Julia Koval <julia.koval@intel.com>
14098
14099 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
14100 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
14101 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
14102
14103 2018-06-11 Olivier Hainque <hainque@adacore.com>
14104
14105 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
14106 for Ada with strict dwarf2.
14107
14108 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
14109
14110 PR target/85755
14111 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
14112 addresses.
14113
14114 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
14115
14116 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
14117
14118 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
14119
14120 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
14121 TARGET_ELF.
14122
14123 2018-06-08 Martin Liska <mliska@suse.cz>
14124
14125 * tree-cfg.h (debug_function): Fix argument type to match
14126 implementation.
14127
14128 2018-06-08 Martin Liska <mliska@suse.cz>
14129
14130 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
14131 Remove usage of MPX-related (and removed) fields.
14132 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
14133
14134 2018-06-08 David Malcolm <dmalcolm@redhat.com>
14135
14136 * cfg.c (debug): Use TDF_NONE rather than 0.
14137 * cfghooks.c (debug): Likewise.
14138 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
14139 (struct dump_option_value_info): Convert to...
14140 (struct kv_pair): ...this template type.
14141 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
14142 rather than 0.
14143 (optinfo_verbosity_options): Likewise.
14144 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
14145 OPTGROUP_NONE.
14146 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
14147 than int for "optgroup_flags" param.
14148 (dump_generic_expr_loc): Use dump_flags_t rather than int for
14149 "dump_kind" param.
14150 (dump_dec): Likewise.
14151 (dump_finish): Use TDF_NONE rather than 0.
14152 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
14153 rather than int for "optgroup_flags" param. Use TDF_NONE rather
14154 than 0. Update for change to option_ptr.
14155 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
14156 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
14157 0. Update for changes to optinfo_verbosity_options and
14158 optgroup_options.
14159 (opt_info_switch_p): Convert optgroup_flags from int to
14160 optgroup_flags_t.
14161 (dump_basic_block): Use dump_flags_t rather than int
14162 for "dump_kind" param.
14163 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
14164 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
14165 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
14166 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14167 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14168 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14169 TDF_NONE): Convert from macros to...
14170 (enum dump_flag): ...this new enum.
14171 (dump_flags_t): Update to use enum.
14172 (operator|, operator&, operator~, operator|=, operator&=):
14173 Implement for dump_flags_t.
14174 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14175 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14176 Convert from macros to...
14177 (enum optgroup_flag): ...this new enum.
14178 (optgroup_flags_t): New typedef.
14179 (operator|, operator|=): Implement for optgroup_flags_t.
14180 (struct dump_file_info): Convert field "alt_flags" to
14181 dump_flags_t. Convert field "optgroup_flags" to
14182 optgroup_flags_t.
14183 (dump_basic_block): Use dump_flags_t rather than int for param.
14184 (dump_generic_expr_loc): Likewise.
14185 (dump_dec): Likewise.
14186 (dump_register): Convert param "optgroup_flags" to
14187 optgroup_flags_t.
14188 (opt_info_enable_passes): Likewise.
14189 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14190 than 0.
14191 * gimple-pretty-print.c (debug): Likewise.
14192 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14193 (merged_store_group::apply_stores): Likewise.
14194 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14195 * gimple.c (verify_gimple_pp): Likewise.
14196 * graphite-poly.c (print_pbb_body): Likewise.
14197 * passes.c (pass_manager::register_one_dump_file): Convert
14198 local "optgroup_flags" to optgroup_flags_t.
14199 * print-tree.c (print_node): Use TDF_NONE rather than 0.
14200 (debug): Likewise.
14201 (debug_body): Likewise.
14202 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14203 to optgroup_flags_t.
14204 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14205 than 0.
14206 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14207 (convert_mult_to_fma): Likewise.
14208 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14209 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14210 * tree-vect-data-refs.c (dump_lower_bound): Convert param
14211 "dump_kind" to dump_flags_t.
14212
14213 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14214
14215 * config/rs6000/rs6000.c (min, max): Delete.
14216
14217 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14218
14219 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14220 -mabi=spe and -mabi=no-spe.
14221
14222 2018-06-08 Martin Liska <mliska@suse.cz>
14223
14224 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14225 where we expect an existing summary.
14226
14227 2018-06-08 Martin Liska <mliska@suse.cz>
14228
14229 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14230 * ipa-inline.h (estimate_edge_growth): Likewise.
14231
14232 2018-06-08 Martin Liska <mliska@suse.cz>
14233
14234 * cgraph.c (function_version_hasher::hash): Use
14235 cgraph_node::get_uid ().
14236 (function_version_hasher::equal):
14237 * cgraph.h (cgraph_node::get_uid): New method.
14238 * ipa-inline.c (update_caller_keys): Use
14239 cgraph_node::get_uid ().
14240 (update_callee_keys): Likewise.
14241 * ipa-utils.c (searchc): Likewise.
14242 (ipa_reduced_postorder): Likewise.
14243 * lto-cgraph.c (input_node): Likewise.
14244 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14245 * symbol-summary.h (symtab_insertion): Likewise.
14246 (symtab_removal): Likewise.
14247 (symtab_duplication): Likewise.
14248 * tree-pretty-print.c (dump_function_header): Likewise.
14249 * tree-sra.c (convert_callers_for_node): Likewise.
14250
14251 2018-06-08 Martin Liska <mliska@suse.cz>
14252
14253 * cgraph.c (symbol_table::create_edge): Always assign a new
14254 unique number.
14255 (symbol_table::free_edge): Do not recycle numbers.
14256 * cgraph.h (cgraph_edge::get): New method.
14257 * symbol-summary.h (symtab_removal): Use it.
14258 (symtab_duplication): Likewise.
14259 (call_summary::hashable_uid): Remove.
14260
14261 2018-06-08 Martin Liska <mliska@suse.cz>
14262
14263 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14264 (initialize_growth_caches): Remove.
14265 (free_growth_caches): Likewise.
14266 (do_estimate_edge_time): Use edge_growth_cache.
14267 (do_estimate_edge_size): Likewise.
14268 (do_estimate_edge_hints): Likewise.
14269 * ipa-inline.c (reset_edge_caches): Likewise.
14270 (recursive_inlining): Likewise.
14271 (inline_small_functions): Likewise.
14272 * ipa-inline.h (initialize_growth_caches): Remove.
14273 (estimate_edge_size): Likewise.
14274 (estimate_edge_time): Likewise.
14275 (estimate_edge_hints): Likewise.
14276 (reset_edge_growth_cache): Likewise.
14277 * symbol-summary.h (call_summary::remove): New method.
14278
14279 2018-06-08 Martin Liska <mliska@suse.cz>
14280
14281 * ipa-cp.c (class edge_clone_summary): New summary.
14282 (grow_edge_clone_vectors): Remove.
14283 (ipcp_edge_duplication_hook): Remove.
14284 (class edge_clone_summary_t): New call_summary class.
14285 (ipcp_edge_removal_hook): Remove.
14286 (edge_clone_summary_t::duplicate): New function.
14287 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14288 (create_specialized_node): Likewise.
14289 (ipcp_driver): Initialize edge_clone_summaries and do not
14290 register hooks.
14291
14292 2018-06-08 Martin Liska <mliska@suse.cz>
14293
14294 * symbol-summary.h (get): New function.
14295 (call_summary::m_initialize_when_cloning): New class member.
14296
14297 2018-06-08 Martin Liska <mliska@suse.cz>
14298
14299 * cgraph.c (cgraph_node::remove): Do not recycle uid.
14300 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14301 (symbol_table::allocate_cgraph_symbol): Do not set uid.
14302 * passes.c (uid_hash_t): Record removed_nodes by their uids.
14303 (remove_cgraph_node_from_order): Use the removed_nodes set.
14304 (do_per_function_toporder): Likwise.
14305 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14306 instead of summary_uid.
14307 (symtab_removal): Likewise.
14308 (symtab_duplication): Likewise.
14309
14310 2018-06-08 Martin Liska <mliska@suse.cz>
14311
14312 * ipa-cp.c (ipcp_store_bits_results): Use
14313 ipcp_transformation_sum.
14314 (ipcp_store_vr_results): Likewise.
14315 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14316 to ...
14317 (ipcp_transformation_initialize): ... this.
14318 (ipa_set_node_agg_value_chain):
14319 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14320 (write_ipcp_transformation_info): Likewise.
14321 (read_ipcp_transformation_info): Likewise.
14322 (ipcp_update_bits): Likewise.
14323 (ipcp_update_vr): Likewise.
14324 (ipcp_transform_function): Likewise.
14325 * ipa-prop.h: Rename ipcp_transformation_summary to
14326 ipcp_transformation.
14327 (class ipcp_transformation_t): New function summary.
14328 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14329 (ipa_get_agg_replacements_for_node): Likewise.
14330
14331 2018-06-08 Martin Liska <mliska@suse.cz>
14332
14333 * ipa-pure-const.c (struct funct_state_d): Do it class instead
14334 of struct.
14335 (class funct_state_summary_t): New function_summary class.
14336 (has_function_state): Remove.
14337 (get_function_state): Likewise.
14338 (set_function_state): Likewise.
14339 (add_new_function): Likewise.
14340 (funct_state_summary_t::insert): New function.
14341 (duplicate_node_data): Remove.
14342 (remove_node_data): Remove.
14343 (funct_state_summary_t::duplicate): New function.
14344 (register_hooks): Create new funct_state_summaries.
14345 (pure_const_generate_summary): Use it.
14346 (pure_const_write_summary): Likewise.
14347 (pure_const_read_summary): Likewise.
14348 (propagate_pure_const): Likewise.
14349 (propagate_nothrow): Likewise.
14350 (dump_malloc_lattice): Likewise.
14351 (propagate_malloc): Likewise.
14352 (execute): Do not register hooks, just remove summary
14353 instead.
14354 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14355 constructor.
14356
14357 2018-06-08 Martin Liska <mliska@suse.cz>
14358
14359 * ipa-reference.c (remove_node_data): Remove.
14360 (duplicate_node_data): Likewise.
14361 (class ipa_ref_var_info_summary_t): New class.
14362 (class ipa_ref_opt_summary_t): Likewise.
14363 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14364 (get_reference_optimization_summary): Use
14365 ipa_ref_opt_sum_summaries.
14366 (set_reference_vars_info): Remove.
14367 (set_reference_optimization_summary): Likewise.
14368 (ipa_init): Create summaries.
14369 (init_function_info): Use function summary.
14370 (ipa_ref_opt_summary_t::duplicate): New function.
14371 (ipa_ref_opt_summary_t::remove): New function.
14372 (get_read_write_all_from_node): Fix GNU coding style.
14373 (propagate): Use function summary.
14374 (write_node_summary_p): Fix GNU coding style.
14375 (stream_out_bitmap): Likewise.
14376 (ipa_reference_read_optimization_summary): Use function summary.
14377 (ipa_reference_c_finalize): Do not release hooks.
14378
14379 2018-06-08 Martin Liska <mliska@suse.cz>
14380
14381 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14382 (analyze_function_body): Extract multiple calls of get_create.
14383 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14384 * ipa-inline.c (recursive_inlining): Use ::get method.
14385 * ipa-inline.h (estimate_edge_growth): Likewise.
14386
14387 2018-06-08 Martin Liska <mliska@suse.cz>
14388
14389 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14390 HSA_INVALID.
14391 (hsa_function_summary::hsa_function_summary): Use the new enum
14392 value.
14393 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14394 * hsa-gen.c (hsa_get_host_function): Likewise.
14395 (get_brig_function_name): Likewise.
14396 * ipa-hsa.c (process_hsa_functions): Likewise.
14397 (ipa_hsa_write_summary): Likewise.
14398 * symbol-summary.h (symtab_duplication): Use ::get function/
14399 (get): New function.
14400
14401 2018-06-08 Martin Liska <mliska@suse.cz>
14402
14403 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14404 of get.
14405 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14406 (hsa_register_kernel): Likewise.
14407 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14408 * hsa-gen.c (hsa_get_host_function): Likewise.
14409 (get_brig_function_name): Likewise.
14410 (generate_hsa): Likewise.
14411 (pass_gen_hsail::execute): Likewise.
14412 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14413 (devirtualization_time_bonus): Likewise.
14414 (ipcp_propagate_stage): Likewise.
14415 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14416 (edge_set_predicate): Likewise.
14417 (evaluate_conditions_for_known_args): Likewise.
14418 (evaluate_properties_for_edge): Likewise.
14419 (ipa_fn_summary::reset): Likewise.
14420 (ipa_fn_summary_t::duplicate): Likewise.
14421 (dump_ipa_call_summary): Likewise.
14422 (ipa_dump_fn_summary): Likewise.
14423 (analyze_function_body): Likewise.
14424 (compute_fn_summary): Likewise.
14425 (estimate_edge_devirt_benefit): Likewise.
14426 (estimate_edge_size_and_time): Likewise.
14427 (estimate_calls_size_and_time): Likewise.
14428 (estimate_node_size_and_time): Likewise.
14429 (inline_update_callee_summaries): Likewise.
14430 (remap_edge_change_prob): Likewise.
14431 (remap_edge_summaries): Likewise.
14432 (ipa_merge_fn_summary_after_inlining): Likewise.
14433 (ipa_update_overall_fn_summary): Likewise.
14434 (read_ipa_call_summary): Likewise.
14435 (inline_read_section): Likewise.
14436 (write_ipa_call_summary): Likewise.
14437 (ipa_fn_summary_write): Likewise.
14438 (ipa_free_fn_summary): Likewise.
14439 * ipa-hsa.c (process_hsa_functions): Likewise.
14440 (ipa_hsa_write_summary): Likewise.
14441 (ipa_hsa_read_section): Likewise.
14442 * ipa-icf.c (sem_function::merge): Likewise.
14443 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14444 (do_estimate_edge_time): Likewise.
14445 (estimate_size_after_inlining): Likewise.
14446 (estimate_growth): Likewise.
14447 (growth_likely_positive): Likewise.
14448 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14449 (inline_call): Likewise.
14450 * ipa-inline.c (caller_growth_limits): Likewise.
14451 (can_inline_edge_p): Likewise.
14452 (can_inline_edge_by_limits_p): Likewise.
14453 (compute_uninlined_call_time): Likewise.
14454 (compute_inlined_call_time): Likewise.
14455 (want_inline_small_function_p): Likewise.
14456 (edge_badness): Likewise.
14457 (update_caller_keys): Likewise.
14458 (update_callee_keys): Likewise.
14459 (recursive_inlining): Likewise.
14460 (inline_small_functions): Likewise.
14461 (inline_to_all_callers_1): Likewise.
14462 (dump_overall_stats): Likewise.
14463 (early_inline_small_functions): Likewise.
14464 (early_inliner): Likewise.
14465 * ipa-inline.h (estimate_edge_growth): Likewise.
14466 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14467 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14468 * ipa-prop.h (IPA_NODE_REF): Likewise.
14469 (IPA_EDGE_REF): Likewise.
14470 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14471 (propagate_malloc): Likewise.
14472 * ipa-split.c (execute_split_functions): Likewise.
14473 * symbol-summary.h: Rename get to get_create.
14474 (get): Likewise.
14475 (get_create): Likewise.
14476 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14477
14478 2018-06-08 Martin Liska <mliska@suse.cz>
14479
14480 * symbol-summary.h (release): Move definition out of class
14481 declaration.
14482 (symtab_removal): Likewise.
14483 (symtab_duplication): Likewise.
14484
14485 2018-06-08 Martin Liska <mliska@suse.cz>
14486
14487 * symbol-summary.h (function_summary): Move constructor
14488 implementation out of class declaration.
14489 (release): Likewise.
14490 (symtab_insertion): Likewise.
14491 (symtab_removal): Likewise.
14492 (symtab_duplication): Likewise.
14493 (get): Likewise.
14494
14495 2018-06-08 Martin Liska <mliska@suse.cz>
14496
14497 * Makefile.in: Remove support for MPX (macros, related functions,
14498 fields in cgraph_node, ...).
14499 * builtin-types.def (BT_BND): Likewise.
14500 (BT_FN_BND_CONST_PTR): Likewise.
14501 (BT_FN_CONST_PTR_BND): Likewise.
14502 (BT_FN_VOID_PTR_BND): Likewise.
14503 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14504 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14505 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14506 (expand_builtin_mempcpy_with_bounds): Likewise.
14507 (expand_builtin_memset_with_bounds): Likewise.
14508 (expand_builtin_memset_args): Likewise.
14509 (std_expand_builtin_va_start): Likewise.
14510 (expand_builtin): Likewise.
14511 (expand_builtin_with_bounds): Likewise.
14512 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14513 (DEF_LIB_BUILTIN_CHKP): Likewise.
14514 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14515 (DEF_CHKP_BUILTIN): Likewise.
14516 (BUILT_IN_MEMCPY): Likewise.
14517 (BUILT_IN_MEMMOVE): Likewise.
14518 (BUILT_IN_MEMPCPY): Likewise.
14519 (BUILT_IN_MEMSET): Likewise.
14520 (BUILT_IN_STPCPY): Likewise.
14521 (BUILT_IN_STRCAT): Likewise.
14522 (BUILT_IN_STRCHR): Likewise.
14523 (BUILT_IN_STRCPY): Likewise.
14524 (BUILT_IN_STRLEN): Likewise.
14525 (BUILT_IN_MEMCPY_CHK): Likewise.
14526 (BUILT_IN_MEMMOVE_CHK): Likewise.
14527 (BUILT_IN_MEMPCPY_CHK): Likewise.
14528 (BUILT_IN_MEMSET_CHK): Likewise.
14529 (BUILT_IN_STPCPY_CHK): Likewise.
14530 (BUILT_IN_STRCAT_CHK): Likewise.
14531 (BUILT_IN_STRCPY_CHK): Likewise.
14532 * calls.c (store_bounds): Likewise.
14533 (emit_call_1): Likewise.
14534 (special_function_p): Likewise.
14535 (maybe_warn_nonstring_arg): Likewise.
14536 (initialize_argument_information): Likewise.
14537 (finalize_must_preallocate): Likewise.
14538 (compute_argument_addresses): Likewise.
14539 (expand_call): Likewise.
14540 * cfgexpand.c (expand_call_stmt): Likewise.
14541 (expand_return): Likewise.
14542 (expand_gimple_stmt_1): Likewise.
14543 (pass_expand::execute): Likewise.
14544 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14545 (cgraph_node::remove): Likewise.
14546 (cgraph_node::dump): Likewise.
14547 (cgraph_node::verify_node): Likewise.
14548 * cgraph.h (chkp_function_instrumented_p): Likewise.
14549 (symtab_node::get_alias_target): Likewise.
14550 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14551 (cgraph_local_p): Likewise.
14552 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14553 (cgraph_edge::rebuild_references): Likewise.
14554 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14555 (walk_polymorphic_call_targets): Likewise.
14556 (cgraph_node::expand_thunk): Likewise.
14557 (symbol_table::output_weakrefs): Likewise.
14558 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14559 (ix86_handle_option): Likewise.
14560 * config/i386/constraints.md: Likewise.
14561 * config/i386/i386-builtin-types.def (BND): Likewise.
14562 (VOID): Likewise.
14563 (PVOID): Likewise.
14564 (ULONG): Likewise.
14565 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14566 (BDESC_FIRST): Likewise.
14567 (BDESC): Likewise.
14568 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14569 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14570 * config/i386/i386.c (enum reg_class): Likewise.
14571 (ix86_target_string): Likewise.
14572 (ix86_option_override_internal): Likewise.
14573 (ix86_conditional_register_usage): Likewise.
14574 (ix86_valid_target_attribute_inner_p): Likewise.
14575 (ix86_set_indirect_branch_type): Likewise.
14576 (ix86_set_current_function): Likewise.
14577 (ix86_function_arg_regno_p): Likewise.
14578 (init_cumulative_args): Likewise.
14579 (ix86_function_arg_advance): Likewise.
14580 (ix86_function_arg): Likewise.
14581 (ix86_pass_by_reference): Likewise.
14582 (ix86_function_value_regno_p): Likewise.
14583 (ix86_function_value_1): Likewise.
14584 (ix86_function_value_bounds): Likewise.
14585 (ix86_return_in_memory): Likewise.
14586 (ix86_setup_incoming_vararg_bounds): Likewise.
14587 (ix86_va_start): Likewise.
14588 (indirect_thunk_need_prefix): Likewise.
14589 (print_reg): Likewise.
14590 (ix86_print_operand): Likewise.
14591 (ix86_expand_call): Likewise.
14592 (ix86_output_function_return): Likewise.
14593 (reg_encoded_number): Likewise.
14594 (BDESC_VERIFYS): Likewise.
14595 (ix86_init_mpx_builtins): Likewise.
14596 (ix86_init_builtins): Likewise.
14597 (ix86_emit_cmove): Likewise.
14598 (ix86_emit_move_max): Likewise.
14599 (ix86_expand_builtin): Likewise.
14600 (ix86_builtin_mpx_function): Likewise.
14601 (ix86_get_arg_address_for_bt): Likewise.
14602 (ix86_load_bounds): Likewise.
14603 (ix86_store_bounds): Likewise.
14604 (ix86_load_returned_bounds): Likewise.
14605 (ix86_store_returned_bounds): Likewise.
14606 (ix86_class_likely_spilled_p): Likewise.
14607 (ix86_hard_regno_mode_ok): Likewise.
14608 (x86_order_regs_for_local_alloc): Likewise.
14609 (ix86_mitigate_rop): Likewise.
14610 (ix86_bnd_prefixed_insn_p): Likewise.
14611 (ix86_mpx_bound_mode): Likewise.
14612 (ix86_make_bounds_constant): Likewise.
14613 (ix86_initialize_bounds): Likewise.
14614 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14615 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14616 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14617 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14618 (TARGET_CHKP_BOUND_MODE): Likewise.
14619 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14620 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14621 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14622 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14623 * config/i386/i386.h (TARGET_MPX): Likewise.
14624 (TARGET_MPX_P): Likewise.
14625 (VALID_BND_REG_MODE): Likewise.
14626 (FIRST_BND_REG): Likewise.
14627 (LAST_BND_REG): Likewise.
14628 (enum reg_class): Likewise.
14629 (BND_REG_P): Likewise.
14630 (BND_REGNO_P): Likewise.
14631 (BNDmode): Likewise.
14632 (ADJUST_INSN_LENGTH): Likewise.
14633 * config/i386/i386.md: Likewise.
14634 * config/i386/i386.opt: Likewise.
14635 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14636 (defined): Likewise.
14637 (LINK_MPX): Likewise.
14638 (MPX_SPEC): Likewise.
14639 (LIBMPX_SPEC): Likewise.
14640 (LIBMPXWRAPPERS_SPEC): Likewise.
14641 (CHKP_SPEC): Likewise.
14642 * config/i386/predicates.md: Likewise.
14643 * dbxout.c (dbxout_type): Likewise.
14644 * doc/extend.texi: Likewise.
14645 * doc/invoke.texi: Likewise.
14646 * doc/md.texi: Likewise.
14647 * doc/tm.texi: Likewise.
14648 * doc/tm.texi.in: Likewise.
14649 * dwarf2out.c (is_base_type): Likewise.
14650 (gen_formal_types_die): Likewise.
14651 (gen_subprogram_die): Likewise.
14652 (gen_type_die_with_usage): Likewise.
14653 (gen_decl_die): Likewise.
14654 (dwarf2out_late_global_decl): Likewise.
14655 * expr.c (expand_assignment): Likewise.
14656 (emit_storent_insn): Likewise.
14657 (store_expr_with_bounds): Likewise.
14658 (store_expr): Likewise.
14659 (expand_expr_real_1): Likewise.
14660 * expr.h (store_expr_with_bounds): Likewise.
14661 * function.c (use_register_for_decl): Likewise.
14662 (struct bounds_parm_data): Likewise.
14663 (assign_parms_augmented_arg_list): Likewise.
14664 (assign_parm_find_entry_rtl): Likewise.
14665 (assign_parm_is_stack_parm): Likewise.
14666 (assign_parm_load_bounds): Likewise.
14667 (assign_bounds): Likewise.
14668 (assign_parms): Likewise.
14669 (expand_function_start): Likewise.
14670 * gcc.c (CHKP_SPEC): Likewise.
14671 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14672 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14673 (wrestrict_dom_walker::check_call): Likewise.
14674 * gimple.c (gimple_build_call_from_tree): Likewise.
14675 * gimple.h (enum gf_mask): Likewise.
14676 (gimple_call_with_bounds_p): Likewise.
14677 (gimple_call_set_with_bounds): Likewise.
14678 * gimplify.c (gimplify_init_constructor): Likewise.
14679 * ipa-cp.c (initialize_node_lattices): Likewise.
14680 (propagate_constants_across_call): Likewise.
14681 (find_more_scalar_values_for_callers_subset): Likewise.
14682 * ipa-hsa.c (process_hsa_functions): Likewise.
14683 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14684 * ipa-icf.c (sem_function::merge): Likewise.
14685 * ipa-inline.c (early_inliner): Likewise.
14686 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14687 (warn_function_cold): Likewise.
14688 (propagate_pure_const): Likewise.
14689 * ipa-ref.h (enum GTY): Likewise.
14690 * ipa-split.c (find_retbnd): Likewise.
14691 (consider_split): Likewise.
14692 (split_function): Likewise.
14693 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14694 * ipa.c (walk_polymorphic_call_targets): Likewise.
14695 (symbol_table::remove_unreachable_nodes): Likewise.
14696 (process_references): Likewise.
14697 (cgraph_build_static_cdtor_1): Likewise.
14698 * lto-cgraph.c (lto_output_node): Likewise.
14699 (output_refs): Likewise.
14700 (compute_ltrans_boundary): Likewise.
14701 (input_overwrite_node): Likewise.
14702 (input_node): Likewise.
14703 (input_cgraph_1): Likewise.
14704 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14705 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14706 (class pass_chkp_instrumentation_passes): Likewise.
14707 (make_pass_chkp_instrumentation_passes): Likewise.
14708 * passes.def: Likewise.
14709 * rtl.h (struct GTY): Likewise.
14710 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14711 * stor-layout.c (layout_type): Likewise.
14712 * symtab.c: Likewise.
14713 * target.def: Likewise.
14714 * targhooks.c (default_chkp_bound_type): Likewise.
14715 (default_chkp_bound_mode): Likewise.
14716 (default_builtin_chkp_function): Likewise.
14717 (default_chkp_function_value_bounds): Likewise.
14718 (default_chkp_make_bounds_constant): Likewise.
14719 (default_chkp_initialize_bounds): Likewise.
14720 * targhooks.h (default_chkp_bound_type): Likewise.
14721 (default_chkp_bound_mode): Likewise.
14722 (default_builtin_chkp_function): Likewise.
14723 (default_chkp_function_value_bounds): Likewise.
14724 (default_chkp_make_bounds_constant): Likewise.
14725 (default_chkp_initialize_bounds): Likewise.
14726 * toplev.c (compile_file): Likewise.
14727 (process_options): Likewise.
14728 * tree-core.h (DEF_BUILTIN): Likewise.
14729 (DEF_BUILTIN_CHKP): Likewise.
14730 * tree-inline.c (declare_return_variable): Likewise.
14731 (remap_gimple_stmt): Likewise.
14732 (copy_bb): Likewise.
14733 (initialize_inlined_parameters): Likewise.
14734 (expand_call_inline): Likewise.
14735 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14736 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14737 (make_pass_ipa_chkp_produce_thunks): Likewise.
14738 (make_pass_chkp): Likewise.
14739 (make_pass_chkp_opt): Likewise.
14740 (make_pass_chkp_instrumentation_passes): Likewise.
14741 * tree-pretty-print.c (dump_generic_node): Likewise.
14742 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14743 * tree-ssa-dce.c (propagate_necessity): Likewise.
14744 (eliminate_unnecessary_stmts): Likewise.
14745 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14746 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14747 * tree-ssa-sccvn.h: Likewise.
14748 * tree-ssa-strlen.c (get_string_length): Likewise.
14749 (valid_builtin_call): Likewise.
14750 (adjust_last_stmt): Likewise.
14751 (handle_builtin_strchr): Likewise.
14752 (handle_builtin_strcpy): Likewise.
14753 (handle_builtin_stxncpy): Likewise.
14754 (handle_builtin_memcpy): Likewise.
14755 (handle_builtin_strcat): Likewise.
14756 (strlen_check_and_optimize_stmt): Likewise.
14757 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14758 * tree-streamer-in.c: Likewise.
14759 * tree-streamer.c (record_common_node): Likewise.
14760 * tree.c (tree_code_size): Likewise.
14761 (wide_int_to_tree_1): Likewise.
14762 (type_contains_placeholder_1): Likewise.
14763 (build_common_tree_nodes): Likewise.
14764 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14765 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14766 (POINTER_BOUNDS_P): Likewise.
14767 (BOUNDED_TYPE_P): Likewise.
14768 (BOUNDED_P): Likewise.
14769 (CALL_WITH_BOUNDS_P): Likewise.
14770 (pointer_bounds_type_node): Likewise.
14771 * value-prof.c (gimple_ic): Likewise.
14772 * var-tracking.c (vt_add_function_parameters): Likewise.
14773 * varasm.c (make_decl_rtl): Likewise.
14774 (assemble_start_function): Likewise.
14775 (output_constant): Likewise.
14776 (maybe_assemble_visibility): Likewise.
14777 * varpool.c (ctor_for_folding): Likewise.
14778 * chkp-builtins.def: Remove.
14779 * ipa-chkp.c: Remove.
14780 * ipa-chkp.h: Remove.
14781 * rtl-chkp.c: Remove.
14782 * rtl-chkp.h: Remove.
14783 * tree-chkp-opt.c: Remove.
14784 * tree-chkp.c: Remove.
14785 * tree-chkp.h: Remove.
14786
14787 2018-06-07 Carl Love <cel@us.ibm.com>
14788
14789 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14790 vextract_fp_from_shortl): Add BE support.
14791
14792 2018-06-07 Paul Koning <ni1d@arrl.net>
14793
14794 * compare-elim.c (try_merge_compare): Don't merge compare if
14795 address contains a side effect.
14796 (try_eliminate_compare): Likewise.
14797
14798 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14799
14800 * config.gcc: Support "tremont".
14801 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14802 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14803 PROCESSOR_TREMONT.
14804 * config/i386/i386.c (m_TREMONT): Define.
14805 (processor_target_table): Add "tremont".
14806 (PTA_TREMONT): Define.
14807 (ix86_lea_outperforms): Add TARGET_TREMONT.
14808 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14809 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14810 and M_INTEL_GOLDMONT_PLUS.
14811 (fold_builtin_cpu): Add "tremont".
14812 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14813 (ix86_option_override_internal): Add "tremont".
14814 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14815 (processor_type): Add PROCESSOR_TREMONT.
14816 * config/i386/x86-tune.def: Add m_TREMONT.
14817 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14818
14819 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14820
14821 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14822 symbol defined for msp430i* devices to be lower case.
14823
14824 2018-06-07 Richard Biener <rguenther@suse.de>
14825
14826 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14827 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14828 Properly wrap signed arithmetic if overflow wraps.
14829
14830 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14831
14832 PR tree-optimization/69615
14833 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14834 of a cast from a same precision integral SSA_NAME in a bb dominated
14835 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14836 cast to utype if rhs2 has already a compatible type.
14837
14838 2018-06-07 Richard Biener <rguenther@suse.de>
14839
14840 PR tree-optimization/85935
14841 * graphite-scop-detection.c (find_params_in_bb): Analyze
14842 condition operands with respect to the correct loop. Assert
14843 the analysis doesn't fail.
14844
14845 2018-06-04 Carl Love <cel@us.ibm.com>
14846
14847 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14848 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14849 as it is slightly cheaper.
14850 (first_match_or_eos_index_<mode>):
14851 Calculate index using natural element order.
14852 (first_match_index_<mode>):
14853 Calculate index using natural element order.
14854 (first_match_or_eos_index_<mode>):
14855 Calculate index using natural order.
14856 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14857 for BE and LE modes.
14858 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14859 P9V_BUILTIN_VCLZLSBB_V16QI.
14860 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14861 specific.
14862
14863 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14864
14865 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14866 indentation and line wrap for many prototypes. Add missing
14867 @smallexample directives around block of prototypes for vec_xl and
14868 vec_xst.
14869
14870 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14871
14872 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14873 track if we pass or return IEEE 128-bit floating point.
14874 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14875 C++ mangling that is compatible with GCC 8.1.
14876 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14877 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14878 floating point types.
14879 (rs6000_function_arg_advance_1): Likewise.
14880 (rs6000_mangle_type): Optionally generate mangled names that match
14881 what GCC 8.1 generated for IEEE 128-bit floating point types.
14882 (rs6000_globalize_decl_name): If we have an external function that
14883 passes or returns IEEE 128-bit types, generate a weak reference
14884 from the mangled name used in GCC 8.1 to the current mangled
14885 name.
14886 (rs6000_init_builtins): Make __ibm128 use the long double type if
14887 long double is IBM extended double. Make __float128 use the long
14888 double type if long double is IEEE 128-bit.
14889
14890 PR target/85657
14891 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14892 macro for __ibm128 built-in functions.
14893 (PACK_IF): Add __ibm128 pack/unpack functions.
14894 (UNPACK_IF): Likewise.
14895 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14896 enable long double built-in functions if long double is IEEE
14897 128-bit floating point.
14898 (rs6000_invalid_builtin): Update long double built-in function
14899 error message.
14900 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14901 functions, adjust the built-in function to use the long double
14902 built-in function if __ibm128 and long double are the same type.
14903 * doc/extend.texi (PowerPC builtins): Update documention for
14904 __builtin_{,un}pack_longdouble. Add documentation for
14905 __builtin_{,un}pack_ibm128.
14906
14907 2018-06-06 Jim Wilson <jimw@sifive.com>
14908
14909 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14910 (struct machine_function): New field interrupt_mode.
14911 (riscv_handle_type_attribute): New function. Add forward declaration.
14912 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14913 (riscv_expand_epilogue): Check interrupt_mode field.
14914 (riscv_set_current_function): Check interrupt attribute args and
14915 set interrupt_mode field.
14916 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14917 (riscv_sret, riscv_uret): New.
14918 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14919 new arguments to interrupt attribute.
14920
14921 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14922
14923 PR target/63177
14924 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14925 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14926
14927 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14928
14929 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14930 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14931 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14932 several redundant entries.
14933
14934 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14935
14936 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14937 type from "rtx" to "rtx_insn *".
14938 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14939 for local "call_insn", removing cast.
14940 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14941
14942 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14943
14944 PR tree-optimization/86066
14945 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14946 for BIT_INSERT_EXPR stores.
14947
14948 2018-06-06 Richard Biener <rguenther@suse.de>
14949
14950 PR tree-optimization/86062
14951 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14952 component refs ontop
14953 of to be offsetted base.
14954
14955 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14956
14957 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14958 to be static and remove check on interrupt attribute name.
14959
14960 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14961
14962 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14963 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14964
14965 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14966
14967 PR target/79924
14968 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14969 second argument.
14970 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14971 Remove second argument, change how error is called.
14972 (aarch64_layout_arg): Remove second argument from
14973 aarch64_err_no_fpadvsimd call.
14974 (aarch64_init_cumulative_args): Ditto.
14975 (aarch64_gimplify_va_arg_expr): Ditto.
14976 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14977
14978 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14979
14980 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14981 (*simple_return_indirect_internal<mode>): Rename from
14982 simple_return_indirect_internal. Use W mode iterator.
14983 (rstorssp): New expander.
14984 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14985 (clrssbsy): New expander.
14986 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14987
14988 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14989
14990 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14991 __typeof__.
14992 (cmse_check_pointed_object): Likewise.
14993
14994 2018-06-05 Martin Liska <mliska@suse.cz>
14995
14996 PR gcov-profile/47618
14997 * doc/invoke.texi: Document how -fprofile-dir format
14998 is extended.
14999
15000 2018-06-05 Richard Biener <rguenther@suse.de>
15001
15002 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
15003 removal pretend DOM info isn't available so we do not update
15004 it and only remove edges, not dominated blocks. Actually free
15005 DOM info in case we removed something. Remove unreachable blocks.
15006 (mfb_keep_latches): Work with either DOM info or marked backedges.
15007 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
15008 first. Mark backedges if DOM info isn't available.
15009 (Re-)compute DOM info after cleanup_control_flow_pre.
15010
15011 2018-06-05 Richard Biener <rguenther@suse.de>
15012
15013 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
15014 (locus_discrim_hasher::hash): Adjust.
15015 (locus_discrim_hasher::equal): Likewise.
15016 (next_discriminator_for_locus): Work on line directly.
15017 (same_line_p): Pass in expanded locus1 as well.
15018 (assign_discriminators): Avoid redundant location expansions.
15019
15020 2018-06-05 Richard Biener <rguenther@suse.de>
15021
15022 PR tree-optimization/86046
15023 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
15024 if required after clearing TREE_ADDRESSABLE.
15025
15026 2018-06-05 Richard Biener <rguenther@suse.de>
15027
15028 PR tree-optimization/86047
15029 * tree-ssa-loop.c (for_each_index): Glob handling of all
15030 decls and constants and really handle all of them.
15031
15032 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15033
15034 PR target/81497
15035 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
15036 qualifier_void_pointer and qualifier_const_void_pointer.
15037 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
15038 (arm_init_builtins): Handle the above.
15039 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
15040 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
15041 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
15042 void intrinsics.
15043
15044 2018-06-05 Martin Liska <mliska@suse.cz>
15045
15046 * auto-profile.c (read_autofdo_file): Do not use
15047 gcov_ctr_summary struct.
15048 (afdo_callsite_hot_enough_for_early_inline): Likewise.
15049 * coverage.c (struct counts_entry): Likewise.
15050 (read_counts_file): Read just single summary entry.
15051 (get_coverage_counts): Use gcov_summary struct.
15052 * coverage.h (get_coverage_counts): Likewise.
15053 * gcov-dump.c (dump_working_sets): Likewise.
15054 (tag_summary): Dump just single summary.
15055 * gcov-io.c (gcov_write_summary): Write just histogram
15056 summary.
15057 (gcov_read_summary): Read just single summary.
15058 (compute_working_sets): Use gcov_summary struct.
15059 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
15060 of GCOV_COUNTERS_SUMMABLE.
15061 (GCOV_COUNTERS_SUMMABLE): Remove.
15062 (GCOV_FIRST_VALUE_COUNTER): Replace with
15063 GCOV_COUNTER_V_INTERVAL.
15064 (struct gcov_ctr_summary): Remove.
15065 (struct gcov_summary): Directly use fields of former
15066 gcov_ctr_summary.
15067 (compute_working_sets): Use gcov_summary struct.
15068 * gcov.c (read_count_file): Do not use ctrs fields.
15069 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
15070 struct.
15071 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
15072 struct.
15073 * profile.c: Likewise.
15074 * profile.h: Likewise.
15075
15076 2018-06-05 Martin Liska <mliska@suse.cz>
15077
15078 PR gcov-profile/84846
15079 * gcov.c (output_lines): Print working directory only
15080 in intermediate format.
15081
15082 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
15083
15084 * config/s390/s390-builtin-types.def: Add void function type.
15085 * config/s390/s390-builtins.def: Use the function type for the
15086 tbeginc builtin.
15087
15088 2018-06-04 Jim Wilson <jimw@sifive.com>
15089
15090 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
15091 to int.
15092 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
15093 and maybe_eh_return. Change regno to unsigned int. Use new args to
15094 handle EH_RETURN_DATA_REGNO registers properly.
15095 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
15096 (riscv_expand_epilogue): Update comment. Change argument name and
15097 type. Update code to use new name and type. Pass new args to
15098 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
15099 EXCEPTION_RETURN.
15100 * config/riscv/riscv.md (NORMAL_RETURN): New.
15101 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
15102 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
15103 (eh_return): Call gen_eh_return_internal and emit barrier.
15104 (eh_return_internal): Call riscv_expand_epilogue.
15105
15106 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
15107
15108 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
15109 bit_insertion field and declare can_be_merged_into method.
15110 (merged_store_group::can_be_merged_into): New method.
15111 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
15112 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
15113 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
15114
15115 2018-06-04 Richard Biener <rguenther@suse.de>
15116
15117 PR tree-optimization/85955
15118 * builtins.c (fold_builtin_sincos): Convert pointers to
15119 destination to appropriate type before dereferencing.
15120
15121 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
15122
15123 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
15124
15125 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
15126
15127 * expr.c (expand_expr_real_1): Force the operand into memory if
15128 its TYPE_MODE is BLKmode and if there is no integer mode for
15129 the number of bits being extracted.
15130
15131 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15132
15133 PR target/85832
15134 PR target/86036
15135 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15136 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
15137
15138 2018-06-04 Richard Biener <rguenther@suse.de>
15139
15140 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
15141 (cleanup_tree_cfg_noloop): ... single caller. Do
15142 start_recording_case_labels later.
15143
15144 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
15145
15146 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
15147 to _IMMINTRIN_H_INCLUDED.
15148 * config/i386/pconfigintrin.h: Ditto.
15149 * config/i386/waitpkgintrin.h: Ditto.
15150 * config/i386/immintrin.h: Add includes for sgxintrin.h,
15151 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
15152 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
15153 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
15154 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
15155 waitpkgintrin.h and cldemoteintrin.h.
15156
15157 2018-06-04 Richard Biener <rguenther@suse.de>
15158
15159 PR tree-optimization/86038
15160 * tracer.c (find_best_successor): Check probability for
15161 being initialized, bail out if not.
15162
15163 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
15164
15165 PR target/86003
15166 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15167 of bits to ignore when comparing architectures.
15168
15169 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15170
15171 PR tree-optimization/69615
15172 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15173 maximum or minimum of the type, try to merge it also as if
15174 range1 is + [-, x - 1] or + [x + 1, -].
15175
15176 PR c++/86025
15177 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15178
15179 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
15180
15181 PR tree-optimization/86034
15182 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15183 the unsigned bitfield type in a bit insertion sequence if it does not
15184 have a larger precision than the bitfield size.
15185 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15186
15187 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
15188
15189 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15190
15191 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15192
15193 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15194 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15195 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15196 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15197
15198 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15199
15200 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15201 Disable -fdelete-null-pointer-checks for ELF toolchain.
15202
15203 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15204 Kito Cheng <kito.cheng@gmail.com>
15205
15206 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15207 (nds32le-*-*, nds32be-*-*): Integrate checking process.
15208 (nds32*-*-*): Add glibc and uclibc conditions.
15209 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15210 (TARGET_EXCEPT_UNWIND_INFO): Define.
15211 * config/nds32/elf.h: New file.
15212 * config/nds32/linux.h: New file.
15213 * config/nds32/nds32-elf.opt: New file.
15214 * config/nds32/nds32-linux.opt: New file.
15215 * config/nds32/nds32-fp-as-gp.c
15216 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15217 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15218 TARGET_LINUX_ABI.
15219 (nds32_asm_file_end): Ditto.
15220 (nds32_print_operand): Ditto.
15221 (nds32_insert_attributes): Ditto.
15222 (nds32_init_libfuncs): New function.
15223 (TARGET_HAVE_TLS): Define.
15224 (TARGET_INIT_LIBFUNCS): Define.
15225 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15226 spec content.
15227 (TARGET_ELF): Apply different mcmodel setting.
15228 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15229 been migrated into elf.h and linux.h files.
15230 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15231 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15232 (mcmodel): The content has been migrated into nds32-elf.opt and
15233 nds32-linux.opt files.
15234 * config/nds32/t-elf: New file.
15235 * config/nds32/t-linux: New file.
15236
15237 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15238 Shiva Chen <shiva0217@gmail.com>
15239
15240 * config/nds32/constants.md (unspec_volatile_element): Add
15241 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15242 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15243 optimization.
15244 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15245 (make_pass_nds32_fp_as_gp): Declare.
15246 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15247 optmization pass.
15248 (nds32_asm_function_end_prologue): Remove unused asm output.
15249 (nds32_asm_function_begin_epilogue): Remove unused asm output.
15250 (nds32_asm_file_start): Output necessary fp_as_gp information.
15251 (nds32_option_override): Adjust register usage.
15252 (nds32_expand_prologue): Consider fp_as_gp situation.
15253 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15254 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15255 (epilogue): Ditto.
15256 (return): Ditto.
15257 (simple_return): Ditto.
15258 (omit_fp_begin): Output special directive for fp_as_gp.
15259 (omit_fp_end): Output special directive for fp_as_gp.
15260 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15261 mforbid-fp-as-gp): New options.
15262
15263 2018-06-01 Mark Wielaard <mark@klomp.org>
15264
15265 * dwarf2out.c (dwarf2out_finish): Remove generation of
15266 DW_AT_loclists_base.
15267
15268 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
15269
15270 * gimple-ssa-store-merging.c: Include gimple-fold.h.
15271 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15272 (struct merged_store_group): Add bit_insertion field.
15273 (dump_char_array): Use standard hexadecimal format.
15274 (merged_store_group::merged_store_group): Set bit_insertion to false.
15275 (merged_store_group::apply_stores): Use optimal buffer size. Deal
15276 with BIT_INSERT_EXPR stores. Move up code updating the mask and
15277 also print the mask in the dump file.
15278 (pass_store_merging::gate): Minor tweak.
15279 (imm_store_chain_info::coalesce_immediate): Fix wrong association
15280 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
15281 stores with INTEGER_CST stores.
15282 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15283 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15284 and use it throughout. Generate bit insertion sequences if need be.
15285 (pass_store_merging::process_store): Remove redundant condition.
15286 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15287
15288 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
15289
15290 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15291 the 128-bit floating point types. Fix function comment.
15292
15293 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15294
15295 * config/aarch64/aarch64-simd.md
15296 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15297 mnemonics.
15298 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15299 mnemonics.
15300
15301 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15302
15303 PR tree-optimization/85989
15304 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15305 variable.
15306 (backprop::intersect_uses): Check it when deciding whether this
15307 is a backedge reference.
15308 (backprop::process_block): Add each phi to m_visited_phis
15309 after visiting it, then clear it at the end.
15310
15311 2018-06-01 Richard Biener <rguenther@suse.de>
15312
15313 * tree-vectorizer.h (vect_dr_stmt): New function.
15314 (vect_get_load_cost): Adjust.
15315 (vect_get_store_cost): Likewise.
15316 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15317 Use vect_dr_stmt instead of DR_SMTT.
15318 (vect_record_base_alignments): Likewise.
15319 (vect_calculate_target_alignment): Likewise.
15320 (vect_compute_data_ref_alignment): Likewise and make static.
15321 (vect_update_misalignment_for_peel): Likewise.
15322 (vect_verify_datarefs_alignment): Likewise.
15323 (vector_alignment_reachable_p): Likewise.
15324 (vect_get_data_access_cost): Likewise. Pass down
15325 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15326 (vect_get_peeling_costs_all_drs): Likewise.
15327 (vect_peeling_hash_get_lowest_cost): Likewise.
15328 (vect_enhance_data_refs_alignment): Likewise.
15329 (vect_find_same_alignment_drs): Likewise.
15330 (vect_analyze_data_refs_alignment): Likewise.
15331 (vect_analyze_group_access_1): Likewise.
15332 (vect_analyze_group_access): Likewise.
15333 (vect_analyze_data_ref_access): Likewise.
15334 (vect_analyze_data_ref_accesses): Likewise.
15335 (vect_vfa_segment_size): Likewise.
15336 (vect_small_gap_p): Likewise.
15337 (vectorizable_with_step_bound_p): Likewise.
15338 (vect_prune_runtime_alias_test_list): Likewise.
15339 (vect_analyze_data_refs): Likewise.
15340 (vect_supportable_dr_alignment): Likewise.
15341 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15342 (vect_gen_prolog_loop_niters): Likewise.
15343 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15344 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15345 modify DR_STMT.
15346 (vect_recog_mask_conversion_pattern): Likewise.
15347 (vect_try_gather_scatter_pattern): Likewise.
15348 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15349 to vect_get_store_cost.
15350 (vect_get_store_cost): Get stmt_info instead of DR.
15351 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15352 (vect_get_load_cost): Get stmt_info instead of DR.
15353
15354 2018-06-01 Richard Biener <rguenther@suse.de>
15355
15356 PR middle-end/86017
15357 * gimple-fold.c (var_decl_component_p): Also allow offsetted
15358 vars wrapped in MEM_REFs.
15359
15360 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15361
15362 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15363 Fix subreg tests so that we only return a choice between
15364 GENERAL_REGS and FP_REGS if the original classes included both.
15365
15366 2018-06-01 Richard Biener <rguenther@suse.de>
15367
15368 PR ipa/85960
15369 * tree-ssa-structalias.c (get_function_part_constraint):
15370 Handle NULL fi->decl.
15371 (find_func_aliases_for_call): Properly handle indirect
15372 fi from direct call.
15373 (find_func_clobbers): Likewise.
15374 (ipa_pta_execute): Likewise.
15375 (create_variable_info_for): For functions that are ifunc_resolver
15376 resolve to a varinfo that contains the result of the resolver call.
15377 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15378 aliases.
15379
15380 2018-05-31 Michael Collison <michael.collison@arm.com>
15381
15382 * config/aarch64/aarch64.md:
15383 (*fix_to_zero_extenddfdi2): New pattern.
15384 * gcc.target/aarch64/fix_extend1.c: New testcase.
15385
15386 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15387
15388 PR middle-end/78809
15389 PR middle-end/83026
15390 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15391 and BUILT_IN_STRNCMP_EQ.
15392 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15393 BUILT_IN_STRNCMP_EQ.
15394 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15395 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15396 (gimple_fold_builtin): Likewise.
15397 * tree-ssa-strlen.c (compute_string_length): New function.
15398 (determine_min_obsize): New function.
15399 (handle_builtin_string_cmp): New function to handle calls to
15400 string compare functions.
15401 (strlen_optimize_stmt): Add handling to builtin string compare
15402 calls.
15403 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15404 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15405 * tree.c (build_common_builtin_nodes): Add new defines of
15406 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15407
15408 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15409
15410 PR target/85984
15411 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15412 functions with naked attribute.
15413
15414 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15415
15416 * config/i386/sse.md (avx_vec_concat<mode>):
15417 Substitute concat_tg_mode mode attribute with xtg_mode.
15418 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15419 (concat_tg_mode): Remove mode attribute.
15420
15421 2018-05-31 Martin Sebor <msebor@redhat.com>
15422
15423 PR c/82063
15424 * calls.c (alloc_max_size): Correct a logic error/typo.
15425 Treat excessive arguments as infinite. Warn for invalid arguments.
15426 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15427
15428 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15429
15430 PR target/85829
15431 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15432 and movx for Haswell.
15433
15434 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15435 Cesar Philippidis <cesar@codesourcery.com>
15436
15437 PR middle-end/85879
15438 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15439 when emitting error on private/firstprivate reductions.
15440 * omp-low.c (lower_omp_target): Avoid reference-type processing
15441 on pointers for firstprivate clause.
15442
15443 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15444
15445 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15446 (st1x2): Likewise.
15447 (st1x3): Likewise.
15448 * config/aarch64/aarch64-simd.md
15449 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15450 (aarch64_ld1_x3_<mode>): Likewise
15451 (aarch64_st1x2<VALLDIF:mode>): Likewise
15452 (aarch64_st1_x2_<mode>): Likewise
15453 (aarch64_st1x3<VALLDIF:mode>): Likewise
15454 (aarch64_st1_x3_<mode>): Likewise
15455 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15456 (vld1_s8_x3): Likewise.
15457 (vld1_u16_x3): Likewise.
15458 (vld1_s16_x3): Likewise.
15459 (vld1_u32_x3): Likewise.
15460 (vld1_s32_x3): Likewise.
15461 (vld1_u64_x3): Likewise.
15462 (vld1_s64_x3): Likewise.
15463 (vld1_f16_x3): Likewise.
15464 (vld1_f32_x3): Likewise.
15465 (vld1_f64_x3): Likewise.
15466 (vld1_p8_x3): Likewise.
15467 (vld1_p16_x3): Likewise.
15468 (vld1_p64_x3): Likewise.
15469 (vld1q_u8_x3): Likewise.
15470 (vld1q_s8_x3): Likewise.
15471 (vld1q_u16_x3): Likewise.
15472 (vld1q_s16_x3): Likewise.
15473 (vld1q_u32_x3): Likewise.
15474 (vld1q_s32_x3): Likewise.
15475 (vld1q_u64_x3): Likewise.
15476 (vld1q_s64_x3): Likewise.
15477 (vld1q_f16_x3): Likewise.
15478 (vld1q_f32_x3): Likewise.
15479 (vld1q_f64_x3): Likewise.
15480 (vld1q_p8_x3): Likewise.
15481 (vld1q_p16_x3): Likewise.
15482 (vld1q_p64_x3): Likewise.
15483 (vst1_s64_x2): Likewise.
15484 (vst1_u64_x2): Likewise.
15485 (vst1_f64_x2): Likewise.
15486 (vst1_s8_x2): Likewise.
15487 (vst1_p8_x2): Likewise.
15488 (vst1_s16_x2): Likewise.
15489 (vst1_p16_x2): Likewise.
15490 (vst1_s32_x2): Likewise.
15491 (vst1_u8_x2): Likewise.
15492 (vst1_u16_x2): Likewise.
15493 (vst1_u32_x2): Likewise.
15494 (vst1_f16_x2): Likewise.
15495 (vst1_f32_x2): Likewise.
15496 (vst1_p64_x2): Likewise.
15497 (vst1q_s8_x2): Likewise.
15498 (vst1q_p8_x2): Likewise.
15499 (vst1q_s16_x2): Likewise.
15500 (vst1q_p16_x2): Likewise.
15501 (vst1q_s32_x2): Likewise.
15502 (vst1q_s64_x2): Likewise.
15503 (vst1q_u8_x2): Likewise.
15504 (vst1q_u16_x2): Likewise.
15505 (vst1q_u32_x2): Likewise.
15506 (vst1q_u64_x2): Likewise.
15507 (vst1q_f16_x2): Likewise.
15508 (vst1q_f32_x2): Likewise.
15509 (vst1q_f64_x2): Likewise.
15510 (vst1q_p64_x2): Likewise.
15511 (vst1_s64_x3): Likewise.
15512 (vst1_u64_x3): Likewise.
15513 (vst1_f64_x3): Likewise.
15514 (vst1_s8_x3): Likewise.
15515 (vst1_p8_x3): Likewise.
15516 (vst1_s16_x3): Likewise.
15517 (vst1_p16_x3): Likewise.
15518 (vst1_s32_x3): Likewise.
15519 (vst1_u8_x3): Likewise.
15520 (vst1_u16_x3): Likewise.
15521 (vst1_u32_x3): Likewise.
15522 (vst1_f16_x3): Likewise.
15523 (vst1_f32_x3): Likewise.
15524 (vst1_p64_x3): Likewise.
15525 (vst1q_s8_x3): Likewise.
15526 (vst1q_p8_x3): Likewise.
15527 (vst1q_s16_x3): Likewise.
15528 (vst1q_p16_x3): Likewise.
15529 (vst1q_s32_x3): Likewise.
15530 (vst1q_s64_x3): Likewise.
15531 (vst1q_u8_x3): Likewise.
15532 (vst1q_u16_x3): Likewise.
15533 (vst1q_u32_x3): Likewise.
15534 (vst1q_u64_x3): Likewise.
15535 (vst1q_f16_x3): Likewise.
15536 (vst1q_f32_x3): Likewise.
15537 (vst1q_f64_x3): Likewise.
15538 (vst1q_p64_x3): Likewise.
15539
15540 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15541
15542 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15543 user_label_prefix to name.
15544
15545 * tree-core.h: Update comment about the format of NAME string
15546 passed to handler in attribute_spec.
15547
15548 * config/msp430/msp430.md: Remove erroneous subreg expression from
15549 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15550 zero_extend{q,h}isi2.
15551
15552 2018-05-30 Borislav Petkov <bp@suse.de>
15553
15554 * doc/extend.texi: Document some architecture specific
15555 constraints and sort entries.
15556
15557 2018-05-30 Martin Sebor <msebor@redhat.com>
15558
15559 PR middle-end/85369
15560 * builtins.c (expand_builtin_stpcpy_1): New function.
15561 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15562 only if the former succeeds.
15563
15564 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15565
15566 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15567 in saphira.
15568
15569 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15570
15571 * doc/invoke.texi (-flinker-output): Document
15572
15573 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15574
15575 * passes.c (ipa_write_summaries): Only modify statements if body
15576 is in memory.
15577 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15578 incrementally linking.
15579 (ipa_passes): Likewise.
15580 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15581 pass down resolution info.
15582 * common.opt (flag_incremental_link): Update info.
15583 * gcc.c (plugin specs): Turn flinker-output=* to
15584 -plugin-opt=-linker-output-known
15585 * toplev.c (compile_file): Also cut compilation when doing incremental
15586 link.
15587 * flag-types. (enum lto_partition_model): Add
15588 LTO_LINKER_OUTPUT_NOLTOREL.
15589 (invoke.texi): Add -flinker-output docs.
15590 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15591 link same way as WPA; do not stream in dead initializers.
15592
15593 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15594 darf2out_register_external_decl): Support incremental link.
15595
15596 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15597
15598 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15599
15600 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15601
15602 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15603 it down to simple_object_copy_lto_debug_sections.
15604 (run_gcc): Determine incremental LTO link time and configure
15605 lto1 into non-wpa mode, disable renaming of debug sections.
15606
15607 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15608
15609 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15610 descriptions of various incorrectly documented functions.
15611
15612 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15613
15614 Revert:
15615 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15616 address check not strict.
15617
15618 2018-05-30 Richard Biener <rguenther@suse.de>
15619
15620 PR tree-optimization/85964
15621 * tracer.c (better_p): Drop initialized count check, we only
15622 call the function with initialized counts now.
15623 (find_best_successor): Do find a best edge if one
15624 has uninitialized count.
15625 (find_best_predecessor): Likewise. Do BB frequency check only
15626 if count is initialized.
15627
15628 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15629
15630 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15631 (aarch64_ldrstr_offset_compare): New.
15632 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15633 load/store orderings.
15634 (aarch64_gen_adjusted_ldpstp): Likewise.
15635
15636 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15637
15638 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15639 Check for subset of GENERAL_REGS and FP_REGS.
15640 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15641 r=w alternative.
15642
15643 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15644
15645 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15646 and wi::to_poly_offset. Add the current offset and then check
15647 whether the sum fits, rather than using an unchecked addition of
15648 a checked term. Check for a shwi rather than a uhwi.
15649 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15650 (store_constructor): Use poly_int_tree_p.
15651 (expand_expr_real_1): Likewise.
15652 * function.c (assign_temp): Likewise.
15653 * fold-const.c (const_binop): Use poly_int_tree_p and
15654 wi::to_poly_offset.
15655 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15656 division.
15657 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15658 to_poly_offset for MEM offsets.
15659 * ipa-icf.c (sem_variable::equals): Likewise.
15660 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15661 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15662 wi::to_poly_offset for BIT_FIELD_REF offsets.
15663 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15664 wi::to_poly_offset.
15665 * var-tracking.c (emit_note_insn_var_location): Use
15666 tree_to_poly_uint64.
15667
15668 2018-05-29 Jim Wilson <jimw@sifive.com>
15669
15670 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15671
15672 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15673
15674 PR target/85950
15675 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15676 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15677 sequence.
15678 (sse4_1_round<mode>2): Use nonimmediate_operand
15679 for operand 1 predicate.
15680
15681 2018-05-29 Martin Sebor <msebor@redhat.com>
15682 Richard Biener <rguenther@suse.de>
15683
15684 PR testsuite/85888
15685 * calls.c (get_size_range): Call determine_value_range instead
15686 of get_value_range..
15687 * tree-vrp.h (determine_value_range): Declared new function.
15688 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15689
15690 2018-05-29 Richard Biener <rguenther@suse.de>
15691
15692 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15693 sure to use non-pattern stmts for get_earlier_stmt arguments.
15694 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15695 called on pattern stmts.
15696 (get_later_stmt): Likewise.
15697
15698 2018-05-29 Martin Liska <mliska@suse.cz>
15699
15700 PR gcov-profile/85759
15701 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15702 env variables.
15703
15704 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15705
15706 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15707 VEC_UNPACK_*_EXPR.
15708 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15709 VEC_PACK_*_EXPR.
15710
15711 PR target/85918
15712 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15713 VEC_PACK_FLOAT_EXPR): New tree codes.
15714 * tree-pretty-print.c (op_code_prio): Handle
15715 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15716 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15717 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15718 * tree-inline.c (estimate_operator_cost): Likewise.
15719 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15720 * fold-const.c (const_binop): Likewise.
15721 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15722 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15723 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15724 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15725 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15726 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15727 * expr.c (expand_expr_real_2): Likewise.
15728 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15729 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15730 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15731 optabs.
15732 * optabs.c (expand_widen_pattern_expr): For
15733 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15734 sign from result type rather than operand's type.
15735 (expand_binop_directly): For vec_packu_float_optab and
15736 vec_packs_float_optab allow result type to be different from operand's
15737 type.
15738 * optabs-tree.c (optab_for_tree_code): Handle
15739 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15740 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15741 * tree-vect-generic.c (expand_vector_operations_1): Handle
15742 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15743 VEC_PACK_FLOAT_EXPR.
15744 * tree-vect-stmts.c (supportable_widening_operation): Handle
15745 FIX_TRUNC_EXPR.
15746 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15747 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15748 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15749 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15750 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15751 mode attributes.
15752 (vec_pack<floatprefix>_float_<mode>): New expander.
15753 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15754 attributes.
15755 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15756 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15757 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15758 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15759 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15760 Document.
15761 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15762 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15763 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15764 VEC_PACK_FLOAT_EXPR): Document.
15765
15766 2018-05-29 Richard Biener <rguenther@suse.de>
15767
15768 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15769 member.
15770 (stmt_vec_info_vec): Make pointer.
15771 (init_stmt_vec_info_vec): Remove.
15772 (free_stmt_vec_info_vec): Likewise.
15773 (set_stmt_vec_info_vec): New function.
15774 (free_stmt_vec_infos): Likewise.
15775 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15776 (set_vinfo_for_stmt): Likewise.
15777 (get_earlier_stmt): Likewise.
15778 (get_later_stmt): Likewise.
15779 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15780 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15781 (vec_info::~vec_info): Free stmt_vec_infos.
15782 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15783 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15784 (pass_slp_vectorize::execute): Likewise.
15785 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15786 (free_stmt_vec_info_vec): Likewise.
15787 (set_stmt_vec_info_vec): New function.
15788 (free_stmt_vec_infos): Likewise.
15789 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15790 the global stmt_vec_info_vec.
15791 * tree-parloops.c (gather_scalar_reductions): Use
15792 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15793 vector.
15794
15795 2018-05-29 Richard Biener <rguenther@suse.de>
15796
15797 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15798
15799 2018-05-29 Martin Liska <mliska@suse.cz>
15800 David Malcolm <dmalcolm@redhat.com>
15801
15802 * vec.c (test_reverse): New.
15803 (vec_c_tests): Add new test.
15804 * vec.h (vl_ptr>::reverse): New function.
15805
15806 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15807
15808 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15809
15810 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15811 and later.
15812
15813 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15814
15815 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15816
15817 2018-05-28 Richard Biener <rguenther@suse.de>
15818
15819 PR tree-optimization/85933
15820 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15821 look at stmts marked as vectorizable.
15822
15823 2018-05-28 Richard Biener <rguenther@suse.de>
15824
15825 PR tree-optimization/85934
15826 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15827 vector boolean check before scalar optimization.
15828
15829 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15830
15831 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15832 for armv5te.
15833
15834 2018-05-28 Mark Wielaard <mark@klomp.org>
15835
15836 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15837 if it is an expression containing a minus sign.
15838
15839 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15840
15841 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15842
15843 2018-05-27 Paul Koning <ni1d@arrl.net>
15844
15845 * config/pdp11/pdp11.md (truncsihi2): Remove.
15846
15847 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15848 Chung-Ju Wu <jasonwucj@gmail.com>
15849
15850 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15851 implementation.
15852 (unaligned_store_dw): Ditto.
15853 * config/nds32/nds32-memory-manipulation.c
15854 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15855 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15856 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15857 (emit_setmem_word_loop): Rename to ...
15858 (emit_setmem_doubleword_loop): ... this.
15859 (nds32_gen_dup_4_byte_to_word_value): New function.
15860 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15861 (nds32_expand_setmem_loop): Refine implementation.
15862 (nds32_expand_setmem_loop_v3m): Ditto.
15863 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15864 pattern.
15865
15866 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15867
15868 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15869
15870 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15871
15872 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15873 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15874 machine->attr_no_prologue_p.
15875 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15876 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15877 (nds32_expand_epilogue): Consider attr_naked_p.
15878 (nds32_expand_epilogue_v3pop): Likewise.
15879 (nds32_can_use_return_insn): Likewise.
15880 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15881 attr_no_prologue_p fields.
15882 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15883
15884 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15885
15886 PR target/85918
15887 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15888 attributes.
15889 * config/i386/sse.md
15890 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15891 Rename to ...
15892 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15893 ... this.
15894 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15895 Rename to ...
15896 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15897 ... this.
15898 (*<floatsuffix>floatv2div2sf2): Rename to ...
15899 (*float<floatunssuffix>v2div2sf2): ... this.
15900 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15901 (float<floatunssuffix>v2div2sf2_mask): ... this.
15902 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15903 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15904 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15905 to ...
15906 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15907 ... this.
15908 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15909 Rename to ...
15910 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15911 ... this.
15912 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15913 Rename to ...
15914 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15915 ... this.
15916 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15917 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15918 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15919 gen_ufix_truncv8dfv8si2.
15920 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15921 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15922 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15923 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15924 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15925 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15926 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15927 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15928
15929 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15930
15931 PR target/85900
15932 PR target/85345
15933 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15934
15935 2018-05-25 Jim Wilson <jimw@sifive.com>
15936
15937 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15938 * config/riscv/riscv.c (struct machine_function): Add
15939 interrupt_handler_p and attribute_checked_p fields.
15940 (riscv_attribute_table): Add interrupt.
15941 (riscv_interrupt_type_p): New.
15942 (riscv_save_reg_p): Save extra regs for interrupt handler.
15943 (riscv_use_save_libcall): Return false for interrupt handler.
15944 (riscv_first_stack_step): Add forward declaration.
15945 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15946 for interrupt handler with large frame. Use it for saved reg list.
15947 (riscv_expand_prologue): Move flag_stack_usage_info support to
15948 eliminate duplication.
15949 (riscv_expand_epilogue): Generate mret for interrupt handler.
15950 (riscv_epilogue_uses): New.
15951 (riscv_can_use_return_insn): Return false for interrupt handler.
15952 (riscv_function_ok_for_sibcall): Likewise.
15953 (riscv_set_current_function): Add interrupt handler support.
15954 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15955 * config/riscv/riscv.md (UNSPECV_MRET): New.
15956 (GP_REGNUM): New.
15957 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15958 (riscv_mret): New.
15959 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15960
15961 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15962
15963 PR tree-optimization/85712
15964 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15965 this candidate has already been replaced in-situ by a copy.
15966
15967 2018-05-25 Jason Merrill <jason@redhat.com>
15968
15969 PR c++/80485 - inline function non-zero address.
15970 * symtab.c (nonzero_address): Check DECL_COMDAT.
15971
15972 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15973
15974 PR target/83628
15975 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15976 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15977 extension of SImode operation. Use const123_operand predicate.
15978 (*saddsi_1): Remove.
15979 (*saddl_se_1): Ditto.
15980 (*ssubsi_1): Ditto.
15981 (*ssubl_se_1): Ditto.
15982 * config/alpha/predicates.md (const123_operand): New predicate.
15983 * config/alpha/constraints.md (P): Use IN_RANGE.
15984
15985 2018-05-25 Richard Biener <rguenther@suse.de>
15986
15987 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15988 defaulted to true.
15989 (ref_maybe_used_by_stmt_p): Likewise.
15990 (stmt_may_clobber_ref_p): Likewise.
15991 (stmt_may_clobber_ref_p_1): Likewise.
15992 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15993 and pass it along.
15994 (ref_maybe_used_by_stmt_p): Likewise.
15995 (stmt_may_clobber_ref_p): Likewise.
15996 (stmt_may_clobber_ref_p_1): Likewise.
15997 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15998 the alias oracle to disambiguate DRs with stmts DR analysis
15999 couldn't handle.
16000 (vect_analyze_data_refs): Do not give up on not analyzable
16001 DRs for BB vectorization. Remove code truncating the dataref
16002 vector.
16003
16004 2018-05-25 Jakub Jelinek <jakub@redhat.com>
16005
16006 PR target/85832
16007 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16008 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
16009 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
16010
16011 2018-05-25 Richard Biener <rguenther@suse.de>
16012
16013 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
16014 function, combining stmt data ref gathering and fatal analysis
16015 parts.
16016 (vect_analyze_data_refs): Remove now redudnant code and simplify.
16017 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
16018 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
16019 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
16020 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
16021
16022 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16023
16024 PR tree-optimization/85720
16025 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
16026 SCC if all partitions are builtins.
16027 (version_loop_by_alias_check): New parameter. Generate cancelable
16028 runtime alias check if all partitions are builtins.
16029 (distribute_loop): Update call to above function.
16030
16031 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16032
16033 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
16034 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
16035 (parm_default_def_partition_arg): Ditto.
16036 (set_parm_default_def_partition): Ditto.
16037 (get_parm_default_def_partitions): Ditto and make it static.
16038 (get_undefined_value_partitions): Ditto and make it static.
16039 (remove_ssa_form): Refactor call to init_var_map here.
16040 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
16041 computation for loop region.
16042 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
16043 (register_default_def): Delete.
16044 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
16045 (parm_default_def_partition_arg): Ditto.
16046 (set_parm_default_def_partition): Ditto.
16047 (get_parm_default_def_partitions): Ditto and make it static.
16048 (get_undefined_value_partitions): Ditto and make it static.
16049 (coalesce_with_default, coalesce_with_default): Update comment.
16050 (create_coalesce_list_for_region): New func factored out from
16051 create_outofssa_var_map.
16052 (populate_coalesce_list_for_outofssa): New func factored out from
16053 create_outofssa_var_map and coalesce_ssa_name.
16054 (create_outofssa_var_map): Delete.
16055 (coalesce_ssa_name): Refactor to support live range computation.
16056 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
16057 (get_parm_default_def_partitions): Delete.
16058 (get_undefined_value_partitions): Ditto.
16059 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
16060 computation for loop region.
16061 (new_tree_live_info, loe_visit_block): Ditto.
16062 (live_worklist, set_var_live_on_entry): Ditto.
16063 (calculate_live_on_exit, verify_live_on_entry): Ditto.
16064 * tree-ssa-live.h (struct _var_map): New fields.
16065 (init_var_map): Change decl.
16066 (region_contains_p): New.
16067
16068 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16069
16070 * tree-ssa-live.h (live_merge_and_clear): Delete.
16071
16072 2018-05-25 Richard Biener <rguenther@suse.de>
16073
16074 PR c++/85912
16075 * tree-dump.c (dequeue_and_dump): Remove access to removed
16076 operand 2 of a SWITCH_EXPR.
16077
16078 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16079
16080 * doc/sourcebuild.texi (vect_double_cond_arith): Include
16081 multiplication and division.
16082 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
16083 (cond_udiv@var{m}, cond_umod@var{m}): Document.
16084 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
16085 (cond_udiv_optab, cond_umod_optab): New optabs.
16086 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
16087 (IFN_COND_RDIV): New internal functions.
16088 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
16089 TRUNC_MOD_EXPR and RDIV_EXPR.
16090 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
16091 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
16092 New unspecs.
16093 (SVE_INT_BINARY): Include mult.
16094 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
16095 (optab, sve_int_op): Handle mult.
16096 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
16097 UNSPEC_COND_DIV.
16098 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
16099 for SVE_INT_BINARY_SD.
16100
16101 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16102
16103 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
16104 (optab, sve_int_op): Handle div and udiv.
16105 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
16106 for SVE_INT_BINARY_SD.
16107 (*<optab><mode>3): New insn for the same.
16108
16109 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16110
16111 * tree-vect-patterns.c: Include predict.h.
16112 (vect_recog_divmod_pattern): Restrict check for division support
16113 to when optimizing for size.
16114
16115 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16116
16117 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
16118 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
16119 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
16120 (gimple_match_op::set_op): Likewise.
16121 (gimple_resimplify4): Declare.
16122 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
16123 (expr::gen_transform): Likewise.
16124 (decision_tree::gen): Generate a simplification routine for 4 operands.
16125 * gimple-match-head.c (gimple_simplify): Add an overload for
16126 4 operands. In the top-level function, handle up to 4 call
16127 arguments and call gimple_resimplify4.
16128 (gimple_resimplify4): New function.
16129 (build_call_internal): Pass a fourth operand.
16130 (maybe_push_to_seq): Likewise.
16131 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
16132 Fold VEC_COND_EXPRs of an operation and a default value into
16133 an IFN_COND_* function if possible.
16134 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
16135 New unspecs.
16136 (SVE_COND_FP_BINARY): Include them.
16137 (optab, sve_fp_op): Handle them.
16138 (SVE_INT_BINARY_REV): New code iterator.
16139 (SVE_COND_FP_BINARY_REV): New int iterator.
16140 (commutative): New int attribute.
16141 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
16142 Declare.
16143 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
16144 function.
16145 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
16146 (*cond_<optab><mode>): New patterns for reversed operands.
16147
16148 2018-05-25 Richard Biener <rguenther@suse.de>
16149
16150 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
16151 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
16152 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
16153 (STMT_VINFO_GROUPED_ACCESS): Adjust.
16154 * tree-vect-data-refs.c (everywhere): Adjust users.
16155 * tree-vect-loop.c (everywhere): Likewise.
16156 * tree-vect-slp.c (everywhere): Likewise.
16157 * tree-vect-stmts.c (everywhere): Likewise.
16158 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
16159
16160 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16161
16162 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
16163 Rename to...
16164 (gcc_cv_as_section_exclude): ... this.
16165 Try Solaris as #exclude syntax.
16166 * configure: Regenerate.
16167 * config.in: Regenerate.
16168 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16169 SECTION_EXCLUDE.
16170 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16171 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16172
16173 * varasm.c (default_elf_asm_named_section): Don't check if
16174 HAVE_GAS_SECTION_EXCLUDE is defined.
16175
16176 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16177
16178 * doc/md.texi: Update the documentation of the cond_* optabs
16179 to mention the new final operand. Fix GET_MODE_NUNITS call.
16180 Describe the scalar case too.
16181 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16182 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16183 instead of 2.
16184 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16185 (get_conditional_internal_fn): Update comment.
16186 * tree-vect-loop.c (vectorizable_reduction): Pass the original
16187 accumulator value as a final argument to conditional functions.
16188 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16189 a define_expand and add an "else" operand. Assert for now that
16190 the else operand is equal to operand 2. Use SVE_INT_BINARY and
16191 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16192 (*cond_<optab><mode>): New patterns.
16193 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16194 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16195 (UNSPEC_COND_EOR): Delete.
16196 (optab): Remove associated mappings.
16197 (SVE_INT_BINARY): New code iterator.
16198 (sve_int_op): Remove int attribute and add "minus" to the code
16199 attribute.
16200 (SVE_COND_INT_OP): Delete.
16201 (SVE_COND_FP_OP): Rename to...
16202 (SVE_COND_FP_BINARY): ...this.
16203
16204 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16205
16206 * optabs.c (can_reuse_operands_p): New function.
16207 (maybe_legitimize_operands): Try to reuse the results for
16208 earlier operands.
16209
16210 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16211
16212 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16213 Add {q} suffix to insn mnemonic.
16214
16215 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16216
16217 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16218 (msp430_warn_func_return): New.
16219
16220 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
16221
16222 * fold-const.c (tree_nonzero_bits): New function.
16223 * fold-const.h (tree_nonzero_bits): Likewise.
16224 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16225 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16226
16227 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16228
16229 PR target/85900
16230 PR target/85345
16231 * varasm.c (assemble_alias): Check ifunc_resolver only on
16232 FUNCTION_DECL.
16233
16234 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16235
16236 PR target/85903
16237 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16238 when memory input operand is handled.
16239
16240 2018-05-24 Luis Machado <luis.machado@linaro.org>
16241
16242 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16243 global.
16244 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16245
16246 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16247
16248 * match.pd: Delay FMA folds until after vectorization.
16249
16250 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
16251
16252 PR target/83009
16253 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16254 address check not strict.
16255
16256 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16257
16258 * gimple-match.h (gimple_match_op): New class.
16259 (mprts_hook): Replace parameters with a gimple_match_op *.
16260 (maybe_build_generic_op): Likewise.
16261 (gimple_simplified_result_is_gimple_val): Replace parameters with
16262 a const gimple_match_op *.
16263 (gimple_simplify): Replace code_helper * and tree * parameters with
16264 a gimple_match_op * parameter.
16265 (gimple_resimplify1): Replace code_helper *, tree and tree *
16266 parameters with a gimple_match_op * parameter.
16267 (gimple_resimplify2): Likewise.
16268 (gimple_resimplify3): Likewise.
16269 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16270 parameters with a gimple_match_op * parameter.
16271 * gimple-match-head.c (gimple_simplify): Change prototypes of
16272 auto-generated functions to take a gimple_match_op * instead of
16273 separate code_helper * and tree * parameters. Make the same
16274 change in the top-level overload and update calls to the
16275 gimple_resimplify routines. Update calls to the auto-generated
16276 functions and to maybe_push_res_to_seq in the publicly-facing
16277 operation-specific gimple_simplify overloads.
16278 (gimple_match_op::MAX_NUM_OPS): Define.
16279 (gimple_resimplify1): Replace rcode and ops with a single res_op
16280 parameter. Update call to gimple_simplify.
16281 (gimple_resimplify2): Likewise.
16282 (gimple_resimplify3): Likewise.
16283 (mprts_hook): Replace parameters with a gimple_match_op *.
16284 (maybe_build_generic_op): Likewise.
16285 (build_call_internal): Replace type, nargs and ops with
16286 a gimple_match_op *.
16287 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16288 with a single gimple_match_op *. Update calls to mprts_hook,
16289 build_call_internal and gimple_simplified_result_is_gimple_val.
16290 Factor out code that is common to the tree_code and combined_fn cases.
16291 * genmatch.c (expr::gen_transform): Replace tem_code and
16292 tem_ops with a gimple_match_op called tem_op. Update calls
16293 to the gimple_resimplify functions and maybe_push_res_to_seq.
16294 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16295 res_ops. Update call to the gimple_resimplify functions.
16296 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16297 (decision_tree::gen): Make the functions take a gimple_match_op *
16298 called res_op instead of separate res_code and res_ops parameters.
16299 Update call accordingly.
16300 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16301 and ops with a single res_op parameter. Update calls to
16302 maybe_build_generic_op and maybe_push_res_to_seq.
16303 (fold_stmt_1): Update calls to gimple_simplify and
16304 replace_stmt_with_simplification.
16305 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16306 and gimple_simplified_result_is_gimple_val.
16307 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16308 gimple_simplify.
16309 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16310 with a gimple_match_op *.
16311 (vn_nary_build_or_lookup): Likewise. Update call to
16312 vn_nary_build_or_lookup_1.
16313 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16314 gimple_match_op *. Update calls to the gimple_resimplify routines
16315 and to gimple_simplified_result_is_gimple_val.
16316 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16317 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16318 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16319 (visit_nary_op): Likewise.
16320 (visit_reference_op_load): Likewise.
16321
16322 2018-05-23 Luis Machado <luis.machado@linaro.org>
16323
16324 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16325 modifier for printing the step amount.
16326
16327 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
16328
16329 PR target/78849
16330 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16331 types.
16332
16333 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
16334
16335 * doc/sourcebuild.texi (Endianness): New subsubsection.
16336
16337 2018-05-23 Luis Machado <luis.machado@linaro.org>
16338
16339 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16340 <prefetch_dynamic_strides>: New const bool field.
16341 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16342 prefetch_dynamic_strides.
16343 (exynosm1_prefetch_tune): Likewise.
16344 (thunderxt88_prefetch_tune): Likewise.
16345 (thunderx_prefetch_tune): Likewise.
16346 (thunderx2t99_prefetch_tune): Likewise.
16347 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16348 false.
16349 (aarch64_override_options_internal): Update to set
16350 PARAM_PREFETCH_DYNAMIC_STRIDES.
16351 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16352 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16353 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16354 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16355 prefetch-dynamic-strides setting.
16356
16357 2018-05-23 Luis Machado <luis.machado@linaro.org>
16358
16359 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16360 <minimum_stride>: New const int field.
16361 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16362 minimum_stride field defaulting to -1.
16363 (exynosm1_prefetch_tune): Likewise.
16364 (thunderxt88_prefetch_tune): Likewise.
16365 (thunderx_prefetch_tune): Likewise.
16366 (thunderx2t99_prefetch_tune): Likewise.
16367 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16368 <default_opt_level>: Set to 3.
16369 (aarch64_override_options_internal): Update to set
16370 PARAM_PREFETCH_MINIMUM_STRIDE.
16371 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16372 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16373 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16374 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16375 stride is constant and is below the minimum stride threshold.
16376
16377 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16378
16379 * config/arm/arm-cpus.in (mode26): Delete.
16380 (armv4): Delete mode26 reference.
16381 * config/arm/arm.c (arm_configure_build_target): Delete use of
16382 isa_bit_mode26.
16383
16384 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16385
16386 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16387 New insn pattern.
16388 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16389 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16390 for non-SSE modes.
16391 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16392 (floatunsdidf2): Ditto.
16393
16394 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16395
16396 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16397 (fixuns_trunc<mode>si2_avx512f): Ditto.
16398 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16399 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16400 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16401
16402 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16403
16404 PR rtl-optimization/79985
16405 * df-scan.c (df_insn_refs_collect): Remove special case for
16406 global registers and asm statements.
16407
16408 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16409
16410 * extend.texi (Global Register Variables): Rewrite the bullet list.
16411 Note that the register is available for allocation. Note that access
16412 via inline asm must use constraints. Add note about async-signal
16413 handlers. Remove paragraph about automagic register selection.
16414
16415 2018-05-23 Richard Biener <rguenther@suse.de>
16416
16417 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16418 of fixed offset from memset VN.
16419
16420 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16421
16422 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16423 first_interp field.
16424 (alloc_cand_and_find_basis): Initialize first_interp field.
16425 (slsr_process_mul): Modify first_interp field.
16426 (slsr_process_add): Likewise.
16427 (slsr_process_cast): Modify first_interp field for each new
16428 interpretation.
16429 (slsr_process_copy): Likewise.
16430 (dump_candidate): Dump first_interp field.
16431 (replace_mult_candidate): Process all interpretations, not just
16432 subsequent ones.
16433 (replace_rhs_if_not_dup): Likewise.
16434 (replace_one_candidate): Likewise.
16435
16436 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16437
16438 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16439 Add new boolean.
16440 (aarch64_needs_frame_chain): New function.
16441 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16442
16443 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16444
16445 PR target/84882
16446 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16447 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16448 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16449 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16450 as true for strict-align.
16451 (aarch64_can_inline_p): Perform checks even when callee has no
16452 attributes to check for strict alignment.
16453 * doc/extend.texi (AArch64 Function Attributes): Document
16454 no-strict-align.
16455 * doc/invoke.texi: (AArch64 Options): Likewise.
16456
16457 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16458
16459 PR tree-optimization/85853
16460 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16461 the handling of the root of the node to...
16462 (vect_slp_analyze_node_operations_1): ...this new function,
16463 and run the whole thing with the child nodes' def types
16464 set according to their SLP node's def type.
16465
16466 2018-05-23 Richard Biener <rguenther@suse.de>
16467
16468 PR middle-end/85874
16469 * tree-data-ref.c (create_runtime_alias_checks): Defer
16470 and ignore overflow warnings.
16471
16472 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16473
16474 PR tree-optimization/85822
16475 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16476 constants.
16477
16478 2018-05-23 Richard Biener <rguenther@suse.de>
16479
16480 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16481 memset constants via native_interpret_expr.
16482
16483 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16484
16485 PR target/85345
16486 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16487 attribute.
16488 (cgraph_node::create_alias): Likewise.
16489 (cgraph_node::get_availability): Check ifunc_resolver instead
16490 of looking up ifunc attribute.
16491 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16492 * varasm.c (do_assemble_alias): Likewise.
16493 (assemble_alias): Likewise.
16494 (default_binds_local_p_3): Likewise.
16495 * cgraph.h (cgraph_node): Add ifunc_resolver.
16496 (cgraph_node::only_called_directly_or_aliased_p): Return false
16497 for IFUNC resolver.
16498 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16499 attribute.
16500 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16501 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16502 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16503 instead of looking up ifunc attribute.
16504
16505 2018-05-22 Luis Machado <luis.machado@linaro.org>
16506
16507 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16508
16509 2018-05-22 Martin Sebor <msebor@redhat.com>
16510
16511 PR middle-end/85359
16512 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16513 only when expasion succeeds.
16514 (expand_builtin_strcmp): Same.
16515 (expand_builtin_strncmp): Same.
16516
16517 2018-05-22 Martin Sebor <msebor@redhat.com>
16518
16519 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16520
16521 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16522 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16523
16524 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16525 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16526 code.
16527 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16528 Add check for legitimate_address.
16529 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16530 (aarch64_swap_ldrstr_operands): New.
16531 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16532 Define prototype.
16533
16534 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16535 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16536
16537 * config/aarch64/aarch64.md: New patterns to generate stp
16538 and ldp.
16539 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16540 single words and double words.
16541 (load_pair_sw, load_pair_dw): Likewise.
16542 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16543 Delete.
16544 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16545 Delete.
16546 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16547 for different mode ldpstp and add peephole for merged zero stores.
16548 Likewise for loads.
16549 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16550 Add size check.
16551 (aarch64_gen_store_pair): Rename calls to match new patterns.
16552 (aarch64_gen_load_pair): Rename calls to match new patterns.
16553 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16554 (load_pair<DREG:mode><DREG2:mode>): ... This.
16555 (store_pair<mode>): Rename to...
16556 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16557 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16558 New mode iterators.
16559 (V_INT_EQUIV): Handle SImode.
16560 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16561 New predicate.
16562
16563 2018-05-22 Martin Sebor <msebor@redhat.com>
16564
16565 PR c/85623
16566 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16567 or ajust the presumed bound on an operation to avoid unnecessary
16568 warnings.
16569
16570 2018-05-22 Martin Sebor <msebor@redhat.com>
16571
16572 PR tree-optimization/85826
16573 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16574 assuming that a DECL necesarily has a constant size.
16575
16576 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16577
16578 PR middle-end/85862
16579 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16580
16581 2018-05-22 Richard Biener <rguenther@suse.de>
16582
16583 PR tree-optimization/85834
16584 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16585 non-constant and non-zero memset arguments.
16586
16587 2018-05-22 Martin Liska <mliska@suse.cz>
16588
16589 PR ipa/85607
16590 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16591
16592 2018-05-22 Richard Biener <rguenther@suse.de>
16593
16594 PR tree-optimization/85863
16595 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16596 comparisons when vectype is specified.
16597 (vectorizable_condition): Do not specify vectype for
16598 vect_is_simple_cond when SLP vectorizing.
16599
16600 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16601
16602 PR target/85657
16603 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16604 define __ibm128 as long double.
16605 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16606 as a distinct type when IEEE 128-bit support is enabled.
16607 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16608 128-bit types to use the correct functions.
16609 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16610 convert between 128-bit floating point types that have different
16611 modes but the same representation, instead of using gen_lowpart to
16612 makean alias.
16613 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16614 KFmode.
16615 (IFKF_reg): New attributes to give the register constraints for
16616 IFmode and KFmode.
16617 (extend<mode>tf2_internal): New insns to mark an explicit
16618 conversion between 128-bit floating point types that have a
16619 different mode but share the same representation.
16620
16621 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16622
16623 PR tree-optimization/85814
16624 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16625 a null return from get_strinfo when unsharing the next
16626 strinfo in the chain.
16627
16628 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16629
16630 PR gcc/84923
16631 * varasm.c (weak_finish): Clean up weak_decls.
16632
16633 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16634
16635 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16636 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16637 UNSPEC_UADALP values.
16638 * config/aarch64/iterators.md (ABAL): New int iterator.
16639 (ABDL2): Likewise.
16640 (ADALP): Likewise.
16641 (sur): Add mappings for the above.
16642 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16643 New define_insn.
16644 (aarch64_<sur>abal<mode>_4): Likewise.
16645 (aarch64_<sur>adalp<mode>_3): Likewise.
16646 (<sur>sadv16qi): New define_expand.
16647
16648 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16649
16650 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16651 (*movdf_internal): Ditto.
16652 (*rcpsf2_sse): Ditto.
16653 (*rsqrtsf2_sse): Ditto.
16654 (*sqrt<mode>2_sse): Ditto.
16655
16656 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16657
16658 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16659 eor3q<mode>4.
16660 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16661 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16662 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16663 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16664 vbcaxq_s64): New.
16665 * config/aarch64/arm_neon.h: Likewise.
16666 * config/aarch64/iterators.md (VQ_I): New.
16667
16668 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16669
16670 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16671 arc*-*-linux*.
16672 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16673 MULTILIB_DIRNAMES
16674
16675 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16676
16677 * config/nds32/constraints.md (S): New constraint.
16678 * config/nds32/nds32.md (call_internal): Use constraint S.
16679 (call_value_internal): Likewise.
16680 (sibcall_internal): Likewise.
16681 (sibcall_value_internal): Likewise.
16682
16683 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16684 Chung-Ju Wu <jasonwucj@gmail.com>
16685
16686 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16687 into consideration.
16688
16689 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16690 Chung-Ju Wu <jasonwucj@gmail.com>
16691
16692 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16693 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16694 (nds32_rtx_costs_impl): Simplify.
16695 (nds32_address_cost_impl): Simplify.
16696 (nds32_init_rtx_costs): New function.
16697 (nds32_rtx_costs_speed_prefer): Likewise.
16698 (nds32_rtx_costs_size_prefer): Likewise.
16699 (nds32_address_cost_speed_prefer): Likewise.
16700 (nds32_address_cost_speed_fwprop): Likewise.
16701 (nds32_address_cost_size_prefer): Likewise.
16702 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16703 * config/nds32/nds32.c (nds32_option_override): Use
16704 nds32_init_rtx_costs function.
16705
16706 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16707
16708 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16709 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16710 (TARGET_PIPELINE_N8): Likewise.
16711 (TARGET_PIPELINE_N10): Likewise.
16712 (TARGET_PIPELINE_N13): Likewise.
16713 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16714
16715 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16716
16717 * config/nds32/nds32-fpu.md: Update copyright year.
16718
16719 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16720
16721 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16722
16723 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16724
16725 * config/nds32/nds32.c
16726 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16727 * config/nds32/nds32.opt (minline-asm-r15): New option.
16728
16729 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16730
16731 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16732 MASK_HW_ABS.
16733 * config/nds32/nds32.md (abssi2): New pattern.
16734
16735 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16736
16737 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16738 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16739 Merge insn pattern from sse_cvtsi2ss<round_name> and
16740 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16741 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16742 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16743 using SWI48 mode iterator.
16744 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16745 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16746 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16747 pattern from sse_cvttss2si<round_saeonly_name>
16748 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16749 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16750 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16751 using SWI48 mode iterator.
16752 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16753 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16754 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16755 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16756 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16757 using SWI48 mode iterator.
16758 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16759 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16760 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16761 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16762 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16763 SWI48 mode iterator.
16764 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16765 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16766 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16767 pattern from sse_cvttsd2si<round_saeonly_name>
16768 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16769
16770 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16771
16772 * config/nds32/nds32-md-auxiliary.c
16773 (nds32_valid_smw_lwm_base_p): Refine.
16774 (nds32_output_smw_single_word): Refine.
16775 (nds32_output_smw_double_word): New.
16776 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16777
16778 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16779
16780 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16781 (nds32_output_stack_pop): Refine.
16782 (nds32_expand_unaligned_load): Refine.
16783 (nds32_expand_unaligned_store): Refine.
16784
16785 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16786 Chung-Ju Wu <jasonwucj@gmail.com>
16787
16788 * config/nds32/constants.md: Add TP_REGNUM constant.
16789 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16790 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16791 UNSPEC_ADD32.
16792 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16793 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16794 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16795 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16796 and PIC code generation.
16797 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16798 code generation.
16799 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16800 optimization.
16801 * config/nds32/nds32.md: Support TLS and PIC.
16802 * config/nds32/nds32.c: Support TLS and PIC.
16803 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16804 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16805 predicate.
16806
16807 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16808
16809 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16810 mode with E_ prefix.
16811
16812 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16813 Chung-Ju Wu <jasonwucj@gmail.com>
16814
16815 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16816 * config/nds32/nds32-md-auxiliary.c
16817 (symbolic_reference_mentioned_p): New.
16818 (nds32_legitimize_ict_address): New.
16819 (nds32_expand_ict_move): New.
16820 (nds32_indirect_call_referenced_p): New.
16821 (nds32_symbol_binds_local_p): Delete.
16822 (nds32_long_call_p): Modify.
16823 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16824 * config/nds32/nds32-protos.h
16825 (symbolic_reference_mentioned_p): Declare.
16826 (nds32_legitimize_ict_address): Declare.
16827 (nds32_expand_ict_move): Declare.
16828 (nds32_indirect_call_referenced_p): Declare.
16829 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16830 (nds32_relax_group): Use nds32_ict_const_p as condition.
16831 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16832 (nds32_asm_file_start): Output ict_model directive in asm code.
16833 (nds32_legitimate_address_p): Consider indirect call.
16834 (nds32_print_operand): Consider indirect call.
16835 (nds32_print_operand_address): Consider indirect call.
16836 (nds32_insert_attributes): Handle "indirect_call" attribute.
16837 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16838 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16839 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16840 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16841 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16842 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16843 (TARGET_ICT_MODEL_SMALL): Define.
16844 (TARGET_ICT_MODEL_LARGE): Define.
16845 * config/nds32/nds32.md (movsi): Consider ict model.
16846 (call, call_value): Consider ict model.
16847 (sibcall, sibcall_value): Consider ict model.
16848 * config/nds32/nds32.opt (mict-model): New option.
16849 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16850 model.
16851
16852 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16853 Monk Chiang <sh.chiang04@gmail.com>
16854 Jim Wilson <jimw@sifive.com>
16855
16856 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16857 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16858 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16859 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16860 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16861 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16862 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16863 compute save_libcall_adjustment properly.
16864 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16865 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16866 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16867 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16868 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16869 (ABI_SPEC): Handle mabi=ilp32e.
16870 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16871 (RVE): Add RVE mask.
16872 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16873 <-march>: Add rv32e as an example.
16874
16875 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16876
16877 PR c++/82899
16878 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16879 (intra_create_variable_infos): Handle C++ constructors.
16880
16881 2018-05-18 Martin Liska <mliska@suse.cz>
16882
16883 * passes.def: Remove a redundant pass.
16884
16885 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16886
16887 PR bootstrap/85838
16888 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16889
16890 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16891
16892 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16893 (ARMv4): Update.
16894 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16895 (ARMv6m): Update.
16896 (armv2, armv2a, armv3, armv3m): Delete architectures.
16897 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16898 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16899 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16900 Delete cpus.
16901 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16902 (*mulsidi3adddi): Likewise.
16903 (mulsidi3): Likewise.
16904 (*mulsidi3_nov6): Likewise.
16905 (umulsidi3): Likewise.
16906 (umulsidi3_nov6): Likewise.
16907 (umaddsidi4): Likewise.
16908 (*umulsidi3adddi): Likewise.
16909 (smulsi3_highpart): Likewise.
16910 (*smulsi3_highpart_nov6): Likewise.
16911 (umulsi3_highpart): Likewise.
16912 (*umulsi3_highpart_nov6): Likewise.
16913 * config/arm/arm.h (arm_arch3m): Delete.
16914 * config/arm/arm.c (arm_arch3m): Delete.
16915 (arm_option_override_internal): Update armv3-related comment.
16916 (arm_configure_build_target): Delete use of isa_bit_mode32.
16917 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16918 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16919 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16920 (mulsa3): Likewise.
16921 (mulusa3): Likewise.
16922 * config/arm/arm-protos.h (arm_arch3m): Delete.
16923 * config/arm/arm-tables.opt: Regenerate.
16924 * config/arm/arm-tune.md: Likewise.
16925 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16926 deleted architectures.
16927
16928 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16929
16930 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16931 (armv5t, armv5te): New features.
16932 (ARMv5, ARMv5e): Delete fgroups.
16933 (ARMv5t, ARMv5te): Adjust for above changes.
16934 (ARMv6m): Likewise.
16935 (armv5, armv5e): Delete arches.
16936 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16937 arm_arch5.
16938 (*call_reg_arm): Likewise.
16939 (*call_value_reg_armv5): Likewise.
16940 (*call_value_reg_arm): Likewise.
16941 (*call_symbol): Likewise.
16942 (*call_value_symbol): Likewise.
16943 (*sibcall_insn): Likewise.
16944 (*sibcall_value_insn): Likewise.
16945 (clzsi2): Likewise.
16946 (prefetch): Likewise.
16947 (define_split and define_peephole2 dependent on arm_arch5):
16948 Likewise.
16949 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16950 arm_arch5e.
16951 (TARGET_ARM_QBIT): Likewise.
16952 (TARGET_DSP_MULTIPLY): Likewise.
16953 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16954 (arm_arch5, arm_arch5e): Delete.
16955 (arm_arch5t, arm_arch5te): Declare.
16956 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16957 (arm_arch5t): Declare.
16958 (arm_option_reconfigure_globals): Update for the above.
16959 (arm_options_perform_arch_sanity_checks): Update comment, replace
16960 use of arm_arch5 with arm_arch5t.
16961 (use_return_insn): Likewise.
16962 (arm_emit_call_insn): Likewise.
16963 (output_return_instruction): Likewise.
16964 (arm_final_prescan_insn): Likewise.
16965 (arm_coproc_builtin_available): Likewise.
16966 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16967 arm_arch5e with arm_arch5t and arm_arch5te.
16968 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16969 (arm_arch5t, arm_arch5te): Declare.
16970 * config/arm/arm-tables.opt: Regenerate.
16971 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16972 * config/arm/t-multilib: Likewise.
16973 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16974 instead of arm_arch5.
16975 (*call_reg_thumb1): Likewise.
16976 (*call_value_reg_thumb1_v5): Likewise.
16977 (*call_value_reg_thumb1): Likewise.
16978 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16979 unreachable path.
16980 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16981
16982 2018-05-18 Martin Liska <mliska@suse.cz>
16983
16984 PR gcov-profile/84846
16985 * doc/gcov.texi: Document -t option of gcov tool.
16986
16987 2018-05-18 Martin Liska <mliska@suse.cz>
16988
16989 PR gcov-profile/84846
16990 * gcov.c (print_usage): Add new -t option.
16991 (process_args): Handle the option.
16992 (generate_results): Use stdout as output when requested by
16993 the option.
16994
16995 2018-05-18 Martin Liska <mliska@suse.cz>
16996
16997 PR gcov-profile/84846
16998 * coverage.c (coverage_init): Write PWD to .gcno file.
16999 * doc/gcov.texi: Document how working directory is printed.
17000 * gcov-dump.c (dump_gcov_file): Print PWD.
17001 * gcov.c (output_intermediate_file): Likewise.
17002 (read_graph_file): Read PWD string.
17003 (output_lines): Print PWD.
17004
17005 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17006
17007 PR middle-end/85817
17008 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
17009 for retval and return false if all args to phi are zero.
17010
17011 2018-05-18 Richard Biener <rguenther@suse.de>
17012
17013 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
17014 method.
17015 (evrp_dom_walker::before_dom_children): Call it.
17016
17017 2018-05-18 Richard Biener <rguenther@suse.de>
17018
17019 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
17020 results when processing array refs with variable index.
17021
17022 2018-05-18 Toon Moene <toon@moene.org>
17023
17024 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
17025 directly after that of -floop-interchange. Indicate that both
17026 options are enabled by default when specifying -O3.
17027
17028 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17029
17030 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
17031 iterator. Delete separate integer-mode vec_set<mode> expander.
17032 (aarch64_simd_vec_setv2di): Delete.
17033 (vec_setv2di): Delete.
17034 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
17035 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
17036 the "w, r" alternative.
17037
17038 2018-05-18 Martin Liska <mliska@suse.cz>
17039
17040 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
17041 * tree-pass.h (make_pass_lower_switch_O0): New function.
17042 * tree-switch-conversion.c (node_has_low_bound): Remove.
17043 (node_has_high_bound): Likewise.
17044 (node_is_bounded): Likewise.
17045 (class pass_lower_switch): Make it a template type and create
17046 two instances.
17047 (pass_lower_switch::execute): Add template argument.
17048 (make_pass_lower_switch): New function.
17049 (make_pass_lower_switch_O0): New function.
17050 (do_jump_if_equal): Remove.
17051 (emit_case_nodes): Simplify to just handle all 3 cases and leave
17052 all the hard work to tree optimization passes.
17053
17054 2018-05-18 Martin Liska <mliska@suse.cz>
17055
17056 * dbgcnt.c (limit_low): Renamed from limit.
17057 (limit_high): New variable.
17058 (dbg_cnt_is_enabled): Check for upper limit.
17059 (dbg_cnt): Adjust dumping.
17060 (dbg_cnt_set_limit_by_index): Add new argument for high
17061 value.
17062 (dbg_cnt_set_limit_by_name): Likewise.
17063 (dbg_cnt_process_single_pair): Parse new format.
17064 (dbg_cnt_process_opt): Use strtok.
17065 (dbg_cnt_list_all_counters): Remove 'value' and add
17066 'limit_high'.
17067 * doc/invoke.texi: Document changes.
17068
17069 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
17070
17071 * doc/sourcebuild.texi (scalar_all_fma): Document.
17072 * tree.def (FMA_EXPR): Delete.
17073 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
17074 * internal-fn.c (ternary_direct): New macro.
17075 (expand_ternary_optab_fn): Likewise.
17076 (direct_ternary_optab_supported_p): Likewise.
17077 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
17078 * builtins.c (fold_builtin_fma): Delete.
17079 (fold_builtin_3): Don't call it.
17080 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
17081 * expr.c (expand_expr_real_2): Likewise.
17082 * fold-const.c (operand_equal_p): Likewise.
17083 (fold_ternary_loc): Likewise.
17084 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
17085 * gimple.c (DEFTREECODE): Likewise.
17086 * gimplify.c (gimplify_expr): Likewise.
17087 * optabs-tree.c (optab_for_tree_code): Likewise.
17088 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17089 * tree-eh.c (operation_could_trap_p): Likewise.
17090 (stmt_could_throw_1_p): Likewise.
17091 * tree-inline.c (estimate_operator_cost): Likewise.
17092 * tree-pretty-print.c (dump_generic_node): Likewise.
17093 (op_code_prio): Likewise.
17094 * tree-ssa-loop-im.c (stmt_cost): Likewise.
17095 * tree-ssa-operands.c (get_expr_operands): Likewise.
17096 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
17097 * fold-const-call.h (fold_fma): Delete.
17098 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
17099 CFN_FNMA and CFN_FNMS.
17100 (fold_fma): Delete.
17101 * genmatch.c (combined_fn): New enum.
17102 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
17103 (commutative_op): New function.
17104 (commutate): Use it. Handle more than 2 operands.
17105 (dt_operand::gen_gimple_expr): Use commutative_op.
17106 (parser::parse_expr): Allow :c to be used with non-binary
17107 operators if the commutative operand is known.
17108 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
17109 CFN_FMS, CFN_FNMA and CFN_FNMS.
17110 (backprop::process_assign_use): Remove FMA_EXPR handling.
17111 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
17112 (gen_hsa_fma): New function.
17113 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
17114 IFN_FNMA and IFN_FNMS.
17115 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
17116 * gimple-fold.h (follow_all_ssa_edges): Declare.
17117 * gimple-fold.c (follow_all_ssa_edges): New function.
17118 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
17119 gimple_build interface and use follow_all_ssa_edges to fold the result.
17120 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
17121 instead of checking for optabs directly.
17122 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
17123 rather than FMA_EXPRs.
17124 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
17125 call to IFN_FMA instead of an FMA_EXPR.
17126
17127 2018-05-17 Jim Wilson <jimw@sifive.com>
17128
17129 * expr.c (do_tablejump): When converting index to Pmode, if we have a
17130 sign extended promoted subreg, and the range does not have the sign bit
17131 set, then do a sign extend.
17132
17133 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
17134 test, check for sign extended subreg and/or constant operands, and
17135 do a sign extend in that case.
17136
17137 2018-05-17 Steve Ellcey <sellcey@cavium.com>
17138
17139 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
17140 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
17141 Add untyped.
17142 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
17143 Change logics_shift_reg to logics_shift_imm.
17144 (thunderx2t99_fp_loadpair_basic): Delete.
17145 (thunderx2t99_fp_storepair_basic): Delete.
17146 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
17147 (thunderx2t99_asimd_polynomial): Delete.
17148 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
17149 and neon_fp_mul_d_scalar_q.
17150 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
17151 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
17152 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
17153 (thunderx2t99_asimd_lut): Add missing tbl types.
17154 (thunderx2t99_asimd_ext): Delete.
17155 (thunderx2t99_asimd_load1_1_mult): Delete.
17156 (thunderx2t99_asimd_load1_2_mult): Delete.
17157 (thunderx2t99_asimd_load1_ldp): New.
17158 (thunderx2t99_asimd_load1): New.
17159 (thunderx2t99_asimd_load2): Add missing *load2* types.
17160 (thunderx2t99_asimd_load3): New.
17161 (thunderx2t99_asimd_load4): New.
17162 (thunderx2t99_asimd_store1_1_mult): Delete.
17163 (thunderx2t99_asimd_store1_2_mult): Delete.
17164 (thunderx2t99_asimd_store2_mult): Delete.
17165 (thunderx2t99_asimd_store2_onelane): Delete.
17166 (thunderx2t99_asimd_store_stp): New.
17167 (thunderx2t99_asimd_store1): New.
17168 (thunderx2t99_asimd_store2): New.
17169 (thunderx2t99_asimd_store3): New.
17170 (thunderx2t99_asimd_store4): New.
17171
17172 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
17173
17174 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17175 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
17176
17177 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
17178 Segher Boessenkool <segher@kernel.crashing.org>
17179
17180 PR target/85698
17181 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17182 operand.
17183
17184 2018-05-17 Richard Biener <rguenther@suse.de>
17185
17186 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17187 for pruning loop and prune defs feeding only already visited PHIs.
17188
17189 2018-05-17 Richard Biener <rguenther@suse.de>
17190
17191 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17192
17193 2018-05-17 Bin Cheng <bin.cheng@arm.com>
17194 Richard Biener <rguenther@suse.de>
17195
17196 PR tree-optimization/85793
17197 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17198 for VMAT_ELEMENTWISE.
17199
17200 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17201
17202 * internal-fn.h (lookup_internal_fn): Declare
17203 * internal-fn.c (lookup_internal_fn): New function.
17204 * gimple.c (gimple_build_call_from_tree): Handle calls to
17205 internal functions.
17206 * gimple-pretty-print.c (dump_gimple_call): Print "." before
17207 internal function names.
17208 * tree-pretty-print.c (dump_generic_node): Likewise.
17209 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17210
17211 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17212
17213 * gimple-fold.h (gimple_build): Make the function forms take
17214 combined_fn rather than built_in_function.
17215 (gimple_simplify): Likewise.
17216 * gimple-match-head.c (gimple_simplify): Likewise.
17217 * gimple-fold.c (gimple_build): Likewise.
17218 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17219 rather than gimple_build_call_internal.
17220 (get_initial_defs_for_reduction): Likewise.
17221 (vect_create_epilog_for_reduction): Likewise.
17222 (vectorizable_live_operation): Likewise.
17223
17224 2018-05-17 Martin Liska <mliska@suse.cz>
17225
17226 * gimple-ssa-sprintf.c (format_directive): Do not use
17227 space in between 'G_' and '('.
17228
17229 2018-05-17 Jakub Jelinek <jakub@redhat.com>
17230
17231 PR target/85323
17232 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17233 even if the mask is not all ones.
17234
17235 PR target/85323
17236 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17237 vector.
17238 (ix86_gimple_fold_builtin): Likewise.
17239
17240 PR target/85323
17241 * config/i386/i386.c: Include tree-vector-builder.h.
17242 (ix86_vector_shift_count): New function.
17243 (ix86_fold_builtin): Fold shift builtins by scalar count.
17244 (ix86_gimple_fold_builtin): Likewise.
17245
17246 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17247 _mm512_setzero): New intrinsics.
17248
17249 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
17250 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17251
17252 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17253 code generation for cases where splatting a value is not useful.
17254 * simplify-rtx.c (simplify_ternary_operation): Simplify
17255 vec_merge across a vec_duplicate and a paradoxical subreg forming
17256 a vector mode to a vec_concat.
17257
17258 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
17259
17260 * config.gcc: Support "goldmont-plus".
17261 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17262 "goldmont-plus".
17263 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17264 PROCESSOR_GOLDMONT_PLUS.
17265 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17266 (processor_target_table): Add "goldmont-plus".
17267 (PTA_GOLDMONT_PLUS): Define.
17268 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17269 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17270 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17271 (fold_builtin_cpu): Add "goldmont-plus".
17272 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17273 (ix86_option_override_internal): Add "goldmont-plus".
17274 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17275 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17276 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17277 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17278
17279 2018-05-17 Richard Biener <rguenther@suse.de>
17280
17281 PR tree-optimization/85757
17282 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17283 remove defs that only feed that PHI from further processing.
17284
17285 2018-05-16 Jim Wilson <jimw@sifive.com>
17286
17287 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17288 asterisk to name.
17289 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17290
17291 2018-05-16 Mark Wielaard <mark@klomp.org>
17292
17293 * dwarf2out.c (count_index_strings): New function.
17294 (output_indirect_strings): Call count_index_strings and generate
17295 header for dwarf_version >= 5.
17296
17297 2018-05-16 Mark Wielaard <mark@klomp.org>
17298
17299 * dwarf2out.c (dwarf_FORM): New function.
17300 (set_indirect_string): Use dwarf_FORM.
17301 (reset_indirect_string): Likewise.
17302 (size_of_die): Likewise.
17303 (value_format): Likewise.
17304 (output_die): Likewise.
17305 (add_skeleton_AT_string): Likewise.
17306 (output_macinfo_op): Likewise.
17307 (index_string): Likewise.
17308 (output_index_string_offset): Likewise.
17309 (output_index_string): Likewise.
17310 (count_index_strings): Likewise.
17311
17312 2018-05-16 Carl Love <cel@us.ibm.com>
17313
17314 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17315 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17316
17317 2018-05-16 Martin Jambor <mjambor@suse.cz>
17318
17319 * ipa-prop.c (ipa_free_all_edge_args): Remove.
17320 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17321
17322 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
17323
17324 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17325 (fnma<mode>4): Likewise.
17326 (fms<mode>4): Likewise.
17327 (fnms<mode>4): Likewise.
17328 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17329 (aarch64_fnma<mode>4): Likewise.
17330 (aarch64_fms<mode>4): Likewise.
17331 (aarch64_fnms<mode>4): Likewise.
17332 (aarch64_fnmadd<mode>4): Likewise.
17333
17334 2018-05-16 Jason Merrill <jason@redhat.com>
17335
17336 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
17337
17338 2018-05-16 Richard Biener <rguenther@suse.de>
17339
17340 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17341 (dump_stmt_cost): Declare.
17342 (add_stmt_cost): Dump cost we add.
17343 (add_stmt_costs): New function.
17344 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17345 No longer exported.
17346 (vect_analyze_stmt): Adjust prototype.
17347 (vectorizable_condition): Likewise.
17348 (vectorizable_live_operation): Likewise.
17349 (vectorizable_reduction): Likewise.
17350 (vectorizable_induction): Likewise.
17351 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17352 cost vector to pass to vectorizable_ and record afterwards.
17353 (vect_model_reduction_cost): Take cost vector argument and adjust.
17354 (vect_model_induction_cost): Likewise.
17355 (vectorizable_reduction): Likewise.
17356 (vectorizable_induction): Likewise.
17357 (vectorizable_live_operation): Likewise.
17358 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17359 SLP_TREE_NUMBER_OF_VEC_STMTS.
17360 (vect_analyze_slp_cost_1): Remove.
17361 (vect_analyze_slp_cost): Likewise.
17362 (vect_slp_analyze_node_operations): Take visited args and
17363 a target cost vector. Avoid processing already visited stmt sets.
17364 (vect_slp_analyze_operations): Use a local cost vector to gather
17365 costs and register those of non-discarded instances.
17366 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17367 (vect_schedule_slp_instance): Remove copying of
17368 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
17369 zero.
17370 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17371 adding cost. Record cost entry location.
17372 (vect_prologue_cost_for_slp_op): Function to compute cost of
17373 a constant or invariant generated for SLP vect in the prologue,
17374 split out from vect_analyze_slp_cost_1.
17375 (vect_model_simple_cost): Make static. Adjust for SLP costing.
17376 (vect_model_promotion_demotion_cost): Likewise.
17377 (vect_model_store_cost): Likewise, make static.
17378 (vect_model_load_cost): Likewise.
17379 (vectorizable_bswap): Add cost vector arg and adjust.
17380 (vectorizable_call): Likewise.
17381 (vectorizable_simd_clone_call): Likewise.
17382 (vectorizable_conversion): Likewise.
17383 (vectorizable_assignment): Likewise.
17384 (vectorizable_shift): Likewise.
17385 (vectorizable_operation): Likewise.
17386 (vectorizable_store): Likewise.
17387 (vectorizable_load): Likewise.
17388 (vectorizable_condition): Likewise.
17389 (vectorizable_comparison): Likewise.
17390 (can_vectorize_live_stmts): Likewise.
17391 (vect_analyze_stmt): Likewise.
17392 (vect_transform_stmt): Adjust calls to vectorizable_*.
17393 * tree-vectorizer.c: Include gimple-pretty-print.h.
17394 (dump_stmt_cost): New function.
17395
17396 2018-05-16 Richard Biener <rguenther@suse.de>
17397
17398 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17399 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17400 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17401 (check_name): New callback.
17402 (dse_classify_store): Track cycles via a visited bitmap of PHI
17403 defs and simplify handling of in-loop and across loop dead stores
17404 and properly fail for loop-variant refs. Handle byte-tracking with
17405 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17406 limiting the walk.
17407
17408 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17409
17410 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17411 (vect_get_mask_type_for_stmt): Likewise.
17412 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17413 split out from...
17414 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17415 to determine the statement's vector type and the vector type that
17416 should be used for calculating nunits. Deal with cases in which
17417 the type has to be deferred.
17418 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17419 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17420 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17421 (vect_determine_vf_for_stmt): New functions, split out from...
17422 (vect_determine_vectorization_factor): ...here.
17423 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17424 (vect_get_mask_type_for_stmt): New functions, split out from
17425 vect_determine_vectorization_factor.
17426
17427 2018-05-16 Richard Biener <rguenther@suse.de>
17428
17429 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17430 verify the [VEC_]COND_EXPR embedded comparison.
17431
17432 2018-05-15 Martin Sebor <msebor@redhat.com>
17433
17434 PR tree-optimization/85753
17435 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17436 RECORD_TYPE in addition to ARRAY_TYPE.
17437
17438 2018-05-15 Martin Sebor <msebor@redhat.com>
17439
17440 PR middle-end/85643
17441 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17442
17443 2018-05-15 Richard Biener <rguenther@suse.de>
17444
17445 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17446 add by_clobber_p one. Change algorithm to collect all defs
17447 representing uses we need to walk and try reducing them to
17448 a single one before failing.
17449 (dse_dom_walker::dse_optimize_stmt): Adjust.
17450
17451 2018-05-13 Mark Wielaard <mark@klomp.org>
17452
17453 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17454 (size_of_loc_descr): Likewise.
17455 (output_loc_operands): Likewise.
17456 (output_loc_operands_raw): Likewise.
17457 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17458 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17459 (hash_loc_operands): Likewise.
17460 (compare_loc_operands): Likewise.
17461
17462 2018-05-14 Mark Wielaard <mark@klomp.org>
17463
17464 * dwarf2out.c (count_index_addrs): New function.
17465 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17466
17467 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17468
17469 PR tree-optimization/83648
17470 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17471 return value as malloc candidate.
17472
17473 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17474
17475 PR ipa/85734
17476 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17477 param as true in call to suggest_attribute.
17478
17479 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17480
17481 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17482 -mreadonly-in-sdata.
17483
17484 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17485
17486 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17487 New pattern.
17488 (aarch64_crypto_aesd_fused): Likewise.
17489
17490 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17491
17492 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17493 (movsi_aarch64): Likewise.
17494 (load_pairsi): Likewise.
17495 (load_pairdi): Likewise.
17496 (store_pairsi): Likewise.
17497 (store_pairdi): Likewise.
17498 (load_pairsf): Likewise.
17499 (load_pairdf): Likewise.
17500 (store_pairsf): Likewise.
17501 (store_pairdf): Likewise.
17502 (zero_extend): Likewise.
17503 (trunc): Swap alternatives.
17504 (fcvt_target): Add '?' to prefer w over r.
17505
17506 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17507
17508 PR target/85756
17509 * config/i386/i386.md: Disallow non-commutative arithmetics in
17510 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17511 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17512 in the peephole2 before it.
17513
17514 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17515
17516 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17517 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17518 (ix86_handle_option): Handle -mcldemote.
17519 * config.gcc: New header.
17520 * config/i386/cldemoteintrin.h: New file.
17521 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17522 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17523 -mcldemote.
17524 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17525 OPTION_MASK_ISA_CLDEMOTE.
17526 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17527 (ix86_valid_target_attribute_inner_p): Ditto.
17528 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17529 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17530 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17531 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17532 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17533 (cldemote): New.
17534 * config/i386/i386.opt: Add -mcldemote.
17535 * config/i386/x86intrin.h: New header.
17536 * doc/invoke.texi: Add -mcldemote.
17537
17538 2018-05-14 Richard Biener <rguenther@suse.de>
17539
17540 * doc/match-and-simplify.texi: Adjust :s documentation.
17541
17542 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17543
17544 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17545 intended memcpy size.
17546 (REORDER_45): Likewise.
17547
17548 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17549
17550 * sort.cc: New file.
17551 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17552 * vec.c (qsort_chk): Use gcc_qsort.
17553 * Makefile.in (OBJS-libcommon): Add sort.o.
17554 (build/sort.o): New target. Use it...
17555 (BUILD_RTL): ... here, and...
17556 (build/gencfn-macros): ... here, and...
17557 (build/genmatch): ... here.
17558
17559 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17560 Chung-Ju Wu <jasonwucj@gmail.com>
17561
17562 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17563 * config/nds32/nds32-graywolf.md: New file.
17564 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17565 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17566 pipeline.
17567 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17568 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17569 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17570 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17571 * config/nds32/pipelines.md: Include n15 settings.
17572
17573 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17574 Chung-Ju Wu <jasonwucj@gmail.com>
17575
17576 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17577 * config/nds32/nds32-n13.md: New file.
17578 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17579 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17580 pipeline.
17581 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17582 * config/nds32/nds32.md (pipeline_model): Add n13.
17583 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17584 * config/nds32/pipelines.md: Include n13 settings.
17585
17586 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17587 Chung-Ju Wu <jasonwucj@gmail.com>
17588
17589 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17590 * config/nds32/nds32-n10.md: New file.
17591 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17592 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17593 pipeline.
17594 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17595 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17596 * config/nds32/nds32.md (pipeline_model): Add n10.
17597 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17598 * config/nds32/pipelines.md: Include n10 settings.
17599
17600 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17601 Kito Cheng <kito.cheng@gmail.com>
17602 Chung-Ju Wu <jasonwucj@gmail.com>
17603
17604 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17605 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17606 Add enum values for DSP extension instructions.
17607 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17608 New constraints.
17609 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17610 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17611 New code iterators.
17612 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17613 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17614 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17615 * config/nds32/nds32-intrinsic.md: Likewise.
17616 * config/nds32/nds32_intrinsic.h: Likewise.
17617 * config/nds32/nds32-md-auxiliary.c: Likewise.
17618 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17619 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17620 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17621 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17622 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17623 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17624 TYPE_DMAC in switch statement.
17625 * config/nds32/nds32.c: New checking and implementation for DSP
17626 extension instructions.
17627 * config/nds32/nds32.h: Likewise.
17628 * config/nds32/nds32.md: Likewise.
17629 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17630 * config/nds32/predicates.md: Implement new predicates for DSP
17631 extension.
17632
17633 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17634
17635 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17636 Reformat alternatives and attributes so it is easier to identify
17637 which constraints/attributes go with which instruction.
17638 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17639 (mov<mode>_softfloat32, FMOVE64): Likewise.
17640 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17641 (mov<mode>_softfloat64, FMOVE64): Likewise.
17642
17643 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17644
17645 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17646 subsection.
17647 (Basic PowerPC Built-in Functions): The new name of the
17648 subsection previously known as "PowerPC Built-in Functions".
17649 (Basic PowerPC Built-in Functions Available on all Configurations):
17650 New subsubsection.
17651 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17652 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17653 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17654 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17655
17656 2018-05-11 Martin Jambor <mjambor@suse.cz>
17657
17658 PR ipa/85655
17659 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17660 single const.
17661
17662 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17663
17664 PR target/85733
17665 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17666
17667 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17668
17669 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17670 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17671 (ix86_handle_option): Handle -mwaitpkg.
17672 * config.gcc: New header.
17673 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17674 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17675 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17676 function type.
17677 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17678 OPTION_MASK_ISA_WAITPKG.
17679 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17680 (ix86_option_override_internal): Add PTA_WAITPKG.
17681 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17682 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17683 IX86_BUILTIN_TPAUSE.
17684 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17685 __builtin_ia32_umwait and __builtin_ia32_tpause.
17686 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17687 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17688 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17689 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17690 UNSPECV_TPAUSE): New.
17691 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17692 * config/i386/i386.opt: Add -mwaitpkg.
17693 * config/i386/waitpkgintrin.h: New file.
17694 * config/i386/x86intrin.h: New header.
17695 * doc/invoke.texi: Add -mwaitpkg.
17696
17697 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17698
17699 PR target/85606
17700 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17701 equivalent.
17702 (cortex-m0): Use armv6s-m isa.
17703 (cortex-m0plus): Likewise.
17704 (cortex-m1): Likewise.
17705 (cortex-m0.small-multiply): Likewise.
17706 (cortex-m0plus.small-multiply): Likewise.
17707 (cortex-m1.small-multiply): Likewise.
17708
17709 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17710 Jakub Jelinek <jakub@redhat.com>
17711
17712 PR tree-optimization/85692
17713 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17714 source permute as well.
17715
17716 2018-05-11 Martin Liska <mliska@suse.cz>
17717
17718 PR sanitizer/85556
17719 * doc/extend.texi: Document LLVM style format for no_sanitize
17720 attribute.
17721
17722 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17723
17724 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17725 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17726 (mode_supports_vsx_dform_quad): Likewise.
17727 (mode_supports_vmx_dform): Move these functions to be next to the
17728 other mode_supports functions.
17729 (mode_supports_dq_form): Likewise.
17730 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17731 mode_supports_dq_form.
17732 (reg_offset_addressing_ok_p): Likewise.
17733 (offsettable_ok_by_alignment): Likewise.
17734 (rs6000_legitimate_offset_address_p): Likewise.
17735 (legitimate_lo_sum_address_p): Likewise.
17736 (rs6000_legitimize_address): Likewise.
17737 (rs6000_legitimize_reload_address): Likewise.
17738 (rs6000_secondary_reload_inner): Likewise.
17739 (rs6000_preferred_reload_class): Likewise.
17740 (rs6000_output_move_128bit): Likewise.
17741
17742 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17743
17744 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17745 Generate SImode target register for null target.
17746 <case IX86_BUILTIN_XGETBV>: Ditto.
17747 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17748 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17749
17750 2018-05-10 Carl Love <cel@us.ibm.com>
17751
17752 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17753 dcbtt and dcbtstt if operands[2] is 0.
17754
17755 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17756
17757 PR target/85693
17758 * config/i386/sse.md (usadv64qi): New expander.
17759
17760 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17761
17762 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17763 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17764 -maltivec=be support.
17765 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17766 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17767 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17768 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17769 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17770 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17771 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17772 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17773 altivec_vsumsws): Adjust.
17774 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17775 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17776 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17777 support.
17778 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17779 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17780 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17781 (altivec_lve<VI_char>x): Delete expand.
17782 (*altivec_lve<VI_char>x_internal): Rename to...
17783 (altivec_lve<VI_char>x): ... this.
17784 (altivec_lvxl_<mode>): Delete expand.
17785 (*altivec_lvxl_<mode>_internal): Rename to ...
17786 (altivec_lvxl_<mode>): ... this.
17787 (altivec_stvxl_<mode>): Delete expand.
17788 (*altivec_stvxl_<mode>_internal): Rename to ...
17789 (altivec_stvxl_<mode>): ... this.
17790 (altivec_stve<VI_char>x): Delete expand.
17791 (*altivec_stve<VI_char>x_internal): Rename to ...
17792 (altivec_stve<VI_char>x): ... this.
17793 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17794 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17795 reduc_plus_scal_<mode>): Adjust.
17796 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17797 comment.
17798 (rs6000_cpu_cpp_builtins): Adjust.
17799 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17800 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17801 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17802 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17803 -maltivec=be support.
17804 (rs6000_split_vec_extract_var): Adjust.
17805 (rs6000_split_v4si_init): Adjust.
17806 (swap_selector_for_mode): Delete.
17807 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17808 altivec_expand_stvex_be): Delete.
17809 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17810 -maltivec=be support.
17811 (rs6000_gimple_fold_builtin): Ditto.
17812 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17813 Adjust.
17814 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17815 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17816 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17817 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17818 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17819 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17820 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17821 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17822 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17823 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17824 anonymous split): Adjust.
17825 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17826 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17827
17828 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17829
17830 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17831 when --with-gxx-include-dir is also specified.
17832 * configure: Regenerate.
17833
17834 2018-05-09 Jim Wilson <jimw@sifive.com>
17835
17836 PR target/84797
17837 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17838 * config/riscv/t-withmultilib: New.
17839 * config/riscv/withmultilib.h: New.
17840 * doc/install.texi: Document RISC-V --with-multilib-list support.
17841
17842 2018-05-09 Richard Biener <rguenther@suse.de>
17843
17844 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17845 vector.
17846 (vect_bb_vectorization_profitable_p): Adjust. Compute
17847 actual scalar cost using the cost vector and the add_stmt_cost
17848 machinery.
17849
17850 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17851
17852 PR rtl-optimization/85645
17853 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17854 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17855
17856 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17857
17858 PR rtl-optimization/85645
17859 * shrink-wrap.c (spread_components): Return a boolean saying if
17860 anything was changed.
17861 (try_shrink_wrapping_separate): Iterate spread_components until
17862 nothing changes anymore.
17863
17864 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17865
17866 PR rtl-optimization/85645
17867 * regrename.c (build_def_use): Also kill the chains that include the
17868 destination of a REG_CFA_REGISTER note.
17869
17870 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17871
17872 PR rtl-optimization/85645
17873 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17874 insn that has a REG_CFA_REGISTER note.
17875
17876 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17877
17878 * cfgexpand.c (expand_clobber): New function.
17879 (expand_gimple_stmt_1): Use it.
17880 * tree-vect-stmts.c (vect_clobber_variable): New function,
17881 split out from...
17882 (vectorizable_simd_clone_call): ...here.
17883 (vectorizable_store): Emit a clobber either side of an
17884 IFN_STORE_LANES sequence.
17885 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17886
17887 2018-05-09 Tom de Vries <tom@codesourcery.com>
17888
17889 PR target/85626
17890 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17891 (define_insn "trap_if_false"): Add exit after trap.
17892
17893 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17894
17895 PR rtl-optimization/85638
17896 * bb-reorder.c: Include common/common-target.h.
17897 (create_forwarder_block): New function extracted from...
17898 (fix_up_crossing_landing_pad): ...here. Rename into...
17899 (dw2_fix_up_crossing_landing_pad): ...this.
17900 (sjlj_fix_up_crossing_landing_pad): New function.
17901 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17902 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17903 from both partitions and exit the loop after one iteration.
17904
17905 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17906
17907 Revert:
17908 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17909 subsection.
17910 (Basic PowerPC Built-in Functions): The new name of the
17911 subsection previously known as "PowerPC Built-in Functions".
17912 (Basic PowerPC Built-in Functions Available on all Configurations):
17913 New subsubsection.
17914 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17915 subsubsection.
17916 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17917 subsubsection.
17918 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17919 subsubsection.
17920 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17921 subsubsection.
17922
17923 2018-05-08 Jim Wilson <jimw@sifive.com>
17924
17925 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17926 (LD_EMUL_SUFFIX): New.
17927 (LINK_SPEC): Use it.
17928
17929 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17930
17931 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17932 subsection.
17933 (Basic PowerPC Built-in Functions): The new name of the
17934 subsection previously known as "PowerPC Built-in Functions".
17935 (Basic PowerPC Built-in Functions Available on all Configurations):
17936 New subsubsection.
17937 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17938 subsubsection.
17939 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17940 subsubsection.
17941 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17942 subsubsection.
17943 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17944 subsubsection.
17945
17946 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17947
17948 PR target/85683
17949 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17950 after cmpelim optimization.
17951
17952 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17953
17954 * config.gcc: Support "goldmont".
17955 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17956 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17957 PROCESSOR_GOLDMONT.
17958 * config/i386/i386.c (m_GOLDMONT): Define.
17959 (processor_target_table): Add "goldmont".
17960 (PTA_GOLDMONT): Define.
17961 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17962 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17963 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17964 (fold_builtin_cpu): Add "goldmont".
17965 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17966 (ix86_option_override_internal): Add "goldmont".
17967 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17968 (processor_type): Add PROCESSOR_GOLDMONT.
17969 * config/i386/i386.md: Add CPU "glm".
17970 * config/i386/glm.md: New file.
17971 * config/i386/x86-tune.def: Add m_GOLDMONT.
17972 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17973
17974 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17975
17976 PR target/85572
17977 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17978 E_V4DImode.
17979 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17980 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17981 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17982
17983 PR target/85317
17984 * config/i386/i386.c (ix86_fold_builtin): Handle
17985 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17986
17987 PR target/85480
17988 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17989 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17990
17991 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17992
17993 PR target/85658
17994 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17995 (check_arch): Likewise.
17996 (check_fpu): Return the result rather than printing it.
17997 (end arch): Fix operator precedence.
17998 (end cpu): Likewise.
17999 (END): Print the result from check_fpu.
18000
18001 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18002 Alan Hayward <alan.hayward@arm.com>
18003 David Sherwood <david.sherwood@arm.com>
18004
18005 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
18006 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
18007 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
18008 (*fcmuo<mode>_and): New patterns.
18009
18010 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18011
18012 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
18013 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
18014 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
18015 (cmp_op, sve_imm_con): New code attributes.
18016 (SVE_COND_INT_CMP, imm_con): Delete.
18017 (cmp_op): Remove above unspecs from int attribute.
18018 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
18019 to...
18020 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
18021 comparison-specific unspecs.
18022 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
18023 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
18024 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
18025 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
18026 (*vec_fcm<cmp_op><mode>): Rename to...
18027 (*fcm<cmp_op><mode>): ...this and adjust likewise.
18028 (*vec_fcmuo<mode>): Rename to...
18029 (*fcmuo<mode>): ...this and adjust likewise.
18030 (*pred_fcm<cmp_op><mode>): New pattern.
18031 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
18032 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
18033 functions.
18034 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
18035 and UNORDERED.
18036 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
18037 (aarch64_emit_sve_predicated_cond): New function.
18038 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
18039 (aarch64_emit_unspec_cond_or): Replace with...
18040 (aarch64_emit_sve_or_conds): ...this new function. Use
18041 aarch64_emit_sve_ptrue_op for the individual comparisons and
18042 aarch64_emit_binop to OR them together.
18043 (aarch64_emit_inverted_unspec_cond): Replace with...
18044 (aarch64_emit_sve_inverted_cond): ...this new function. Use
18045 aarch64_emit_sve_ptrue_op for the comparison and
18046 aarch64_emit_unop to invert the result.
18047 (aarch64_expand_sve_vec_cmp_float): Update after the above
18048 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
18049
18050 2018-05-07 Nathan Sidwell <nathan@acm.org>
18051
18052 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
18053 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
18054 (Backwards Compatibility): Likewise.
18055
18056 2018-05-07 Luis Machado <luis.machado@linaro.org>
18057
18058 PR bootstrap/85681
18059 Revert:
18060 2018-05-07 Luis Machado <luis.machado@linaro.org>
18061
18062 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18063 <prefetch_dynamic_strides>: New const bool field.
18064 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18065 prefetch_dynamic_strides.
18066 (exynosm1_prefetch_tune): Likewise.
18067 (thunderxt88_prefetch_tune): Likewise.
18068 (thunderx_prefetch_tune): Likewise.
18069 (thunderx2t99_prefetch_tune): Likewise.
18070 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18071 to false.
18072 (aarch64_override_options_internal): Update to set
18073 PARAM_PREFETCH_DYNAMIC_STRIDES.
18074 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18075 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18076 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18077 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18078 prefetch-dynamic-strides setting.
18079
18080 2018-05-07 Luis Machado <luis.machado@linaro.org>
18081
18082 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18083 <minimum_stride>: New const int field.
18084 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18085 minimum_stride field.
18086 (exynosm1_prefetch_tune): Likewise.
18087 (thunderxt88_prefetch_tune): Likewise.
18088 (thunderx_prefetch_tune): Likewise.
18089 (thunderx2t99_prefetch_tune): Likewise.
18090 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18091 (aarch64_override_options_internal): Update to set
18092 PARAM_PREFETCH_MINIMUM_STRIDE.
18093 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18094 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18095 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18096 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18097 stride is constant and is below the minimum stride threshold.
18098
18099 2018-05-07 Luis Machado <luis.machado@linaro.org>
18100
18101 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
18102 to 512.
18103
18104 2018-05-07 Luis Machado <luis.machado@linaro.org>
18105
18106 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18107 <prefetch_dynamic_strides>: New const bool field.
18108 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18109 prefetch_dynamic_strides.
18110 (exynosm1_prefetch_tune): Likewise.
18111 (thunderxt88_prefetch_tune): Likewise.
18112 (thunderx_prefetch_tune): Likewise.
18113 (thunderx2t99_prefetch_tune): Likewise.
18114 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18115 to false.
18116 (aarch64_override_options_internal): Update to set
18117 PARAM_PREFETCH_DYNAMIC_STRIDES.
18118 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18119 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18120 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18121 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18122 prefetch-dynamic-strides setting.
18123
18124 2018-05-07 Luis Machado <luis.machado@linaro.org>
18125
18126 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18127 <minimum_stride>: New const int field.
18128 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18129 minimum_stride field.
18130 (exynosm1_prefetch_tune): Likewise.
18131 (thunderxt88_prefetch_tune): Likewise.
18132 (thunderx_prefetch_tune): Likewise.
18133 (thunderx2t99_prefetch_tune): Likewise.
18134 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18135 (aarch64_override_options_internal): Update to set
18136 PARAM_PREFETCH_MINIMUM_STRIDE.
18137 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18138 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18139 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18140 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18141 stride is constant and is below the minimum stride threshold.
18142
18143 2018-05-06 Jakub Jelinek <jakub@redhat.com>
18144
18145 PR c++/85659
18146 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
18147 the type is addressable. Don't force op into register if it has
18148 BLKmode.
18149
18150 2018-05-05 Roland McGrath <mcgrathr@google.com>
18151
18152 PR other/77609
18153 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
18154 any section for which we don't know a specific type it should have,
18155 regardless of name. Previously this was done only for the exact
18156 names ".init_array", ".fini_array", and ".preinit_array".
18157 (default_elf_asm_named_section): Add comment about
18158 relationship with default_section_type_flags and SECTION_NOTYPE.
18159 (get_section): Don't consider it a type conflict if one side has
18160 SECTION_NOTYPE and the other doesn't, as long as neither has the
18161 SECTION_BSS et al used in the default_section_type_flags logic.
18162
18163 2018-05-05 Tom de Vries <tom@codesourcery.com>
18164
18165 PR target/85653
18166 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18167 (workaround_barsyncs): New function.
18168 (nvptx_reorg): Use workaround_barsyncs.
18169 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18170 (define_expand "nvptx_membar_cta"): New define_expand.
18171 (define_insn "*nvptx_membar_cta"): New insn.
18172
18173 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
18174
18175 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18176 To improve optimization opportunities.
18177 * builtin-types.def: The new needed builtin types for the above.
18178
18179 2018-05-04 Richard Biener <rguenther@suse.de>
18180
18181 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18182 * gimple-ssa-store-merging.c
18183 (imm_store_chain_info::output_merged_store): Remove redundant create,
18184 release split_store vector contents on failure.
18185 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18186 scalar stmt vector on cache hit.
18187
18188 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
18189
18190 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18191 Xilinx FP support.
18192 * config.gcc (powerpc-xilinx-eabi*): Remove.
18193 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18194 support.
18195 (fusion_addis_mem_combo_load): Ditto.
18196 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18197 FP support.
18198 (rs6000_cpu_cpp_builtins): Ditto.
18199 * config/rs6000/rs6000-linux.c
18200 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18201 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18202 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18203 support.
18204 (rs6000_setup_reg_addr_masks): Ditto.
18205 (rs6000_init_hard_regno_mode_ok): Ditto.
18206 (rs6000_option_override_internal): Ditto.
18207 (legitimate_lo_sum_address_p): Ditto.
18208 (rs6000_legitimize_address): Ditto.
18209 (rs6000_legitimize_reload_address): Ditto.
18210 (rs6000_legitimate_address_p): Ditto.
18211 (abi_v4_pass_in_fpr): Ditto.
18212 (setup_incoming_varargs): Ditto.
18213 (rs6000_gimplify_va_arg): Ditto.
18214 (rs6000_split_multireg_move): Ditto.
18215 (rs6000_savres_strategy): Ditto.
18216 (rs6000_emit_prologue_components): Ditto.
18217 (rs6000_emit_epilogue_components): Ditto.
18218 (rs6000_emit_prologue): Ditto.
18219 (rs6000_emit_epilogue): Ditto.
18220 (rs6000_elf_file_end): Ditto.
18221 (rs6000_function_value): Ditto.
18222 (rs6000_libcall_value): Ditto.
18223 * config/rs6000/rs6000.h: Ditto.
18224 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18225 (TARGET_MINMAX): ... this. New.
18226 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18227 * config/rs6000/rs6000.md: Remove Xilinx FP support.
18228 (*movsi_internal1_single): Delete.
18229 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18230 mfpu=, mxilinx-fpu): Delete.
18231 * config/rs6000/singlefp.h: Delete.
18232 * config/rs6000/sysv4.h: Remove Xilinx FP support.
18233 * config/rs6000/t-rs6000: Ditto.
18234 * config/rs6000/t-xilinx: Delete.
18235 * config/rs6000/titan.md: Adjust for fp_type removal.
18236 * config/rs6000/vsx.md: Remove Xilinx FP support.
18237 (VStype_simple): Delete.
18238 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18239 * config/rs6000/xfpu.h: Delete.
18240 * config/rs6000/xfpu.md: Delete.
18241 * config/rs6000/xilinx.h: Delete.
18242 * config/rs6000/xilinx.opt: Delete.
18243 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18244 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18245
18246 2018-05-04 Tom de Vries <tom@codesourcery.com>
18247
18248 PR libgomp/85639
18249 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18250 if ignore == 0.
18251
18252 2018-05-04 Richard Biener <rguenther@suse.de>
18253
18254 PR middle-end/85627
18255 * tree-complex.c (update_complex_assignment): We are always in SSA form.
18256 (expand_complex_div_wide): Likewise.
18257 (expand_complex_operations_1): Likewise.
18258 (expand_complex_libcall): Preserve EH info of the original stmt.
18259 (tree_lower_complex): Handle removed blocks.
18260 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18261 on complex multiplication and division libcall builtins.
18262
18263 2018-05-04 Richard Biener <rguenther@suse.de>
18264
18265 PR middle-end/85574
18266 * fold-const.c (negate_expr_p): Restrict negation of operand
18267 zero of a division to when we know that can happen without
18268 overflow.
18269 (fold_negate_expr_1): Likewise.
18270
18271 2018-05-04 Jakub Jelinek <jakub@redhat.com>
18272
18273 PR libstdc++/85466
18274 * real.h (real_nextafter): Declare.
18275 * real.c (real_nextafter): New function.
18276 * fold-const-call.c (fold_const_nextafter): New function.
18277 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18278 CASE_CFN_NEXTTOWARD.
18279 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18280 even when arg1_mode is different from arg0_mode.
18281
18282 2018-05-03 Nathan Sidwell <nathan@acm.org>
18283
18284 * doc/extend.texi (Deprecated Features): Remove
18285 -ffriend-injection.
18286 (Backwards Compatibility): Likewise.
18287 * doc/invoke.texi (C++ Language Options): Likewise.
18288 (C++ Dialect Options): Likewise.
18289
18290 2018-05-03 Jakub Jelinek <jakub@redhat.com>
18291
18292 PR target/85530
18293 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18294 _mm512_mask_mullox_epi64): New intrinsics.
18295
18296 2018-05-03 Tom de Vries <tom@codesourcery.com>
18297
18298 PR testsuite/85106
18299 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18300 dump files): Add offload-tree.
18301
18302 2018-05-03 Richard Biener <rguenther@suse.de>
18303
18304 PR tree-optimization/85615
18305 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18306 to loops not nested in BBs loop father to avoid creating multi-entry
18307 loops.
18308
18309 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18310
18311 PR tree-optimization/70291
18312 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18313 arguments. Change return type to tree. Emit libcall as a new
18314 statement rather than replacing existing one when inplace_p is true.
18315 (expand_complex_multiplication_components): New function.
18316 (expand_complex_multiplication): Expand floating-point complex
18317 multiplication using the above.
18318 (expand_complex_division): Rename inner_type parameter to type.
18319 Update expand_complex_libcall call-site.
18320 (expand_complex_operations_1): Update expand_complex_multiplication
18321 and expand_complex_division call-sites.
18322
18323 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18324
18325 PR target/85582
18326 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18327 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18328 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18329 the highest significant bit of the shift count mask is clear. In
18330 check whether and[sq]i3 is needed verify that all significant bits
18331 of the shift count other than the highest are set.
18332
18333 2018-05-02 Tom de Vries <tom@codesourcery.com>
18334
18335 PR libgomp/82428
18336 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18337 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18338 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18339 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18340 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18341 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18342 __builtin_goacc_parlevel_size.
18343
18344 2018-05-02 Richard Biener <rguenther@suse.de>
18345
18346 PR tree-optimization/85597
18347 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18348 do not use split vect_get_vec_defs call but call vect_get_slp_defs
18349 directly.
18350
18351 2018-05-02 Tom de Vries <tom@codesourcery.com>
18352
18353 PR testsuite/85106
18354 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18355 dump files): Add ltrans-tree.
18356
18357 2018-05-02 Tom de Vries <tom@codesourcery.com>
18358
18359 PR testsuite/85106
18360 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18361 dump files): Add wpa-ipa.
18362
18363 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
18364
18365 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
18366 powerpc*-*-linux*paired* target.
18367 * config/rs6000/750cl.h: Delete.
18368 * config/rs6000/paired.h: Delete.
18369 * config/rs6000/paired.md: Delete.
18370 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18371 float support.
18372 * config/rs6000/rs6000-builtin.def: Remove paired float support.
18373 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18374 comment. Remove paired float support.
18375 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18376 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18377 VECTOR_PAIRED.
18378 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18379 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18380 declarations.
18381 * config/rs6000/rs6000.c: Remove paired float support.
18382 (paired_expand_vector_init, paired_expand_vector_move,
18383 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18384 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18385 paired_expand_builtin, paired_expand_predicate_builtin,
18386 paired_init_builtins): Delete.
18387 * config/rs6000/rs6000.h: Remove paired float support.
18388 * config/rs6000/rs6000.md: Remove paired float support.
18389 (move_from_CR_ov_bit): Delete.
18390 * config/rs6000/rs6000.opt (mpaired): Delete.
18391 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18392 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18393
18394 2018-05-02 Richard Biener <rguenther@suse.de>
18395
18396 PR middle-end/85567
18397 * gimplify.c (gimplify_save_expr): When in SSA form allow
18398 SAVE_EXPRs to compute to SSA vars.
18399
18400 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18401
18402 PR target/85582
18403 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18404 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18405 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18406 clobber operands[2], instead use a new pseudo. Formatting fixes.
18407
18408 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18409
18410 PR tree-optimization/85586
18411 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18412 exit early for statements in the same group if the accesses are
18413 not strided.
18414
18415 2018-05-02 Tom de Vries <tom@codesourcery.com>
18416
18417 PR lto/85451
18418 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18419 error message.
18420
18421 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18422
18423 PR tree-optimization/85143
18424 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18425
18426 2018-05-01 Tom de Vries <tom@codesourcery.com>
18427
18428 PR lto/85451
18429 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18430 not found" error message.
18431
18432 2018-05-01 Tom de Vries <tom@codesourcery.com>
18433
18434 PR other/83786
18435 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18436 * vec.c (test_ordered_remove_if): New function.
18437 (vec_c_tests): Call test_ordered_remove_if.
18438 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18439 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18440 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18441 VEC_ORDERED_REMOVE_IF.
18442
18443 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18444
18445 PR tree-optimization/82665
18446 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18447 pointer subtraction where arguments come from a memchr call.
18448
18449 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18450
18451 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18452 --push-state --as-needed and --pop-state instead of --as-needed and
18453 --no-as-needed if ld supports it.
18454 * configure: Regenerated.
18455
18456 PR web/85578
18457 * doc/install.texi2html: Replace _002d with - and _002a with * in
18458 generated html files using sed.
18459
18460 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18461
18462 PR c++/85523
18463 * gcc-rich-location.c (blank_line_before_p): New function.
18464 (use_new_line): New function.
18465 (gcc_rich_location::add_fixit_insert_formatted): New function.
18466 * gcc-rich-location.h
18467 (gcc_rich_location::add_fixit_insert_formatted): New function.
18468
18469 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18470
18471 * selftest.c (assert_streq): Rename "expected" and "actual" to
18472 "val1" and "val2". Extend NULL-handling to cover both inputs
18473 symmetrically, while still requiring both to be non-NULL for a pass.
18474 * selftest.h (assert_streq): Rename "expected" and "actual" to
18475 "val1" and "val2".
18476 (ASSERT_EQ): Likewise.
18477 (ASSERT_EQ_AT): Likewise.
18478 (ASSERT_KNOWN_EQ): Likewise.
18479 (ASSERT_KNOWN_EQ_AT): Likewise.
18480 (ASSERT_NE): Likewise.
18481 (ASSERT_MAYBE_NE): Likewise.
18482 (ASSERT_MAYBE_NE_AT): Likewise.
18483 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18484 the assertion to pass.
18485 (ASSERT_STREQ_AT): Likewise.
18486
18487 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18488
18489 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18490 interaction with -pie.
18491
18492 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18493
18494 * selftest.h: Fix alphabetization of per-source-file selftest
18495 declarations.
18496
18497 2018-04-30 Jason Merrill <jason@redhat.com>
18498
18499 PR c++/61982 - dead stores to destroyed objects.
18500 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18501 of clobber.
18502
18503 2018-04-30 Jason Merrill <jason@redhat.com>
18504
18505 * tree.c (build_clobber): New.
18506 * tree.h: Declare it.
18507 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18508
18509 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18510
18511 * diagnostic-show-locus.c (layout::layout): Update for
18512 location_get_source_line returning a char_span.
18513 (struct char_span): Move to input.h.
18514 (struct correction): Update for fields in char_span becoming
18515 private.
18516 (struct source_line): Update for location_get_source_line
18517 returning a char_span.
18518 (layout::print_line): Likewise.
18519 * edit-context.c (edited_file::print_content): Likewise.
18520 (edited_file::print_diff_hunk): Likewise.
18521 (edited_file::print_run_of_changed_lines): Likewise.
18522 (edited_file::get_num_lines): Likewise.
18523 (edited_line::edited_line): Likewise.
18524 * final.c (asm_show_source): Likewise.
18525 * input.c (location_get_source_line): Convert return type
18526 from const char * to char_span, losing the final "line_len"
18527 param.
18528 (dump_location_info): Update for the above.
18529 (get_substring_ranges_for_loc): Likewise. Use a char_span
18530 when handling the literal within the line.
18531 (test_reading_source_line): Update for location_get_source_line
18532 returning a char_span.
18533 * input.h (class char_span): Move here from
18534 diagnostic-show-locus.c, converting from a struct to a class.
18535 Make data members private.
18536 (char_span::operator bool): New.
18537 (char_span::length): New.
18538 (char_span::get_buffer): New.
18539 (char_span::operator[]): New.
18540 (char_span::subspan): Make const.
18541 (char_span::xstrdup): New.
18542 (location_get_source_line): Convert return type from const char *
18543 to char_span, losing the final "line_size" param.
18544
18545 2018-04-30 Jan Hubicka <jh@suse.cz>
18546
18547 * lto-wrapper.c (ltrans_priorities): New static var.
18548 (cmp_priority): New.
18549 (run_gcc): Read priorities and if doing parallel build order
18550 the Makefile by them.
18551
18552 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18553
18554 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18555
18556 2018-04-30 Richard Biener <rguenther@suse.de>
18557
18558 * tree-cfg.c (verify_address): Remove base argument, add
18559 flag whether to check TREE_ADDRESSABLE and do that.
18560 (verify_expr): Remove.
18561 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18562 (verify_gimple_assign_single): Likewise.
18563 (verify_gimple_switch): Likewise.
18564 (verify_expr_location_1): Dereference tp once. Add (disabled)
18565 piece from verify_expr.
18566 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18567
18568 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18569
18570 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18571
18572 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18573
18574 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18575 (small_data_pattern): Likewise.
18576 (arc_rewrite_small_data): Likewise.
18577 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18578 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18579 (get_symbol_alignment): New function.
18580 (legitimate_small_data_address_p): Likewise.
18581 (legitimate_scaled_address): Update, call
18582 legitimate_small_data_address_p.
18583 (output_sdata): New static variable.
18584 (arc_print_operand): Update how we handle small data operands.
18585 (arc_print_operand_address): Likewise.
18586 (arc_legitimate_address_p): Update, use
18587 legitimate_small_data_address_p.
18588 (arc_rewrite_small_data_p): Remove.
18589 (arc_rewrite_small_data_1): Likewise.
18590 (arc_rewrite_small_data): Likewise.
18591 (small_data_pattern): Likewise.
18592 (compact_sda_memory_operand): Update to use
18593 legitimate_small_data_address_p and get_symbol_alignment.
18594 (prepare_move_operands): Don't rewite sdata pattern.
18595 (prepare_extend_operands): Remove.
18596 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18597 pattern.
18598 (zero_extendqisi2): Likewise.
18599 (zero_extendhisi2): Likewise.
18600 (extendqihi2): Likewise.
18601 (extendqisi2): Likewise.
18602 (extendhisi2): Likewise.
18603 (addsi3): Likewise.
18604 (subsi3): Likewise.
18605 (andsi3): Likewise.
18606 * config/arc/constraints.md (Usd): Change it to memory constraint.
18607
18608 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18609
18610 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18611 as source of std instructions.
18612 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18613 allow 6-bit constants as source for store instructions.
18614 (movdi_insn): Update instruction pattern to allow 6-bit constants
18615 as source for store instructions.
18616
18617 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18618
18619 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18620
18621 2018-04-30 Nathan Sidwell <nathan@acm.org>
18622 Sandra Loosemore <sandra@codesourcery.com>
18623
18624 * dumpfile.c (dump_open): Allow '-' for stdout.
18625 * doc/invoke.texi (Developer Options): Document dump filename
18626 determination early. Document stdin/stdout selection.
18627
18628 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18629
18630 Microblaze Target: PIC data text relative
18631
18632 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18633 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18634 Add declaration.
18635 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18636 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18637 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18638 New addressing mode for data-text relative position indepenedent code.
18639 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18640 'ADDRESS_SYMBOLIC_TXT_REL'.
18641 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18642 (microblaze_legitimate_pic_operand): Exclude function calls from
18643 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18644 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18645 addresses cases.
18646 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18647 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18648 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18649 for 'address + offset'.
18650 (microblaze_expand_prologue): Add new function prologue call for
18651 'r20' assignation.
18652 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18653 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18654 table in case of TARGET_PIC_DATA_TEXT_REL.
18655 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18656 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18657 Add new macros 'UNSPEC_TEXT',
18658 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18659 + exclude function calls from 'UNSPEC_PLT' in case of data text
18660 relative mode.
18661 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18662 new target hook for generating address diff vector tables in case of
18663 flag_pic.
18664 * doc/tm.texi : Regenerate.
18665 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18666 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18667 of addr diff vector generation.
18668 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18669 target hook definition.
18670 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18671 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18672 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18673 option for data text relative.
18674
18675 2018-04-30 Richard Biener <rguenther@suse.de>
18676
18677 * tree-chrec.h (evolution_function_is_constant_p): Remove
18678 redundant check.
18679 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18680
18681 2018-04-30 Richard Biener <rguenther@suse.de>
18682
18683 PR bootstrap/85571
18684 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18685
18686 2018-04-30 Richard Biener <rguenther@suse.de>
18687
18688 PR tree-optimization/28364
18689 PR tree-optimization/85275
18690 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18691 copying first exit test.
18692
18693 2018-04-28 Mark Wielaard <mark@klomp.org>
18694
18695 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18696 dwarf_version >= 5.
18697 (dwarf_AT): Handle DW_AT_addr_base.
18698 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18699
18700 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18701
18702 PR target/84431
18703 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18704 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18705 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18706 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18707
18708 2018-04-28 Richard Biener <rguenther@suse.de>
18709
18710 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18711 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18712 to reflect use. Only add interesting stmts.
18713
18714 2018-04-27 Martin Jambor <mjambor@suse.cz>
18715
18716 PR ipa/85549
18717 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18718 the jump function allows for passing through aggregate values.
18719
18720 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18721
18722 * input.h (in_system_header_at): Convert from macro to inline
18723 function.
18724 (from_macro_expansion_at): Likewise.
18725 (from_macro_definition_at): Likewise.
18726
18727 2018-04-27 Jeff Law <law@redhat.com>
18728
18729 * config.gcc: Mark tile* targets as deprecated/obsolete.
18730
18731 2018-04-27 Richard Biener <rguenther@suse.de>
18732
18733 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18734 fix for ILP32.
18735
18736 2018-04-27 Richard Biener <rguenther@suse.de>
18737
18738 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18739
18740 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18741
18742 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18743 with Yd constraint. Set "preferred_for_speed" attribute from
18744 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18745 with Yd constraint.
18746 (*movdi_internal): Ditto.
18747 (movti_interunit splitters): Remove
18748 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18749 (movdi_interunit splitters): Ditto.
18750 * config/i386/constraints.md (Ye): Remove.
18751 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18752
18753 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18754
18755 PR target/85512
18756 * config/aarch64/constraints.md (Usg): Limit to 31.
18757 (Usj): Limit to 63.
18758
18759 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18760
18761 PR tree-optimization/85529
18762 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18763 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18764 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18765 zero extension or masking of the MSB bit.
18766 (optimize_range_tests): Add FIRST_BB argument, pass it through
18767 to optimize_range_tests_var_bound.
18768 (maybe_optimize_range_tests, reassociate_bb): Adjust
18769 optimize_range_tests callers.
18770
18771 2018-04-26 Richard Biener <rguenther@suse.de>
18772 Jakub Jelinek <jakub@redhat.com>
18773
18774 * cgraph.h (symbol_table): Just declare debug method here.
18775 * symtab.c (symbol_table::debug): Define.
18776
18777 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18778
18779 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18780
18781 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18782
18783 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18784 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18785 (*movdi_internal): Substitute Yi and Yj constraint with x
18786 and Ym and Yn constraint with y constraint. Update "isa"
18787 attribute and set "preferred_for_speed" attribute from
18788 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18789 (*movsi_internal): Ditto.
18790 (*movdf_internal): Ditto.
18791 (*movsf_internal): Ditto.
18792 (*zero_extendsidi2): Ditto.
18793 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18794 (sse2_loadld): Ditto.
18795 (*vec_extract<ssevecmodelower>_0): Ditto.
18796 (*vec_extractv4si_0_zext_sse4): Ditto.
18797 (vec_concatv2di): Ditto.
18798 (*vec_dup<mode>): Ditto.
18799 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18800 * config/i386/constraints.md (Yi): Remove.
18801 (Yj): Remove.
18802 (Ym): Remove.
18803 (Yn): Remove.
18804
18805 2018-04-26 Nathan Sidwell <nathan@acm.org>
18806
18807 * dumpfile.c (dump_open): New.
18808 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18809 (dump_finish): Detect stdio/stderr by value not name.
18810
18811 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18812
18813 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18814
18815 2018-04-26 Tom de Vries <tom@codesourcery.com>
18816
18817 PR target/84952
18818 * config/nvptx/nvptx.c (verify_neutering_jumps)
18819 (verify_neutering_labels): New function
18820 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18821
18822 2018-04-26 Tom de Vries <tom@codesourcery.com>
18823
18824 PR target/84025
18825 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18826 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18827 need neutering.
18828
18829 2018-04-26 Richard Biener <rguenther@suse.de>
18830 Tom de Vries <tom@codesourcery.com>
18831
18832 PR lto/85422
18833 * lto-streamer-out.c (output_function): Fixup loops if required to match
18834 discovery done in the reader.
18835
18836 2018-04-26 Richard Biener <rguenther@suse.de>
18837
18838 PR tree-optimization/85116
18839 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18840 have a loop exit from the single latch predecessor. Remove
18841 case of header with just condition.
18842 (ch_base::copy_headers): Exclude infinite loops from any
18843 processing.
18844 (pass_ch::execute): Record exits.
18845
18846 2018-04-26 Richard Biener <rguenther@suse.de>
18847
18848 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18849 prologue cost vector and pass it to vect_get_load_cost.
18850 (vect_get_peeling_costs_all_drs): Likewise.
18851 (vect_peeling_hash_get_lowest_cost): Likewise.
18852 (vect_enhance_data_refs_alignment): Likewise.
18853
18854 2018-04-26 Richard Biener <rguenther@suse.de>
18855
18856 PR middle-end/85450
18857 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18858 checking of integer<->pointer conversions.
18859 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18860 sign-/zero-extending pointer types.
18861 (expand_omp_for_static_chunk): Likewise.
18862
18863 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18864 Jean Lee <xiaoyur347@gmail.com>
18865
18866 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18867 (TARGET_ASAN_SHADOW_OFFSET): Define.
18868 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18869 true for -fsanitize=address.
18870
18871 2018-04-25 Mark Wielaard <mark@klomp.org>
18872
18873 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18874 shorter ones.
18875
18876 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18877
18878 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18879 than "alu", remove explicit "memory" and "imm_disp" attributes.
18880 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18881
18882 PR middle-end/85414
18883 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18884 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18885 gen_lowpart_no_emit.
18886
18887 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18888
18889 PR target/85473
18890 * config/i386/i386.c (ix86_expand_builtin): Change memory
18891 operand to XI, extend p0 to Pmode.
18892 * config/i386/i386.md: Change unspec volatile and operand
18893 1 mode to XI, change operand 0 mode to P.
18894
18895 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18896
18897 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18898 GET_MODE_MASK before any checking.
18899 (nds32_can_use_bset_p): Likewise.
18900 (nds32_can_use_btgl_p): Likewise.
18901
18902 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18903
18904 * config/nds32/nds32-doubleword.md: New define_split pattern for
18905 illegal register number.
18906
18907 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18908
18909 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18910
18911 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18912
18913 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18914
18915 2018-04-25 Richard Biener <rguenther@suse.de>
18916
18917 * lto-streamer.h (LTO_major_version): Bump to 8.
18918
18919 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18920
18921 * BASE-VER: Set to 9.0.0.
18922
18923 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18924
18925 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18926 in __abskf2 and __powikf2.
18927
18928 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18929
18930 PR target/85512
18931 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18932 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18933 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18934 Use the above on operand 2. Reindent.
18935 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18936
18937 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18938
18939 PR target/85485
18940 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18941 handle OPT_mcet.
18942 * config/i386/i386.opt (mcet): Removed.
18943 * doc/install.texi: Remove -mcet documentation.
18944 * doc/invoke.texi: Likewise.
18945
18946 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18947
18948 PR target/85485
18949 * doc/install.texi: Remove -mcet from bootstrap-cet.
18950
18951 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18952
18953 PR target/85511
18954 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18955 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18956 if TARGET_64BIT.
18957
18958 PR target/85503
18959 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18960 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18961 containing a CONST_VECTOR.
18962
18963 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18964
18965 * doc/install.texi: Update newlib dependency for nvptx.
18966
18967 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18968
18969 PR target/85508
18970 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18971 instead of INTVAL when shifting x left.
18972
18973 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18974
18975 PR tree-optimization/85478
18976 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18977 vect_grouped_store_supported for single element vectors.
18978
18979 2018-04-24 Richard Biener <rguenther@suse.de>
18980
18981 PR target/85491
18982 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18983 load cost increase to the case of non-constant step.
18984
18985 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18986
18987 PR target/84828
18988 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18989 destination if any_malformed_asm.
18990
18991 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18992
18993 PR middle-end/85496
18994 * expr.c (store_field): In the bitfield case, if the value comes from
18995 a function call and is returned in registers by means of a PARALLEL,
18996 do not change the mode of the temporary unless BLKmode and VOIDmode.
18997
18998 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18999
19000 PR rtl-optimization/85423
19001 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
19002 dependencies to debug insns when the previous insn is non-debug.
19003
19004 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19005
19006 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
19007 enums into a single definition.
19008 (fls): Fix predicates and printing.
19009 (seti): Likewise.
19010
19011 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19012
19013 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
19014 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
19015 and short u6 immediate.
19016 (check_if_valid_sleep_operand): Remove.
19017 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
19018
19019 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19020
19021 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
19022 flag_always_save_lp condition.
19023 * config/nds32/nds32.opt (malways-save-lp): New option.
19024
19025 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19026
19027 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
19028 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
19029 * config/nds32/nds32.h
19030 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
19031 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
19032
19033 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19034
19035 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
19036 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
19037
19038 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19039 Chung-Ju Wu <jasonwucj@gmail.com>
19040
19041 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
19042 Declare.
19043 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
19044 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
19045
19046 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19047
19048 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
19049
19050 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19051
19052 * config/nds32/nds32-protos.h (nds32_data_alignment,
19053 nds32_local_alignment): Declare.
19054 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
19055 nds32_local_alignment): New functions.
19056 (TARGET_CONSTANT_ALIGNMENT): Define.
19057 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
19058
19059 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19060
19061 * config/nds32/nds32.c
19062 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
19063 (TARGET_MODES_TIEABLE_P): Likewise.
19064
19065 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19066
19067 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
19068 level Ofast and Og.
19069
19070 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
19071 Chung-Ju Wu <jasonwucj@gmail.com>
19072
19073 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19074 for unaligned access.
19075 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19076 unaligned access.
19077 * config/nds32/nds32-intrinsic.md: Likewise.
19078 * config/nds32/nds32_intrinsic.h: Likewise.
19079 * config/nds32/nds32.h (nds32_builtins): Likewise.
19080 * config/nds32/nds32.opt (munaligned-access): New option.
19081 * config/nds32/nds32.c (nds32_asm_file_start): Display
19082 flag_unaligned_access status.
19083
19084 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19085
19086 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
19087 -mno-relax is present.
19088 * config/riscv/linux.h (LINK_SPEC): Ditto.
19089
19090 2018-04-20 Martin Sebor <msebor@redhat.com>
19091
19092 PR c/85365
19093 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
19094 for null pointers.
19095 (gimple_fold_builtin_stxcpy_chk): Same.
19096 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
19097
19098 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
19099
19100 PR target/85456
19101 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
19102 __powikf2 when long double is IEEE 128-bit.
19103
19104 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19105
19106 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
19107 step to make sure stack always aligned.
19108
19109 2018-04-20 Carl Love <cel@us.ibm.com>
19110
19111 PR target/83402
19112 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
19113 size check for arg0.
19114
19115 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
19116 Tom de Vries <tom@codesourcery.com>
19117
19118 PR target/85445
19119 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
19120 Emit insns for calls too.
19121 (nvptx_find_par): Always look for worker-level predecessor insn.
19122 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
19123 calls.
19124 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
19125 (nvptx_process_pars): Propagate frames for calls.
19126
19127 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
19128
19129 PR target/85469
19130 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
19131 Removed.
19132 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
19133 (ix86_handle_option): Don't handle OPT_mibt.
19134 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
19135 __SHSTK__.
19136 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
19137 has_ibt and ibt.
19138 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
19139 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
19140 (ix86_target_macros): Define __CET__ with flag_cf_protection
19141 for -fcf-protection.
19142 * config/i386/i386.c (isa2_opts): Remove -mibt.
19143 * config/i386/i386.h (TARGET_IBT): Removed.
19144 (TARGET_IBT_P): Likewise.
19145 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
19146 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
19147 * config/i386/i386.opt (mcet): Update help message.
19148 (mshstk): Likewise.
19149 (mibt): Removed.
19150 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
19151 -mcet as an alias for -mshstk.
19152
19153 2018-04-20 Richard Biener <rguenther@suse.de>
19154
19155 PR middle-end/85475
19156 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
19157 complexity by forcing a single use of the multiply operand.
19158
19159 2018-04-20 Martin Jambor <mjambor@suse.cz>
19160
19161 ipa/85449
19162 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
19163 recursion dependency to only apply to non-clones.
19164
19165 2018-04-20 Martin Jambor <mjambor@suse.cz>
19166
19167 ipa/85447
19168 * ipa-cp.c (create_specialized_node): Check that clones of
19169 self-recursive edges exist during IPA-CP.
19170
19171 2018-04-19 Toon Moene <toon@moene.org>
19172
19173 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19174 by -O3.
19175
19176 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19177
19178 PR tree-optimization/85467
19179 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19180 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
19181 VECTOR_CST element to type.
19182
19183 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19184
19185 PR target/85397
19186 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19187 * config/i386/i386.md (builtin_setjmp_setup): Removed.
19188 (builtin_longjmp): Likewise.
19189 (save_stack_nonlocal): New pattern.
19190 (restore_stack_nonlocal): Likewise.
19191
19192 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19193
19194 PR target/85404
19195 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19196 Replace ASM_OUTPUT_LABEL with fprintf.
19197
19198 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19199
19200 PR target/85417
19201 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19202 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19203 * config/i386/i386-c.c (ix86_target_macros_internal): Also
19204 define __IBT__ and __SHSTK__ for -fcf-protection.
19205 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19206 TARGET_IBT.
19207 (ix86_trampoline_init): Likewise.
19208 (x86_output_mi_thunk): Likewise.
19209 (ix86_notrack_prefixed_insn_p): Likewise.
19210 (ix86_option_override_internal): Don't disallow -fcf-protection.
19211 * config/i386/i386.md (rdssp<mode>): Also enable for
19212 -fcf-protection.
19213 (incssp<mode>): Likewise.
19214 (nop_endbr): Likewise.
19215 * config/i386/i386.opt (mcet): Change help message to built-in
19216 functions only.
19217 (mibt): Likewise.
19218 (mshstk): Likewise.
19219 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19220 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
19221 enable CET built-in functions.
19222
19223 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
19224
19225 * common/config/i386/i386-common.c
19226 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19227 OPTION_MASK_ISA_MOVDIRI_UNSET,
19228 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19229 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19230 * config.gcc (movdirintrin.h): New header.
19231 * config/i386/cpuid.h (bit_MOVDIRI,
19232 bit_MOVDIR64B): New bits.
19233 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19234 and -mmvodir64b.
19235 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19236 (VOID, PVOID, PCVOID)): New function types.
19237 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19238 __builtin_ia32_directstoreu_u64,
19239 __builtin_ia32_movdir64b): New builtins.
19240 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19241 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19242 and -mmovdiri.
19243 (ix86_valid_target_attribute_inner_p): Ditto.
19244 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19245 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19246 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19247 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19248 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19249 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19250 (movdiri<mode>, movdir64b_<mode>): New.
19251 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19252 * config/i386/immintrin.h: Include movdirintrin.h.
19253 * config/i386/movdirintrin.h: New file.
19254 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19255
19256 2018-04-19 Richard Biener <rguenther@suse.de>
19257
19258 PR middle-end/85455
19259 * cfg.c (clear_bb_flags): When loop state says we have
19260 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19261
19262 2018-04-19 Richard Biener <rguenther@suse.de>
19263
19264 PR tree-optimization/84737
19265 * tree-vect-data-refs.c (vect_copy_ref_info): New function
19266 copying restrict info.
19267 (vect_setup_realignment): Use it.
19268 * tree-vectorizer.h (vect_copy_ref_info): Declare.
19269 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19270 the first DR to all generated stores.
19271 (vectorizable_load): Likewise for loads.
19272
19273 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19274
19275 PR tree-optimization/85446
19276 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19277 the integral and pointer types to have the same precision.
19278
19279 * doc/install.texi: Document --disable-cet being the default and
19280 --enable-cet=auto.
19281
19282 2018-04-18 Martin Liska <mliska@suse.cz>
19283
19284 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19285 style.
19286
19287 2018-04-18 Martin Liska <mliska@suse.cz>
19288
19289 Revert
19290 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19291
19292 PR ipa/83983
19293 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19294 arguments if they are comparable.
19295
19296 2018-04-18 Martin Liska <mliska@suse.cz>
19297
19298 Revert
19299 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19300
19301 PR lto/84805
19302 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19303 incomplete types.
19304
19305 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
19306
19307 PR target/85388
19308 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19309 ENDBR after calling __morestack.
19310
19311 2018-04-18 David Malcolm <dmalcolm@redhat.com>
19312
19313 PR jit/85384
19314 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19315 by using gcc_base_ver to generate a gcc_driver_version, and use
19316 it when generating GCC_DRIVER_NAME.
19317 * configure: Regenerate.
19318
19319 2018-04-18 Jakub Jelinek <jakub@redhat.com>
19320
19321 PR target/81084
19322 * config.gcc: Obsolete powerpc*-*-*spe*.
19323
19324 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19325
19326 PR debug/84637
19327 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19328 (stabstr_D): Change type of unum from unsigned int to
19329 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
19330 type.
19331
19332 2018-04-17 Jim Wilson <jimw@sifive.com>
19333
19334 PR 84856
19335 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19336 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19337 Set arg_pointer_offset after using pretend_args_size.
19338
19339 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19340
19341 PR rtl-optimization/85431
19342 * dse.c (record_store): Ignore zero width stores.
19343
19344 PR sanitizer/85230
19345 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
19346 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19347 __builtin_stack_restore rather than after it.
19348 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19349 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19350 argument instead of virtual_dynamic_stack_rtx.
19351
19352 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
19353
19354 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19355 New prototype.
19356 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19357 Add note to error message to explain internal mapping of overloaded
19358 built-in function name to non-overloaded built-in function name.
19359 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19360 function.
19361
19362 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19363
19364 PR target/85424
19365 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19366 where the inputs overlap with the output.
19367
19368 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19369
19370 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19371 (=v, v) alternative and explicit "memory" attribute.
19372 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
19373 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19374 attributes.
19375 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19376 "sselog1" type instead of "sselog".
19377 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19378 "sselog". Remove explicit "memory" attribute.
19379 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19380 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19381 attributes.
19382 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19383 "sselog1" type instead of "sselog". Remove explicit "memory"
19384 attribute.
19385 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19386 use "sselog1" type instead of "sselog". Remove explicit "memory"
19387 attribute.
19388 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19389 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19390 attributes.
19391 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19392 "sselog1" type instead of "sselog". Remove explicit "memory"
19393 attribute.
19394 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19395 use "sselog1" type instead of "sselog". Remove explicit "memory"
19396 attribute.
19397
19398 PR target/85430
19399 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19400
19401 PR middle-end/85414
19402 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19403 on a SUBREG.
19404
19405 2018-04-17 Martin Jambor <mjambor@suse.cz>
19406
19407 PR ipa/85421
19408 * ipa-cp.c (create_specialized_node): Call
19409 expand_all_artificial_thunks if necessary.
19410
19411 2018-04-17 Martin Liska <mliska@suse.cz>
19412
19413 PR lto/85405
19414 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19415 in message, remote space in between '_G' and '('.
19416
19417 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19418
19419 PR target/85281
19420 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19421 avx512f_vmcmp<mode>3<round_saeonly_name>,
19422 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19423 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19424 avx512f_rndscale<mode><round_saeonly_name>,
19425 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19426 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19427 Use %<iptr>2 instead of %2 for -masm=intel.
19428 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19429 avx512f_vcvttss2usi<round_saeonly_name>,
19430 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19431 -masm=intel.
19432 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19433 avx512f_vcvttsd2usi<round_saeonly_name>,
19434 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19435 Use %q1 instead of %1 for -masm=intel.
19436 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19437 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19438 of %3 for -masm=intel.
19439 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19440 -masm=intel.
19441 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19442 -masm=intel.
19443 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19444 -masm=intel.
19445 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19446 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19447 %g1.
19448 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19449 -masm=intel.
19450 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19451 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19452 %g1 and one with %0 and %1.
19453 (avx512er_vmrcp28<mode><round_saeonly_name>,
19454 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19455 %1 for -masm=intel.
19456 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19457 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19458 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19459 of %0 and %{%4%} for -masm=intel.
19460 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19461 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19462 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19463 order of %0 and %{%5%}%{z%} for -masm=intel.
19464
19465 2018-04-17 Jan Hubicka <jh@suse.cz>
19466
19467 PR lto/85405
19468 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19469
19470 2018-04-17 Martin Liska <mliska@suse.cz>
19471
19472 PR ipa/85329
19473 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19474 for target_clone error message. Make default implementation
19475 clone to be a local declaration.
19476 (separate_attrs): Add new argument and check for an empty
19477 string.
19478 (expand_target_clones): Handle it.
19479 (ipa_target_clone): Make redirection just for target_clones
19480 functions.
19481
19482 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19483 Tom de Vries <tom@codesourcery.com>
19484
19485 PR middle-end/84955
19486 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19487 tiled basic blocks without omp continue statements.
19488
19489 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19490
19491 PR target/83660
19492 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19493 vec_extract expression as having side effects to make sure it gets
19494 a cleanup point.
19495
19496 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19497
19498 PR target/85403
19499 * config/i386/i386.c (get_builtin_code_for_version): Check
19500 error_mark_node.
19501
19502 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19503
19504 PR target/84331
19505 * config.gcc: Support "skylake".
19506 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19507 PROCESSOR_SKYLAKE.
19508 * config/i386/i386.c (m_SKYLAKE): Define.
19509 (processor_target_table): Add "skylake".
19510 (ix86_option_override_internal): Add "skylake".
19511 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19512 PROCESSOR_CANNONLAKE.
19513 (get_builtin_code_for_version): Fix priority for
19514 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19515 PROCESSOR_SKYLAKE-AVX512.
19516 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19517 (processor_type): Add PROCESSOR_SKYLAKE.
19518
19519 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19520 Jason Merrill <jason@redhat.com>
19521
19522 PR c++/85112
19523 * convert.c (convert_to_integer_1): Use direct recursion for
19524 enumeral types and types with a precision less than the number
19525 of bits in their mode.
19526
19527 2018-04-16 Julia Koval <julia.koval@intel.com>
19528
19529 PR target/84413
19530 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19531 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19532
19533 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19534
19535 PR target/85293
19536 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19537 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19538 and -mno-direct-move.
19539
19540 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19541
19542 PR target/83402
19543 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19544 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19545 Ensure negative shifts result in {0}.
19546
19547 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19548
19549 PR rtl-optimization/79916
19550 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19551 regs (if any) to define how to gnerate SD moves when LRA is in
19552 progress.
19553
19554 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19555
19556 PR rtl-optimization/85393
19557 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19558 * except.c (expand_dw2_landing_pad_for_region): Make static.
19559 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19560 a label and unconditional jump to old_bb, rather than
19561 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19562 basic block.
19563
19564 PR rtl-optimization/85376
19565 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19566 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19567 instead of a specific value.
19568
19569 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19570 Bin Cheng <bin.cheng@arm.com>
19571
19572 PR tree-optimization/82965
19573 PR tree-optimization/83991
19574 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19575 by_profile_only parameter.
19576 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19577 information if the loop was predicted to iterate too many times.
19578 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19579
19580 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19581
19582 PR lto/71991
19583 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19584 always inline.
19585
19586 2018-04-13 Martin Liska <mliska@suse.cz>
19587 Jakub Jelinek <jakub@redhat.com>
19588
19589 PR middle-end/81657
19590 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19591 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19592 * builtins.c (expand_builtin_memory_copy_args): Use
19593 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19594 handle dest_addr == pc_rtx.
19595
19596 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19597
19598 PR target/85291
19599 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19600 asked to not generate direct moves.
19601 (fix_trunc<mode>si2_stfiwx): Similar.
19602 (fix_trunc<mode>si2_internal): Similar.
19603
19604 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19605
19606 PR debug/83157
19607 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19608 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19609 lookup if dest in some wider mode is known to be const0_rtx and
19610 if so, record permanent equivalence for it to be ZERO_EXTEND of
19611 the narrower mode destination.
19612
19613 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19614
19615 * lto-streamer-out.c (output_function): Revert 259346.
19616 * omp-expand.c (expand_oacc_for): Likewise.
19617
19618 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19619
19620 PR rtl-optimization/85354
19621 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19622 * sel-sched.c (sel_global_init): ... here.
19623
19624 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19625
19626 PR target/85238
19627 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19628 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19629 mode for PE-COFF targets.
19630 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19631 (i386_pe_asm_lto_end): Likewise.
19632 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19633 (TARGET_ASM_LTO_END): Likewise.
19634 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19635 (i386_pe_asm_lto_start): New function.
19636 (i386_pe_asm_lto_end): Likewise.
19637
19638 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19639 Richard Biener <rguenther@suse.de>
19640
19641 PR middle-end/84955
19642 * lto-streamer-out.c (output_function): Fix CFG loop state before
19643 streaming out.
19644 * omp-expand.c (expand_oacc_for): Handle calls to internal
19645 functions like regular functions.
19646
19647 2018-04-12 Richard Biener <rguenther@suse.de>
19648
19649 PR lto/85371
19650 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19651 for the early LTO debug to properly generate references to it
19652 during DIE emission. Do not re-use that for the skeleton for
19653 split-dwarf.
19654 (dwarf2out_early_finish): Likewise.
19655
19656 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19657
19658 PR target/85328
19659 * config/i386/sse.md
19660 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19661 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19662 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19663 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19664 and output is a reg, avoid creating invalid lowpart subreg, but
19665 instead split into a 512-bit move. Don't split if not AVX512VL,
19666 input is xmm16+ reg and output is a mem.
19667 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19668 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19669 xmm16+ reg and output is a mem.
19670
19671 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19672
19673 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19674 also for flag_dwarf2_cfi_asm.
19675
19676 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19677
19678 PR rtl-optimization/85342
19679 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19680 a bool scalar var inside of the loop instead. Don't try to update
19681 recog_data.operand after failed apply_change_group.
19682
19683 2018-04-12 Tom de Vries <tom@codesourcery.com>
19684
19685 PR target/85296
19686 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19687 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19688 array with flexible array member as array without given dimension.
19689 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19690 argument for undefined param to true.
19691
19692 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19693
19694 PR target/85321
19695 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19696 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19697 from PowerPC section.
19698 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19699 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19700 help text that is too long.
19701 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19702 help text that is too long.
19703 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19704 help text that is too long.
19705
19706 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19707
19708 * config/alpha/alpha.md (stack_probe_internal): Rename
19709 from "probe_stack". Update all callers.
19710
19711 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19712
19713 PR rtl-optimization/84566
19714 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19715 sched_macro_fuse_insns.
19716
19717 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19718
19719 PR target/84301
19720 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19721 (compute_block_dependences): ... from here.
19722
19723 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19724
19725 PR tree-optimization/85331
19726 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19727 from int to HOST_WIDE_INT.
19728
19729 2018-04-11 Martin Jambor <mjambor@suse.cz>
19730
19731 PR ipa/84149
19732 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19733 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19734 not the same as the source val.
19735 (cgraph_edge_brings_value_p): New parameter.
19736 (gather_edges_for_value): Pass destination value to
19737 cgraph_edge_brings_value_p.
19738 (perhaps_add_new_callers): Likewise.
19739 (get_info_about_necessary_edges): Likewise and exclude values brought
19740 only by self-recursive edges.
19741 (create_specialized_node): Redirect only clones of self-calling edges.
19742 (+self_recursive_pass_through_p): New function.
19743 (find_more_scalar_values_for_callers_subset): Use it.
19744 (find_aggregate_values_for_callers_subset): Likewise.
19745 (known_aggs_to_agg_replacement_list): Removed.
19746 (decide_whether_version_node): Re-calculate known constants for all
19747 remaining context clones.
19748
19749 2018-04-11 Richard Biener <rguenther@suse.de>
19750
19751 PR lto/85339
19752 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19753 from early DWARF output.
19754 (dwarf2out_early_finish): Output line info unconditionally into
19755 early DWARF and add reference to it.
19756
19757 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19758
19759 PR target/85281
19760 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19761 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19762 other than V2DFmode using iptr mode attribute.
19763 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19764
19765 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19766
19767 PR rtl-optimization/84659
19768 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19769
19770 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19771
19772 PR debug/85302
19773 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19774 SIZEP is NULL.
19775 (output_loc_list): Pass address of a dummy size variable even in the
19776 locview handling loop.
19777 (index_location_lists): Add comment on why skip_loc_list_entry can't
19778 call size_of_locs.
19779
19780 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19781
19782 PR target/85261
19783 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19784 into register.
19785
19786 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19787
19788 PR target/85321
19789 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19790 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19791 and -mstring-compare-inline-limit.
19792
19793 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19794
19795 PR target/85287
19796 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19797 for stack clash protection in a register whenever we need it to be in
19798 a register.
19799
19800 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19801
19802 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19803 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19804
19805 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19806
19807 PR target/85321
19808 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19809 the help text.
19810 (mlong-double-): Ditto.
19811 * config/rs6000/sysv4.opt (msdata=): Ditto.
19812 (mtls-size=): Ditto.
19813
19814 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19815
19816 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19817 erroneous entries for
19818 "vector int vec_ldl (int, long int *)", and
19819 "vector unsigned int vec_ldl (int, unsigned long int *)".
19820 Add comments and entries for
19821 "vector bool char vec_ldl (int, bool char *)",
19822 "vector bool short vec_ldl (int, bool short *)",
19823 "vector bool int vec_ldl (int, bool int *)",
19824 "vector bool long long vec_ldl (int, bool long long *)",
19825 "vector pixel vec_ldl (int, pixel *)",
19826 "vector long long vec_ldl (int, long long *)",
19827 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19828 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19829 type tree bool_long_long_type_node and correct definition of
19830 bool_V2DI_type_node to make reference to this new type tree.
19831 (rs6000_mangle_type): Replace erroneous reference to
19832 bool_long_type_node with bool_long_long_type_node.
19833 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19834 comments to emphasize sign distinctions for char and int types and
19835 replace RS6000_BTI_bool_long constant with
19836 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19837 use of RS6000_BTI_pixel.
19838 (bool_long_type_node): Remove this macro definition.
19839 (bool_long_long_type_node): New macro definition
19840
19841 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19842
19843 PR rtl-optimization/85300
19844 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19845 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19846 simplify_unary_operation fails.
19847
19848 2018-04-10 Martin Liska <mliska@suse.cz>
19849
19850 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19851 cgraph_edge and ipa_ref.
19852
19853 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19854
19855 PR target/85177
19856 PR target/85255
19857 * config/i386/sse.md
19858 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19859 computation of the VEC_MERGE selector from mask.
19860 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19861 Fix decoding of the VEC_MERGE selector into mask.
19862
19863 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19864
19865 PR tree-optimization/85286
19866 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19867
19868 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19869
19870 * final.c (final_1): Set insn_last_address as well as
19871 insn_current_address.
19872
19873 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19874
19875 PR target/85173
19876 * explow.c (emit_stack_probe): Call validize_mem on memory location
19877 before passing it to gen_probe_stack. Create address operand and
19878 legitimize it for the probe_stack_address case.
19879
19880 2018-04-09 Jan Hubicka <jh@suse.cz>
19881
19882 PR lto/85078
19883 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19884 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19885 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19886 walk basetypes.
19887 (free_lang_data): Rebuild type inheritance graph.
19888
19889 2018-04-09 Martin Sebor <msebor@redhat.com>
19890
19891 * invoke.texi (-finline-small-functions): Mention other optimization
19892 options.
19893 (-findirect-inlining, -fpartial-inlining): Same.
19894 (-finline-functions-called-once): Same.
19895 (-freorder-blocks-and-partition): Same.
19896
19897 2018-04-09 Jan Hubicka <jh@suse.cz>
19898
19899 PR rtl/84058
19900 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19901 jumps; choose last target that matches the criteria (i.e.
19902 no partition changes for non-crossing jumps).
19903 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19904 support for redirecting crossing jumps to non-crossing.
19905
19906 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19907
19908 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19909 also for naked functions.
19910
19911 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19912
19913 * config/arc/arc.md (add_shift): New pattern.
19914 (add_shift2): Likewise.
19915 (sub_shift): Likewise.
19916 (sub_shift_cmp0_noout): Likewise.
19917 (compare_si_ashiftsi): Likewise.
19918 (xbfu_cmp0_noout): New combine pattern.
19919 (xbfu_cmp0"): Likewise.
19920 (movsi_set_cc_insn): Place the predicable variant first.
19921 (commutative_binary_cmp0_noout): Remove clobber.
19922 (commutative_binary_cmp0): New pattern.
19923 (noncommutative_binary_cmp0): Likewise.
19924 (noncommutative_binary_cmp0_noout): Likewise.
19925 (noncommutative_binary_comparison_result_used): Removed.
19926 (rsub_cmp0): New pattern.
19927 (rsub_cmp0_noout): Likewise.
19928 (extzvsi): Changed, keep only meaningful variants.
19929 (SQH, SEZ): New iterators.
19930 (SQH_postfix): New mode attribute.
19931 (SEZ_prefix): New code attribute.
19932 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19933 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19934 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19935 of numerical value.
19936 (noncommutative_operator): Check the availability of barrel
19937 shifter option.
19938
19939 2018-04-09 Richard Biener <rguenther@suse.de>
19940
19941 PR tree-optimization/85284
19942 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19943 Only use the niter constraining form of simple_iv when the exit
19944 is always executed.
19945
19946 2018-04-09 Tom de Vries <tom@codesourcery.com>
19947
19948 PR target/84041
19949 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19950 (define_expand "*memory_barrier"): New define_expand.
19951 (define_insn "memory_barrier"): New insn.
19952
19953 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19954
19955 PR rtl-optimization/80463
19956 PR rtl-optimization/83972
19957 PR rtl-optimization/83480
19958
19959 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19960 correct producer for the insn.
19961 (tidy_control_flow): Fixup seqnos in case of debug insns.
19962
19963 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19964
19965 PR rtl-optimization/83913
19966
19967 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19968 different sched-times when merging exprs.
19969
19970 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19971
19972 PR rtl-optimization/83962
19973
19974 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19975 tidy_fallthru_edge and tidy_control_flow.
19976
19977 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19978
19979 PR rtl-optimization/83530
19980
19981 * sel-sched.c (force_next_insn): New global variable.
19982 (remove_insn_for_debug): When force_next_insn is true, also leave only
19983 next insn in the ready list.
19984 (sel_sched_region): When the region wasn't scheduled, make another pass
19985 over it with force_next_insn set to 1.
19986
19987 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19988
19989 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19990 into tm_file.
19991 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19992 for interrupt control.
19993 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19994 functions for interrupt control.
19995 * config/nds32/nds32-intrinsic.md: Likewise.
19996 * config/nds32/nds32_intrinsic.h: Likewise.
19997 * config/nds32/nds32.h (nds32_builtins): Likewise.
19998
19999 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20000
20001 * config/nds32/nds32.c (nds32_init_machine_status,
20002 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
20003 strict_aligned_p field.
20004 (nds32_expand_to_rtl_hook): New function.
20005 (TARGET_EXPAND_TO_RTL_HOOK): Define.
20006 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
20007
20008 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20009 Chung-Ju Wu <jasonwucj@gmail.com>
20010
20011 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
20012 * config/nds32/nds32-n7.md: New file.
20013 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
20014 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
20015 pipeline.
20016 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
20017 * config/nds32/nds32.md (pipeline_model): Add n7.
20018 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
20019 * config/nds32/pipelines.md: Include n7 settings.
20020
20021 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20022 Chung-Ju Wu <jasonwucj@gmail.com>
20023
20024 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
20025 * config/nds32/nds32-e8.md: New file.
20026 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
20027 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
20028 pipeline.
20029 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
20030 * config/nds32/nds32.md (pipeline_model): Add e8.
20031 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
20032 * config/nds32/pipelines.md: Include e8 settings.
20033
20034 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20035 Chung-Ju Wu <jasonwucj@gmail.com>
20036
20037 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
20038 * config/nds32/nds32-n8.md: New file.
20039 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
20040 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
20041 pipeline.
20042 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
20043 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
20044 * config/nds32/nds32.md (pipeline_model): Add n8.
20045 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
20046 * config/nds32/pipelines.md: Include n8 settings.
20047
20048 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20049 Chung-Ju Wu <jasonwucj@gmail.com>
20050
20051 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
20052 * config/nds32/nds32-n9-2r1w.md: New file.
20053 * config/nds32/nds32-n9-3r2w.md: New file.
20054 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
20055 nds32_register_ports): New or modify for cpu n9.
20056 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
20057 pipeline.
20058 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
20059 * config/nds32/nds32-utils.c: New file.
20060 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
20061 TARGET_MUL_SLOW): Define.
20062 * config/nds32/nds32.md (pipeline_model): New attribute.
20063 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
20064 New options that support cpu n9.
20065 * config/nds32/pipelines.md: Include n9 settings.
20066 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
20067
20068 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20069
20070 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
20071 information if necessary.
20072 (output_cond_branch_compare_zero): Likewise.
20073 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
20074 (nds32_target_alignment): Refine for alignment.
20075 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
20076 (FUNCTION_BOUNDARY): Modify.
20077 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
20078 align case.
20079 * config/nds32/nds32.opt (malways-align, malign-functions): New.
20080
20081 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20082
20083 * config/nds32/constants.md (unspec_volatile_element): Add values for
20084 TLB operation and data prefetch.
20085 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20086 functions for TLB operation and data prefetch.
20087 * config/nds32/nds32-intrinsic.md: Likewise.
20088 * config/nds32/nds32_intrinsic.h: Likewise.
20089 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
20090 (nds32_print_operand): Likewise.
20091 * config/nds32/nds32.h (nds32_builtins): Likewise.
20092
20093 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
20094 Andrew Pinski <pinsika@gcc.gnu.org>
20095
20096 PR middle-end/82976
20097 * match.pd: Use constant_boolean_node of correct type instead of
20098 boolean_true_node or boolean_false_node for simplifying
20099 pointer comparisons to zero.
20100
20101 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20102
20103 PR tree-optimization/80021
20104 * tree.c (verify_type_variant): Make error call in verify_variant_match
20105 translatable and remove final full stop.
20106
20107 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20108
20109 * config/nds32/constants.md (unspec_volatile_element): Add
20110 UNSPEC_VOLATILE_EH_RETURN.
20111 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
20112 nds32_output_stack_pop): Support dwarf exception handling process.
20113 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
20114 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
20115 exception handling process.
20116 (nds32_compute_stack_frame): Likewise.
20117 (nds32_return_addr_rtx): Likewise.
20118 (nds32_initial_elimination_offset): Likewise.
20119 (nds32_expand_prologue): Likewise.
20120 (nds32_expand_epilogue): Likewise.
20121 (nds32_dynamic_chain_address): New function.
20122 * config/nds32/nds32.h (machine_function): Add fields for dwarf
20123 exception handling.
20124 (DYNAMIC_CHAIN_ADDRESS): Define.
20125 (EH_RETURN_DATA_REGNO): Define.
20126 (EH_RETURN_STACKADJ_RTX): Define.
20127 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
20128 patterns for dwarf exception handling.
20129
20130 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20131
20132 * config/nds32/nds32.h: Clean up obsolete macros.
20133
20134 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20135
20136 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20137 Add enum values for particular instructions.
20138 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20139 particular intrinsic functions.
20140 * config/nds32/nds32-intrinsic.md: Likewise.
20141 * config/nds32/nds32_intrinsic.h: Likewise.
20142 * config/nds32/nds32.h (nds32_builtins): Likewise.
20143 * config/nds32/nds32.md (type): Add pbsad and pbsada.
20144 (btst, ave): New patterns for particular instructions.
20145
20146 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20147
20148 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20149 Add enum values for atomic load/store and memory sync.
20150 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
20151 and memory sync.
20152 * config/nds32/nds32-intrinsic.md: Likewise.
20153 * config/nds32/nds32_intrinsic.h: Likewise.
20154 * config/nds32/nds32.h (nds32_builtins): Likewise.
20155
20156 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20157
20158 PR tree-optimization/85257
20159 * fold-const.c (native_encode_vector): If not all elts could fit
20160 and off is -1, return 0 rather than offset.
20161 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
20162 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
20163 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
20164 adjust buffer in native_interpret_expr call.
20165
20166 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20167
20168 * config/nds32/constants.md (unspec_volatile_element): Add cache
20169 control enum values.
20170 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20171 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20172 * config/nds32/nds32.c (nds32_cctl_names): New.
20173 (nds32_print_operand): Handle cache control register names.
20174 * config/nds32/nds32.h (nds32_builtins): New enum values.
20175 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20176 macros.
20177 * config/nds32/nds32.md (type): Add mmu.
20178 * config/nds32/pipelines.md (simple_insn): Add mmu.
20179
20180 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20181
20182 * config/nds32/nds32.md (type): Remove call.
20183 * config/nds32/pipelines.md (simple_insn): Likewise.
20184
20185 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20186
20187 * config/nds32/constants.md (unspec_volatile_element): Add
20188 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20189 UNSPEC_VOLATILE_FMFCFG.
20190 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20191 description for fmfcfg and fmfcsr.
20192 (bdesc_1arg): Add fmtcsr.
20193 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20194 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20195 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20196 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20197 unspec_fmfcfg): New patterns.
20198 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20199 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20200 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20201 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20202 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20203 __nds32__fmfcfg): Define.
20204
20205 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20206
20207 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20208 intrinsic register names.
20209 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20210 intrinsic register enum values and macros.
20211
20212 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20213
20214 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20215 for load/store addressing form.
20216 (nds32_print_operand_address): Likewise.
20217
20218 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
20219
20220 PR target/85196
20221 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20222 based on LABEL_REF. Remove useless assertion.
20223 (pic_address_needs_scratch): Fix formatting.
20224 (sparc_legitimize_pic_address): Minor tweaks.
20225 (sparc_delegitimize_address): Adjust assertion accordingly.
20226 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20227 into symbolic_operand.
20228 (movsi_high_pic_label_ref): Likewise.
20229 (movsi_lo_sum_pic_label_ref): Likewise.
20230 (movdi_pic_label_ref): Likewise.
20231 (movdi_high_pic_label_ref): Likewise.
20232 (movdi_lo_sum_pic_label_ref): Likewise.
20233
20234 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
20235
20236 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20237 custom LIB_SPEC setup.
20238
20239 2018-04-06 Ruslan Bukin <br@bsdpad.com>
20240 Kito Cheng <kito.cheng@gmail.com>
20241
20242 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20243 * config/riscv/freebsd.h: New.
20244
20245 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20246
20247 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20248 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20249 file.
20250
20251 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20252 Kito Cheng <kito.cheng@gmail.com>
20253
20254 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20255 nds32_output_call, nds32_symbol_binds_local_p): New functions.
20256 * config/nds32/nds32-protos.h (nds32_output_call,
20257 nds32_output_return): Declare.
20258 * config/nds32/nds32.md: Refine all the call and return patterns.
20259
20260 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20261
20262 PR debug/85252
20263 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20264 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20265
20266 PR rtl-optimization/84872
20267 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20268 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20269 EDGE_CROSSING edge.
20270
20271 2018-04-06 Tamar Christina <tamar.christina@arm.com>
20272
20273 * expr.c (copy_blkmode_to_reg): Revert 254862.
20274 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20275
20276 2018-04-06 Richard Biener <rguenther@suse.de>
20277
20278 PR middle-end/85244
20279 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20280 after seeing a component reference with an adjacent field. Treat
20281 refs to arrays at struct end of external decls similar to
20282 refs to unconstrained commons.
20283
20284 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20285
20286 PR sanitizer/85213
20287 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20288 look through SAVE_EXPRs with non-side-effects argument. Adjust
20289 recursive calls.
20290 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20291 save_p here.
20292
20293 2018-04-06 Richard Biener <rguenther@suse.de>
20294
20295 PR middle-end/85180
20296 * alias.c (find_base_term): New wrapper around find_base_term
20297 unwinding CSELIB_VAL_PTR changes.
20298 (find_base_term): Do not restore CSELIB_VAL_PTR during the
20299 recursion.
20300
20301 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20302
20303 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20304 instructions.
20305 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20306 constant definitions.
20307 ("nop"): lr 0,0 -> nopr r0
20308 ("nop_lr0", "nop_lr1"): New insn definitions.
20309
20310 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20311
20312 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20313 NDS32_V3PUSH_AVAILABLE_P macro.
20314
20315 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
20316 Chung-Ju Wu <jasonwucj@gmail.com>
20317
20318 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20319 (nds32*-*-*): Add float and fpu_config into supported_defaults.
20320 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20321 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20322 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20323 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20324 * config/nds32/constraints.md: New constraints and checking for hard
20325 float configuration.
20326 * config/nds32/iterators.md: New mode iterator and attribute for hard
20327 float configuration.
20328 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20329 patterns.
20330 * config/nds32/nds32-fpu.md: New file.
20331 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20332 deal with hard float code generation.
20333 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20334 ARCH_V3S.
20335 (abi_type, float_reg_number): New enum type.
20336 * config/nds32/nds32-predicates.c: New predicates for hard float.
20337 * config/nds32/nds32-protos.h: Declare functions for hard float.
20338 * config/nds32/nds32.c: Implementation for hard float configuration.
20339 * config/nds32/nds32.h: Definitions for hard float configuration.
20340 * config/nds32/nds32.md: Include hard float machine description and
20341 modify patterns for hard float configuration.
20342 * config/nds32/nds32.opt: New options for hard float configuration.
20343 * config/nds32/predicates.md: New predicates for hard float
20344 configuration.
20345
20346 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20347
20348 * common/config/nds32/nds32-common.c
20349 (nds32_option_optimization_table): Enable -mreleax-hint by default.
20350
20351 2018-04-05 Jakub Jelinek <jakub@redhat.com>
20352
20353 PR middle-end/85195
20354 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20355 CONSTRUCTOR_ELT (ctor, ...)->value.
20356
20357 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
20358
20359 PR target/85193
20360 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20361
20362 2018-04-05 Tom de Vries <tom@codesourcery.com>
20363
20364 PR target/85204
20365 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20366 cond jump.
20367
20368 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20369 Kito Cheng <kito.cheng@gmail.com>
20370
20371 * config/nds32/constraints.md (U33): Fine-tune checking condition.
20372 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20373 * config/nds32/nds32.h (nds32_16bit_address_type): Add
20374 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20375
20376 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20377 Kito Cheng <kito.cheng@gmail.com>
20378
20379 * config/nds32/constraints.md (Ufe): New memory constraint.
20380 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20381 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20382 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20383 operands.
20384 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20385 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20386
20387 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20388
20389 * config/nds32/nds32.md: Use optimize_size in the condition for
20390 alu-shift instructions.
20391
20392 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20393
20394 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20395
20396 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20397
20398 * config/nds32/nds32.md (negsi2): Refine pattern.
20399
20400 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20401 Chung-Ju Wu <jasonwucj@gmail.com>
20402
20403 * config/nds32/iterators.md (shift_rotate): New code iterator.
20404 (shift): New code attribute.
20405 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20406 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20407 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20408 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20409 bit-wise operations.
20410 (andsi3, *andsi3): Ditto.
20411 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20412 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20413 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20414 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20415 nds32_ior_operand, nds32_xor_operand): New predicates.
20416
20417 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20418
20419 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20420 (addsi3, subsi3): ... this.
20421
20422 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20423
20424 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20425
20426 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20427
20428 * config/nds32/nds32.md: Adjust indention.
20429
20430 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20431
20432 * config/nds32/nds32.md (feature): New attribute.
20433
20434 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20435
20436 * config/nds32/nds32.md (subtype): New attribute.
20437
20438 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20439
20440 PR target/85203
20441 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20442 expansion to perform a bitwise AND of the argument followed by a
20443 boolean negation of the result.
20444
20445 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20446
20447 PR rtl-optimization/84878
20448 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20449 the basic block. Assert the use reference is not artificial and that
20450 it has an associated insn.
20451
20452 2018-04-04 Michael Matz <matz@suse.de>
20453
20454 * builtins.c (compute_objsize): Pass correct operand
20455 to array_at_struct_end_p.
20456
20457 2018-04-04 Richard Biener <rguenther@suse.de>
20458
20459 PR lto/85176
20460 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20461 from contexts for DINFO_LEVEL_TERSE and below.
20462
20463 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20464
20465 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20466 resiter_operand condition.
20467 * config/nds32/nds32.md (*move<mode>): Ditto.
20468
20469 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20470 Monk Chiang <sh.chiang04@gmail.com>
20471
20472 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20473
20474 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20475
20476 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20477
20478 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20479 Kito Cheng <kito.cheng@gmail.com>
20480
20481 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20482 nds32_cond_code_str, output_cond_branch,
20483 output_cond_branch_compare_zero, nds32_expand_cbranch,
20484 nds32_expand_cstore, nds32_expand_movcc,
20485 nds32_output_cbranchsi4_equality_zero,
20486 nds32_output_cbranchsi4_equality_reg,
20487 nds32_output_cbranchsi4_equality_reg_or_const_int,
20488 nds32_output_cbranchsi4_greater_less_zero: New functions.
20489 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20490 nds32_expand_cstore, nds32_expand_movcc,
20491 nds32_output_cbranchsi4_equality_zero,
20492 nds32_output_cbranchsi4_equality_reg,
20493 nds32_output_cbranchsi4_equality_reg_or_const_int,
20494 nds32_output_cbranchsi4_greater_less_zero): Declare.
20495 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20496 nds32_rimm11s_operand): New predicates.
20497 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20498 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20499 patterns.
20500
20501 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20502
20503 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20504 * config/nds32/nds32.md: Ditto.
20505 * config/nds32/pipelines.md: Ditto.
20506
20507 2018-04-04 Richard Biener <rguenther@suse.de>
20508
20509 PR tree-optimization/85168
20510 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20511 propagating abnormals.
20512
20513 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20514
20515 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20516
20517 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20518 Kito Cheng <kito.cheng@gmail.com>
20519
20520 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20521 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20522 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20523 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20524 * config/nds32/nds32.md (sibcall_internal): New.
20525 (sibcall_register): Remove.
20526 (sibcall_immediate): Remove.
20527 (sibcall_value_internal): New.
20528 (sibcall_value_register): Remove.
20529 (sibcall_value_immediate): Remove.
20530 * config/nds32/predicates.md (nds32_general_register_operand): New.
20531 (nds32_call_address_operand): New.
20532
20533 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20534
20535 PR rtl-optimization/85167
20536 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20537 bb_defs if *split_p, instead preinitialize it to NULL.
20538
20539 PR tree-optimization/85156
20540 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20541 evaluating the argument multiple times.
20542
20543 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20544
20545 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20546 than vector.
20547 (_mm_cvtpd_ps): Likewise.
20548 (_mm_cvttpd_epi32): Likewise.
20549 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20550 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20551 vector, pixel, and bool following altivec.h include.
20552
20553 2018-04-03 Martin Sebor <msebor@redhat.com>
20554
20555 * doc/extend.texi (Common Function Attributes): Clarify.
20556 (const attribute): Likewise.
20557 (pure attribute): Likewise.
20558
20559 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20560
20561 PR target/85169
20562 * config/i386/i386.c (ix86_expand_vector_set): Use
20563 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20564
20565 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20566
20567 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20568 instructions when changing rounding bits to preserve precision bits
20569 in the x87 control word.
20570
20571 2018-04-03 Martin Liska <mliska@suse.cz>
20572
20573 PR tree-optimization/82491
20574 * rtl.h (strip_offset_and_add): Replace += suboffset with
20575 poly_uint64 () + suboffset.
20576
20577 2018-03-29 Martin Liska <mliska@suse.cz>
20578 Martin Jambor <mjambor@suse.cz>
20579
20580 PR ipa/84947
20581 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20582 param_type is not an integral or pointer type.
20583
20584 2018-04-03 Richard Biener <rguenther@suse.de>
20585
20586 * sese.h (recompute_all_dominators): Remove.
20587
20588 2018-04-02 Martin Sebor <msebor@redhat.com>
20589
20590 * doc/invoke.texi (-Wrestrict): Fix typos.
20591
20592 2018-04-02 Jim Wilson <jimw@sifive.com>
20593
20594 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20595 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20596 (<optab>di3, <optab>si3_extend): Likewise.
20597 (<optab>si3_mask, <optab>si3_mask_1): New.
20598 (<optab>di3_mask, <optab>di3_mask_1): New.
20599 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20600 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20601 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20602
20603 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20604
20605 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20606 example.
20607
20608 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20609
20610 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20611 (nds32_canonicalize_comparison): New function.
20612
20613 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20614 Kito Cheng <kito.cheng@gmail.com>
20615 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20616
20617 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20618 * config/nds32/constants.md (unspec_volatile_element): Add
20619 UNSPEC_VOLATILE_RELAX_GROUP.
20620 * config/nds32/nds32-relax-opt.c: New file.
20621 * config/nds32/nds32-predicates.c
20622 (nds32_symbol_load_store_p): New function.
20623 * config/nds32/nds32-protos.h
20624 (nds32_symbol_load_store_p): Declare function.
20625 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20626 * config/nds32/nds32.c
20627 (nds32_register_pass): New function to register pass.
20628 (nds32_register_passes): New function to register passes.
20629 * config/nds32/nds32.md (relax_group): New pattern.
20630 * config/nds32/nds32.opt (mrelax-hint): New option.
20631 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20632
20633 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20634
20635 * config/nds32/t-nds32: Modify files dependency.
20636
20637 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20638
20639 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20640 (PROFILE_HOOK): Define its implementation.
20641
20642 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20643
20644 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20645 type and 32-bit size.
20646
20647 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20648
20649 PR middle-end/85090
20650 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20651 (V_128_256): New mode iterator.
20652 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20653 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20654 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20655 of V.
20656 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20657 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20658
20659 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20660
20661 PR target/83315
20662 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20663 NaN inputs correctly.
20664
20665 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20666
20667 PR target/80546
20668 * config/rs6000/vsx.md (??r): New mode attribute.
20669 (*vsx_mov<mode>_64bit): Use it.
20670 (*vsx_mov<mode>_32bit): Likewise.
20671
20672 2018-03-30 Martin Sebor <msebor@redhat.com>
20673
20674 PR tree-optimization/84818
20675 * builtins.c (check_access): Use warning_n.
20676
20677 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20678
20679 PR target/83822
20680 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20681 condition.
20682 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20683 condition.
20684
20685 2018-03-30 Julia Koval <julia.koval@intel.com>
20686
20687 PR target/84413
20688 * x86-tune.def (movx, partial_reg_dependency): Enable for
20689 m_SKYLAKE_AVX512.
20690
20691 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20692
20693 PR inline-asm/84985
20694 * lra-constraints.c (process_alt_operands): Move setting
20695 this_alternative_matches below.
20696
20697 2018-03-29 Martin Liska <mliska@suse.cz>
20698
20699 PR lto/84995.
20700 * doc/invoke.texi: Document how LTO works with debug info.
20701 Describe auto-load support of binutils. Mention 'x86-64'
20702 as valid option value of -march option.
20703
20704 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20705
20706 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20707
20708 PR c/85094
20709 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20710 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20711 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20712 checking.
20713
20714 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20715
20716 PR target/84912
20717 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20718 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20719 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20720 for RS6000_BTM_POWERPC64.
20721 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20722 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20723 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20724 definition.
20725 (DIVDE): Use it.
20726 (DIVDEU): Likewise.
20727
20728 2018-03-28 Carl Love <cel@us.ibm.com>
20729
20730 Revert
20731 2017-09-27 Carl Love <cel@us.ibm.com>
20732
20733 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20734 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20735 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20736 fctiw instruction.
20737
20738 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20739
20740 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20741 instead of __vector bool.
20742 (_mm_max_pu8): Likewise.
20743 (_mm_min_pi16): Likewise.
20744
20745 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20746
20747 PR target/84912
20748 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20749 (DIVWEUO): Likewise.
20750 (DIVDEO): Likewise.
20751 (DIVDEUO): Likewise.
20752 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20753 DIVWEUO and DIVDEUO.
20754 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20755 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20756 (div_extend): Likewise.
20757 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20758 builtin function.
20759 (__builtin_divweuo): Likewise.
20760 (__builtin_divdeo): Likewise.
20761 (__builtin_divdeuo): Likewise.
20762
20763 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20764
20765 PR target/85095
20766 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20767 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20768
20769 PR tree-optimization/82004
20770 * gimple-match-head.c (optimize_pow_to_exp): New function.
20771 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20772 Don't fold to exp if optimize_pow_to_exp is false.
20773
20774 2018-03-28 Martin Liska <mliska@suse.cz>
20775
20776 PR other/84819
20777 * calls.c (initialize_argument_information): Fix trailing space.
20778 * common.opt: Fix typo and provide better explanation for
20779 -fsanitize-coverage option.
20780 * config/i386/i386.opt: Fix typo.
20781
20782 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20783 Martin Liska <mliska@suse.cz>
20784
20785 PR sanitizer/85081
20786 * gimplify.c (asan_poison_variable): Don't do the check for
20787 gimplify_omp_ctxp here.
20788 (gimplify_decl_expr): Do it here.
20789 (gimplify_target_expr): Likewise.
20790
20791 2018-03-28 Martin Liska <mliska@suse.cz>
20792
20793 PR target/84988
20794 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20795 chkp_type_bounds_count if MPX is not enabled.
20796
20797 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20798
20799 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20800
20801 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20802
20803 PR target/84914
20804 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20805 function to create the function decl for complex long double
20806 multiply and divide for -mabi=ieeelongdouble.
20807 (init_float128_ieee): Call it.
20808
20809 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20810
20811 PR target/85044
20812 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20813 -fcf-protection=branch -mibt.
20814 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20815
20816 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20817
20818 PR target/81863
20819 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20820 arm_word_relocations.
20821
20822 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20823
20824 PR target/85056
20825 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20826 extern array declarations.
20827
20828 2018-03-27 Richard Biener <rguenther@suse.de>
20829
20830 PR middle-end/84067
20831 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20832 explicit single_use checks.
20833
20834 2018-03-27 Richard Biener <rguenther@suse.de>
20835
20836 PR tree-optimization/85082
20837 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20838 Valueize the VUSE.
20839
20840 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20841
20842 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20843 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20844 Turn on fasynchronous-unwind-tables and funwind-tables.
20845
20846 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20847
20848 PR target/85073
20849 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20850 (*bmi_blsr_<mode>_ccz): Ditto.
20851
20852 2018-03-26 Tom de Vries <tom@codesourcery.com>
20853
20854 PR tree-optimization/85063
20855 * omp-general.c (offloading_function_p): New function. Factor out
20856 of ...
20857 * omp-offload.c (pass_omp_target_link::gate): ... here.
20858 * omp-general.h (offloading_function_p): Declare.
20859 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20860 with attribute omp declare target for offloading functions.
20861
20862 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20863
20864 PR tree-optimization/84005
20865 * tree-data-ref.h (get_base_for_alignment): Declare.
20866 * tree-data-ref.c (get_base_for_alignment_1): New function.
20867 (get_base_for_alignment): Likewise.
20868 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20869 get_base_for_alignment to find a suitable base object, instead
20870 of always using drb->base_address.
20871
20872 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20873
20874 PR inline-asm/85022
20875 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20876 known size by default.
20877
20878 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20879
20880 PR inline-asm/85030
20881 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20882 and non BLKmode operands.
20883
20884 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20885
20886 PR target/85026
20887 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20888 Clean up attributes.
20889
20890 2018-03-23 Richard Biener <rguenther@suse.de>
20891
20892 PR debug/85020
20893 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20894 we are going to emit early debug for LTO.
20895
20896 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20897
20898 PR inline-asm/85034
20899 * function.c (match_asm_constraints_1): Don't optimize if input
20900 doesn't satisfy general_operand predicate for output's mode.
20901
20902 PR inline-asm/85022
20903 * alias.c (write_dependence_p): Don't require for x_canonicalized
20904 non-VOIDmode if x has VOIDmode.
20905
20906 PR sanitizer/85029
20907 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20908 just don't try to optimize it rather than assert it never happens.
20909
20910 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20911
20912 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20913 macro expansions for definition of ST_INTERNAL_<mode> and
20914 LD_INTERNAL_<mode> builtins.
20915 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20916 Remove prototype.
20917 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20918 function.
20919 (altivec_expand_st_builtin): Likewise.
20920 (altivec_expand_builtin): Remove calls to deleted functions.
20921 (rs6000_address_for_altivec): Delete this function.
20922 * config/rs6000/vector.md: Remove expands for
20923 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20924
20925 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20926
20927 PR target/84826
20928 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20929 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20930 re-computing once computed.
20931 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20932 (arm_init_machine_status): Initialize
20933 machine->static_chain_stack_bytes.
20934
20935 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20936
20937 PR target/84760
20938 * doc/extend.texi: Add four new prototypes for vec_ld.
20939 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20940 definitions for more logical presentation.
20941 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20942 entries for V1TI variants of __builtin_altivec_ld builtin.
20943 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20944 handling of V1TI variant of LVX icode pattern.
20945 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20946 (rs6000_gimple_fold_builtin): Likewise.
20947 (altivec_init_builtins): Add code to define
20948 __builtin_altivec_lvx_v1ti function.
20949
20950 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20951
20952 PR inline-asm/84941
20953 * function.c (match_asm_constraints_1): Don't do the optimization
20954 if input isn't a REG, SUBREG, MEM or constant.
20955
20956 2018-03-22 Tom de Vries <tom@codesourcery.com>
20957
20958 PR tree-optimization/84956
20959 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20960 bb_has_abnormal_pred.
20961
20962 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20963
20964 PR sanitizer/85018
20965 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20966 DECL_INITIAL (decl) to decl at the end.
20967 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20968 adjust the comment.
20969
20970 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20971
20972 * doc/extend.texi (__builtin_tgmath): Document when complex
20973 integer types are treated as _Complex _Float64.
20974
20975 2018-03-21 Tom de Vries <tom@codesourcery.com>
20976
20977 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20978
20979 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20980
20981 PR tree-optimization/84960
20982 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20983 if it is ENTRY block, move them into single succ of ENTRY in that case.
20984
20985 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20986
20987 PR tree-optimization/84811
20988 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20989 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20990 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20991 (known_subrange_p): Update accordingly. Cast each value involved
20992 in the size comparison, rather than casting the result of the
20993 subtraction.
20994
20995 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20996
20997 PR tree-optimization/84982
20998 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20999 by flipping the least significant bit rather than all bits from
21000 bitpos to bitpos + bitsize - 1.
21001
21002 2018-03-21 Nathan Sidwell <nathan@acm.org>
21003
21004 * doc/extend.texi (Deprecated Features): Remove mention of
21005 long-deleted deprecations.
21006
21007 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21008
21009 PR jit/84288
21010 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
21011 * configure: Regenerate.
21012
21013 2018-03-21 Tom de Vries <tom@codesourcery.com>
21014
21015 PR tree-optimization/83126
21016 * tree-parloops.c (num_phis): New function.
21017 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
21018
21019 2018-03-21 Nathan Sidwell <nathan@acm.org>
21020
21021 * doc/extend.texi (Deprecated Features): Update deprecated flags,
21022 mention anon-struct/union members and trailing attributes.
21023
21024 2018-03-21 Bin Cheng <bin.cheng@arm.com>
21025
21026 PR tree-optimization/84969
21027 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
21028 builtin memset partitions if they set different rhs values.
21029
21030 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21031
21032 PR rtl-optimization/84989
21033 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
21034 VEC_DUPLICATE with scalar result mode.
21035
21036 2018-03-21 Martin Liska <mliska@suse.cz>
21037
21038 PR ipa/84963
21039 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
21040 not intended return statement.
21041
21042 2018-03-21 Martin Liska <mliska@suse.cz>
21043
21044 PR target/84988
21045 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
21046 (chkp_find_bound_slots_1): Limit number of iterations.
21047
21048 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
21049
21050 PR target/84838
21051 * Minor grammar fixes for x86 options.
21052
21053 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21054
21055 PR debug/84875
21056 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
21057 holding REG_CFA_RESTORE notes, instead turn them into a USE.
21058
21059 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
21060
21061 PR target/83789
21062 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
21063 (altivec_lvx_<mode>_1op): Likewise.
21064 (altivec_stvx_<mode>_2op): Likewise.
21065 (altivec_stvx_<mode>_1op): Likewise.
21066 (altivec_lvx_<VM2:mode>): New define_expand.
21067 (altivec_stvx_<VM2:mode>): Likewise.
21068 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
21069 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21070 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
21071 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21072 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
21073 (rs6000_gen_lvx): Likewise.
21074 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
21075 (altivec_expand_stv_builtin): Likewise.
21076 (altivec_expand_builtin): Likewise.
21077 * config/rs6000/vector.md: Likewise.
21078
21079 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21080
21081 PR target/82518
21082 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
21083 BYTES_BIG_ENDIAN.
21084
21085 2018-03-20 Richard Biener <rguenther@suse.de>
21086
21087 PR target/84986
21088 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
21089 sign-conversions as zero, fall back to standard scalar_stmt
21090 cost for the rest.
21091
21092 2018-03-20 Martin Liska <mliska@suse.cz>
21093
21094 PR ipa/84825
21095 * predict.c (rebuild_frequencies): Handle case when we have
21096 PROFILE_ABSENT, but flag_guess_branch_prob is false.
21097
21098 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21099
21100 PR target/84990
21101 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
21102 flag_section_anchors.
21103 * varasm.c (use_blocks_for_decl_p): Remove hack for
21104 dw2_force_const_mem.
21105
21106 PR target/84845
21107 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
21108 to ...
21109 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
21110 be created, use lowpart_subreg of operands[0] rather than operands[0]
21111 itself.
21112 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
21113 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
21114 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
21115 and n constraint instead of aarch64_shift_imm_di and Usd.
21116 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
21117 (*aarch64_<optab>_reg_minus<mode>3): ... this.
21118
21119 2018-03-20 Sudakshina Das <sudi.das@arm.com>
21120
21121 PR target/82989
21122 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
21123 to favor GPR over NEON registers.
21124 (<shift>di3_neon): Likewise.
21125
21126 2018-03-20 Tom de Vries <tom@codesourcery.com>
21127
21128 PR target/84952
21129 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
21130 (nvptx_process_pars): Emit bar.sync asap and alap.
21131
21132 2018-03-20 Tom de Vries <tom@codesourcery.com>
21133
21134 PR target/84954
21135 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
21136 seen_label if seen_label is already set.
21137
21138 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21139
21140 PR target/84945
21141 * config/i386/i386.c (fold_builtin_cpu): For features above 31
21142 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
21143 Use 1U instead of 1. Formatting fixes.
21144
21145 PR c/84953
21146 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
21147 instead of TREE_TYPE (s1) for the return value.
21148
21149 2018-03-19 Jakub Jelinek <jakub@redhat.com>
21150
21151 PR tree-optimization/84946
21152 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
21153 bitsize + bitsize in poly_uint64 rather than poly_int64.
21154
21155 PR sanitizer/78651
21156 * dwarf2asm.c: Include fold-const.c.
21157 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
21158 of decl rather than decl itself.
21159
21160 PR rtl-optimization/84643
21161 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
21162
21163 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
21164
21165 PR sanitizer/78651
21166 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21167 calling assemble_variable.
21168
21169 2018-03-19 Sudakshina Das <sudi.das@arm.com>
21170
21171 PR target/81647
21172 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21173 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21174
21175 2018-03-19 Jim Wilson <jimw@sifive.com>
21176
21177 PR bootstrap/84856
21178 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21179 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21180 (riscv_first_stack_step): Likewise.
21181 (riscv_option_override): Use STACK_BOUNDARY instead of
21182 MIN_STACK_BOUNDARY.
21183 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21184 MIN_STACK_BOUNDARY.
21185 (BIGGEST_ALIGNMENT): Set to 128.
21186 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21187 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21188 STACK_BOUNDARY.
21189
21190 2018-03-19 Richard Biener <rguenther@suse.de>
21191
21192 PR tree-optimization/84933
21193 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21194 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21195
21196 2018-03-19 Richard Biener <rguenther@suse.de>
21197
21198 PR tree-optimization/84859
21199 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21200 (cond_if_else_store_replacement): Perform sinking operation on
21201 single-store BBs regardless of MAX_STORES_TO_SINK setting.
21202 Generalize what a BB with a single eligible store is.
21203
21204 2018-03-19 Richard Biener <rguenther@suse.de>
21205
21206 PR tree-optimization/84929
21207 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21208 chrec_is_positive against non-chrec arg.
21209
21210 2018-03-19 Tamar Christina <tamar.christina@arm.com>
21211
21212 PR target/84711
21213 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21214
21215 2018-03-18 Martin Liska <mliska@suse.cz>
21216
21217 PR rtl-optimization/84635
21218 * regrename.c (build_def_use): Use matches_mode only when
21219 matches >= 0.
21220
21221 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
21222
21223 PR tree-optimization/84913
21224 * tree-vect-loop.c (vectorizable_reduction): Don't try to
21225 vectorize chains of COND_EXPRs.
21226
21227 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21228
21229 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21230
21231 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21232
21233 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21234
21235 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21236
21237 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21238
21239 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21240 Kito Cheng <kito.cheng@gmail.com>
21241
21242 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21243 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21244 (nds32_adjust_reg_alloc_order): New function.
21245 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21246
21247 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
21248
21249 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21250 nds32_print_operand, nds32_print_operand_address): Use
21251 HOST_WIDE_INT_PRINT_DEC instead.
21252
21253 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21254
21255 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21256
21257 2018-03-17 Jakub Jelinek <jakub@redhat.com>
21258
21259 PR target/84902
21260 * config/i386/i386.c (initial_ix86_tune_features,
21261 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21262 unsigned long long.
21263 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21264 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21265 rather than 1u << ix86_tune. Formatting fix.
21266 (ix86_option_override_internal): Change ix86_arch_mask from
21267 unsigned int to unsigned HOST_WIDE_INT, initialize to
21268 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21269 (ix86_function_specific_restore): Likewise.
21270
21271 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21272
21273 PR target/84899
21274 * postreload.c (reload_combine_recognize_pattern): Perform
21275 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21276 truncate_int_for_mode the result for the destination's mode.
21277
21278 PR c/84909
21279 * hsa-gen.c (mem_type_for_type): Fix comment typo.
21280 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21281 Likewise.
21282 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21283 Likewise.
21284
21285 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
21286
21287 PR target/84876
21288 * lra-assigns.c (lra_split_hard_reg_for): Don't use
21289 regno_allocno_class_array and sorted_pseudos.
21290 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21291 insns where regno is used.
21292
21293 2018-03-16 Martin Liska <mliska@suse.cz>
21294
21295 PR ipa/84833
21296 * multiple_target.c (create_dispatcher_calls): Redirect
21297 reference in the symbol table.
21298
21299 2018-03-16 Martin Liska <mliska@suse.cz>
21300
21301 PR ipa/84722
21302 * multiple_target.c (create_dispatcher_calls): Redirect also
21303 an alias.
21304
21305 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21306
21307 PR c++/79937
21308 PR c++/82410
21309 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21310 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21311 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21312
21313 2018-03-16 Julia Koval <julia.koval@intel.com>
21314
21315 * doc/invoke.texi (Skylake Server): Add CLWB.
21316 Cannonlake): Remove CLWB.
21317
21318 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21319
21320 PR tree-optimization/84841
21321 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21322 1 << 3.
21323 (FLOAT_ONE_CONST_TYPE): Define.
21324 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21325 (sort_by_operand_rank): Put entries with higher constant_type last
21326 rather than first to match comments.
21327
21328 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
21329
21330 * config/nios2/nios2.md (movsi_internal): Fix thinko in
21331 split predicate.
21332
21333 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21334
21335 PR c++/79085
21336 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21337 check and use address of target always.
21338
21339 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
21340
21341 PR target/84574
21342 * config/i386/i386.c (indirect_thunk_needed): Update comments.
21343 (indirect_thunk_bnd_needed): Likewise.
21344 (indirect_thunks_used): Likewise.
21345 (indirect_thunks_bnd_used): Likewise.
21346 (indirect_return_needed): New.
21347 (indirect_return_bnd_needed): Likewise.
21348 (output_indirect_thunk_function): Add a bool argument for
21349 function return.
21350 (output_indirect_thunk_function): Don't generate alias for
21351 function return thunk.
21352 (ix86_code_end): Call output_indirect_thunk_function to generate
21353 function return thunks.
21354 (ix86_output_function_return): Set indirect_return_bnd_needed
21355 and indirect_return_needed instead of indirect_thunk_bnd_needed
21356 and indirect_thunk_needed.
21357
21358 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
21359
21360 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21361 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21362 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21363
21364 2018-03-15 David Malcolm <dmalcolm@redhat.com>
21365 Paul Hua <paul.hua.gm@gmail.com>
21366
21367 PR c/84852
21368 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21369
21370 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
21371
21372 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21373 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21374 resp. SFmode cases.
21375
21376 2018-03-15 Tamar Christina <tamar.christina@arm.com>
21377
21378 PR target/84711
21379 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21380 instead of GET_MODE_SIZE when comparing Units.
21381
21382 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21383
21384 PR target/68256
21385 * varasm.c (hash_section): Return an unchangeble hash value
21386 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21387 Return !aarch64_can_use_per_function_literal_pools_p ().
21388
21389 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21390
21391 PR target/84860
21392 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21393 rather than address of cmode as last argument to prepare_cmp_insn.
21394
21395 2018-03-15 Julia Koval <julia.koval@intel.com>
21396
21397 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21398 F_AVX512VNNI, F_AVX512BITALG): New.
21399
21400 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21401
21402 PR target/83451
21403 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21404 insn for floating-point loads and stores.
21405
21406 2018-03-14 Carl Love <cel@us.ibm.com>
21407
21408 * config/rs6000/rs6000-c.c: Add macro definitions for
21409 ALTIVEC_BUILTIN_VEC_PERMXOR.
21410 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21411 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21412 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21413 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21414 UNSPEC_VPERMXOR.
21415 * config/doc/extend.texi: Add prototypes for vec_permxor.
21416
21417 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21418
21419 PR c/84852
21420 * diagnostic-show-locus.c (class layout_point): Convert m_line
21421 from int to linenum_type.
21422 (line_span::comparator): Use linenum "compare" function when
21423 comparing line numbers.
21424 (test_line_span): New function.
21425 (layout_range::contains_point): Convert param "row" from int to
21426 linenum_type.
21427 (layout_range::intersects_line_p): Likewise.
21428 (layout::will_show_line_p): Likewise.
21429 (layout::print_source_line): Likewise.
21430 (layout::should_print_annotation_line_p): Likewise.
21431 (layout::print_annotation_line): Likewise.
21432 (layout::print_leading_fixits): Likewise.
21433 (layout::annotation_line_showed_range_p): Likewise.
21434 (struct line_corrections): Likewise for field m_row.
21435 (line_corrections::line_corrections): Likewise for param "row".
21436 (layout::print_trailing_fixits): Likewise.
21437 (layout::get_state_at_point): Likewise.
21438 (layout::get_x_bound_for_row): Likewise.
21439 (layout::print_line): Likewise.
21440 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21441 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21442 * input.c (selftest::test_linenum_comparisons): New function.
21443 (selftest::input_c_tests): Call it.
21444 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21445 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21446 * selftest.h (ASSERT_GT): New macro.
21447 (ASSERT_GT_AT): New macro.
21448 (ASSERT_LT): New macro.
21449 (ASSERT_LT_AT): New macro.
21450
21451 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21452
21453 PR rtl-optimization/84780
21454 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21455
21456 2018-03-14 Martin Liska <mliska@suse.cz>
21457
21458 * tree.c (record_node_allocation_statistics): Use
21459 get_stats_node_kind.
21460 (get_stats_node_kind): New function extracted from
21461 record_node_allocation_statistics.
21462 (free_node): Use get_stats_node_kind.
21463
21464 2018-03-14 Richard Biener <rguenther@suse.de>
21465
21466 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21467 that the value-set of ANTIC_IN doesn't grow.
21468
21469 Revert
21470 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21471 member.
21472 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21473 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21474
21475 2018-03-14 Julia Koval <julia.koval@intel.com>
21476
21477 * config.gcc (icelake-client, icelake-server): New.
21478 (icelake): Remove.
21479 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21480 (initial_ix86_arch_features): Ditto.
21481 (PTA_SKYLAKE): Add SGX.
21482 (PTA_ICELAKE): Remove.
21483 (PTA_ICELAKE_CLIENT): New.
21484 (PTA_ICELAKE_SERVER): New.
21485 (ix86_option_override_internal): Split up icelake on icelake client and
21486 icelake server.
21487 (get_builtin_code_for_version): Ditto.
21488 (fold_builtin_cpu): Ditto.
21489 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21490 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21491 * config/i386/i386.h (processor_type): Ditto.
21492 * doc/invoke.texi: Ditto.
21493
21494 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21495
21496 PR sanitizer/83392
21497 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21498 INTEGER_CST offset, add it together with bitpos / 8 and
21499 sign extend based on POINTER_SIZE.
21500
21501 PR target/84844
21502 Revert
21503 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21504
21505 PR target/78090
21506 * config/i386/constraints.md (Yc): New register constraint.
21507 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21508 Use Yc constraint for alternative 2 of operand 0. Remove
21509 preferred_for_speed attribute.
21510
21511 2018-03-14 Richard Biener <rguenther@suse.de>
21512
21513 PR tree-optimization/84830
21514 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21515 with the old one to avoid oscillations.
21516
21517 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21518
21519 PR target/83712
21520 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21521 pseudos.
21522 (assign_by_spills): Return a flag of reload assignment failure.
21523 Do not process the reload assignment failures. Do not spill other
21524 reload pseudos if they has the same reg class. Update n if
21525 necessary.
21526 (lra_assign): Add a return arg. Set up from the result of
21527 assign_by_spills call.
21528 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21529 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21530 usage_insns if it is not NULL.
21531 (spill_hard_reg_in_range): New function.
21532 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21533 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21534 function prototypes.
21535 (lra_assign): Change prototype.
21536 * lra.c (lra): Add code to deal with fails by splitting hard reg
21537 live ranges.
21538
21539 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21540
21541 * config/riscv/riscv.opt (mrelax): New option.
21542 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21543 "norelax" when riscv_mrelax is disabled.
21544 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21545
21546 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21547
21548 PR target/84743
21549 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21550 reassociation for int modes.
21551
21552 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21553
21554 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21555 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21556 for big-endian.
21557 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21558 * config/aarch64/aarch64-sve.md
21559 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21560 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21561 (*extend<mode><Vwide>2): Rename to...
21562 (aarch64_sve_extend<mode><Vwide>2): ...this.
21563 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21564 renaming the old pattern to...
21565 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21566 unsigned packs.
21567 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21568 define_expand, renaming the old pattern to...
21569 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21570 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21571 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21572 account when deciding which SVE instruction the optab should use.
21573 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21574
21575 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21576
21577 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21578 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21579 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21580 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21581 (tlsdesc_small_<mode>): Turn a define_expand and use
21582 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21583 (tlsdesc_small_advsimd_<mode>): ...this.
21584 (tlsdesc_small_sve_<mode>): New pattern.
21585
21586 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21587
21588 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21589 (UNSPEC_UMUL_HIGHPART): New constants.
21590 (MUL_HIGHPART): New int iteraor.
21591 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21592 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21593 define_expand.
21594 (*<su>mul<mode>3_highpart): New define_insn.
21595
21596 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21597
21598 PR lto/84805
21599 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21600 incomplete types.
21601
21602 2018-03-13 Martin Liska <mliska@suse.cz>
21603
21604 PR ipa/84658.
21605 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21606 vector.
21607 (sem_item_optimizer::~sem_item_optimizer): Release it.
21608 (sem_item_optimizer::merge_classes): Register variable aliases.
21609 (sem_item_optimizer::fixup_pt_set): New function.
21610 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21611 * ipa-icf.h: Declare new variables and functions.
21612
21613 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21614
21615 PR middle-end/84834
21616 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21617 integer_pow2p@2 and test integer_pow2p in condition.
21618 (A < 0 ? C : 0): Similarly for @1.
21619
21620 PR middle-end/84831
21621 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21622 characters starting at p contain '\0' character, don't look beyond
21623 that.
21624
21625 PR target/84827
21626 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21627 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21628
21629 PR target/84828
21630 * reg-stack.c (change_stack): Change update_end var from int to
21631 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21632 also call set_block_for_insn on the newly added insns and rescan.
21633
21634 PR target/84786
21635 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21636 on the last operand.
21637
21638 PR c++/84704
21639 * tree.c (stabilize_reference_1): Return save_expr (e) for
21640 STATEMENT_LIST even if it doesn't have side-effects.
21641
21642 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21643
21644 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21645
21646 2018-03-12 Renlin Li <renlin.li@arm.com>
21647
21648 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21649 aarch64_output_scalar_simd_mov_immediate.
21650
21651 2018-03-12 Martin Sebor <msebor@redhat.com>
21652
21653 PR tree-optimization/83456
21654 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21655 for perfectly overlapping calls to memcpy.
21656 (gimple_fold_builtin_memory_chk): Same.
21657 (gimple_fold_builtin_strcpy): Handle no-warning.
21658 (gimple_fold_builtin_stxcpy_chk): Same.
21659 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21660
21661 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21662
21663 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21664 parameter. Use it for SFmode.
21665 (rs6000_function_arg_advance_1): Adjust.
21666 (rs6000_function_arg): Adjust.
21667 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21668
21669 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21670
21671 PR rtl-optimization/84169
21672 PR rtl-optimization/84780
21673 * combine.c (can_combine_p): Check for a 2-insn combination whether
21674 the destination register is used between the two insns, too.
21675
21676 2018-03-12 Richard Biener <rguenther@suse.de>
21677
21678 PR tree-optimization/84803
21679 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21680 for refs DR analysis didn't process.
21681
21682 2018-03-12 Richard Biener <rguenther@suse.de>
21683
21684 PR tree-optimization/84777
21685 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21686 force-vectorize loops ignore whether we are optimizing for size.
21687
21688 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21689
21690 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21691 (TARGET_MD_ASM_ADJUST): Define.
21692
21693 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21694 Kito Cheng <kito.cheng@gmail.com>
21695 Chung-Ju Wu <jasonwucj@gmail.com>
21696
21697 * config/nds32/nds32.c (nds32_compute_stack_frame,
21698 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21699 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21700 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21701 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21702 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21703 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21704 * config/nds32/nds32.md (prologue, epilogue): Use macro
21705 NDS32_V3PUSH_AVAILABLE_P to do checking.
21706
21707 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21708
21709 PR debug/58150
21710 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21711 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21712 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21713 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21714 addition of most attributes on !orig_type_die or the attribute not
21715 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21716
21717 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21718 Chung-Ju Wu <jasonwucj@gmail.com>
21719
21720 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21721 __NDS32_VH__ macro.
21722 * config/nds32/nds32.opt (mvh): New option.
21723
21724 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21725 Chung-Ju Wu <jasonwucj@gmail.com>
21726
21727 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21728 function.
21729 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21730 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21731 definition.
21732
21733 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21734 Chung-Ju Wu <jasonwucj@gmail.com>
21735
21736 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21737 function.
21738 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21739 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21740
21741 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21742 Kito Cheng <kito.cheng@gmail.com>
21743 Chung-Ju Wu <jasonwucj@gmail.com>
21744
21745 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21746 UNSPEC_FFMISM and UNSPEC_FLMISM.
21747 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21748 for ffb, ffmism and flmism.
21749 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21750 (unspec_ffmism): Ditto.
21751 (unspec_flmism): Ditto.
21752 (nds32_expand_builtin_impl): Check if string extension is available.
21753 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21754 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21755
21756 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21757
21758 Reverting patch:
21759 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21760
21761 PR target/83712
21762 * lra-assigns.c (assign_by_spills): Return a flag of reload
21763 assignment failure. Do not process the reload assignment
21764 failures. Do not spill other reload pseudos if they has the same
21765 reg class.
21766 (lra_assign): Add a return arg. Set up from the result of
21767 assign_by_spills call.
21768 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21769 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21770 usage_insns if it is not NULL.
21771 (spill_hard_reg_in_range): New function.
21772 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21773 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21774 function prototypes.
21775 (lra_assign): Change prototype.
21776 * lra.c (lra): Add code to deal with fails by splitting hard reg
21777 live ranges.
21778
21779 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21780
21781 PR target/84807
21782 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21783
21784 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21785
21786 PR debug/84620
21787 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21788 (dw_val_node): Add val_symbolic_view.
21789 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21790 (symview_upper_bound): New.
21791 (new_line_info_table): Initialize symviews_since_reset.
21792 (dwarf2out_source_line): Count symviews_since_reset and set
21793 symview_upper_bound.
21794 (dw_val_equal_p): Handle symview.
21795 (add_AT_symview): New.
21796 (print_dw_val): Handle symview.
21797 (attr_checksum, attr_checksum_ordered): Likewise.
21798 (same_dw_val_p, size_of_die): Likewise.
21799 (value_format, output_die): Likewise.
21800 (add_high_low_attributes): Use add_AT_symview for entry_view.
21801 (dwarf2out_finish): Reset symview_upper_bound, clear
21802 zero_view_p.
21803
21804 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21805
21806 PR target/83969
21807 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21808 Add strict argument and use it.
21809 (rs6000_split_multireg_move): Update for new strict argument.
21810 (mem_operand_gpr): Disallow all non-offsettable addresses.
21811 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21812
21813 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21814
21815 PR target/84772
21816 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21817 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21818 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21819
21820 PR c++/84767
21821 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21822 decl, use remap_type if we want to use the type.
21823
21824 2018-03-09 Martin Sebor <msebor@redhat.com>
21825
21826 PR tree-optimization/84526
21827 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21828 Remove dead code.
21829 (builtin_access::generic_overlap): Be prepared to handle non-array
21830 base objects.
21831
21832 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21833
21834 PR rtl-optimization/84682
21835 * lra-constraints.c (process_address_1): Check is_address flag
21836 for address constraints.
21837 (process_alt_operands): Likewise.
21838 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21839 preprocess_constraints.
21840 * recog.h (preprocess_constraints): Add oploc parameter.
21841 Adjust callers.
21842 * recog.c (preprocess_constraints): Test address_operand for
21843 CT_ADDRESS constraints.
21844
21845 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21846
21847 PR target/83712
21848 * lra-assigns.c (assign_by_spills): Return a flag of reload
21849 assignment failure. Do not process the reload assignment
21850 failures. Do not spill other reload pseudos if they has the same
21851 reg class.
21852 (lra_assign): Add a return arg. Set up from the result of
21853 assign_by_spills call.
21854 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21855 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21856 usage_insns if it is not NULL.
21857 (spill_hard_reg_in_range): New function.
21858 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21859 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21860 function prototypes.
21861 (lra_assign): Change prototype.
21862 * lra.c (lra): Add code to deal with fails by splitting hard reg
21863 live ranges.
21864
21865 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21866
21867 PR target/83193
21868 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21869 Accept complain bool parameter. Only emit errors if it is true.
21870 (arm_parse_cpu_option_name): Likewise.
21871 (arm_target_thumb_only): Adjust callers of the above.
21872 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21873 prototype to take a default true bool parameter.
21874 (arm_parse_arch_option_name): Likewise.
21875
21876 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21877 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21878
21879 PR jit/64089
21880 PR jit/84288
21881 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21882 * configure: Regenerate.
21883 * configure.ac ("linker --version-script option"): New.
21884 ("linker soname option"): New.
21885
21886 2018-03-09 Richard Biener <rguenther@suse.de>
21887
21888 PR tree-optimization/84775
21889 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21890 immediate uses of predicate stmts and mark them modified.
21891
21892 Revert
21893 PR tree-optimization/84178
21894 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21895 to caller.
21896 (version_loop_for_if_conversion): Delay update_ssa call.
21897 (tree_if_conversion): Delay update_ssa until after predicate
21898 insertion.
21899
21900 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21901
21902 PR target/84763
21903 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21904 when the function accesses prior frames.
21905
21906 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21907
21908 PR debug/84456
21909 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21910 gen_llsym, otherwise call maybe_gen_llsym.
21911
21912 PR inline-asm/84742
21913 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21914 has ',' character inside of it.
21915
21916 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21917
21918 PR target/84748
21919 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21920 as clobbering CC_REGNUM.
21921
21922 2018-03-08 Richard Biener <rguenther@suse.de>
21923
21924 PR middle-end/84552
21925 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21926 (follow_copies_to_constant): Do not follow SSA names registered
21927 for update.
21928
21929 2018-03-08 Richard Biener <rguenther@suse.de>
21930
21931 PR tree-optimization/84178
21932 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21933 to caller.
21934 (version_loop_for_if_conversion): Delay update_ssa call.
21935 (tree_if_conversion): Delay update_ssa until after predicate
21936 insertion.
21937
21938 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21939
21940 PR tree-optimization/84178
21941 * tree-if-conv.c (release_bb_predicate): Remove the
21942 the assertion that the stmts have NULL use_ops.
21943 Discard the statements, asserting that they haven't
21944 yet been added to a BB.
21945
21946 2018-03-08 Richard Biener <rguenther@suse.de>
21947
21948 PR tree-optimization/84746
21949 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21950 (phi_translate): Pass in destination ANTIC_OUT set.
21951 (phi_translate_1): Likewise. For a simplified result lookup
21952 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21953 (phi_translate_set): Adjust.
21954 (do_pre_regular_insertion): Likewise.
21955 (do_pre_partial_partial_insertion): Likewise.
21956
21957 2018-03-08 Martin Liska <mliska@suse.cz>
21958
21959 PR gcov-profile/84735
21960 * doc/gcov.texi: Document usage of profile files.
21961 * gcov-io.h: Document changes in the format.
21962
21963 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21964
21965 PR debug/84404
21966 PR debug/84408
21967 * dwarf2out.c (struct dw_line_info_table): Update comments for
21968 view == -1.
21969 (FORCE_RESET_NEXT_VIEW): New.
21970 (FORCE_RESETTING_VIEW_P): New.
21971 (RESETTING_VIEW_P): Check for -1 too.
21972 (ZERO_VIEW_P): Likewise.
21973 (new_line_info_table): Force-reset next view.
21974 (dwarf2out_begin_function): Likewise.
21975 (dwarf2out_source_line): Simplify zero_view_p initialization.
21976 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21977 view directly. Omit view when omitting .loc at line 0.
21978
21979 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21980
21981 PR tree-optimization/84740
21982 * tree-switch-conversion.c (process_switch): Call build_constructors
21983 only if info.phi_count is non-zero.
21984
21985 PR tree-optimization/84739
21986 * tree-tailcall.c (find_tail_calls): Check call arguments against
21987 DECL_ARGUMENTS (current_function_decl) rather than
21988 DECL_ARGUMENTS (func) when checking for tail recursion.
21989
21990 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21991
21992 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21993 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21994 Volker Reichelt's entry and add entries for people that perform
21995 GCC fuzzy testing and report numerous bugs.
21996
21997 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21998
21999 PR target/82411
22000 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
22001 readonly data in sdata, if that is disabled.
22002 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
22003 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
22004 -mreadonly-in-sdata option.
22005
22006 2018-03-07 Martin Sebor <msebor@redhat.com>
22007
22008 PR tree-optimization/84468
22009 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
22010 basic block when looking for nul assignment.
22011
22012 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
22013
22014 PR target/84277
22015 * except.h (output_function_exception_table): Adjust prototype.
22016 * except.c (output_function_exception_table): Remove FNNAME parameter
22017 and add SECTION parameter. Ouput one part of the table at a time.
22018 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
22019 the first part of the exception table and emit unwind directives.
22020 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
22021 (i386_pe_seh_cold_init): Likewise.
22022 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
22023 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
22024 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
22025 (ix86_output_call_insn): Emit a nop in one more case for SEH.
22026 * config/i386/winnt.c: Include except.h.
22027 (struct seh_frame_state): Add reg_offset, after_prologue and
22028 in_cold_section fields.
22029 (i386_pe_seh_end_prologue): Set seh->after_prologue.
22030 (i386_pe_seh_cold_init): New function.
22031 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
22032 to seh->in_cold_section.
22033 (seh_emit_push): Record the offset of the push.
22034 (seh_emit_save): Record the offet of the save.
22035 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
22036 Test seh->after_prologue to disregard the epilogue.
22037 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
22038 (i386_pe_end_cold_function): New function.
22039
22040 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22041
22042 PR fortran/84565
22043 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
22044 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
22045
22046 PR c++/84704
22047 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
22048 on tmp_var.
22049 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
22050 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
22051
22052 PR middle-end/84723
22053 * multiple_target.c: Include tree-inline.h and intl.h.
22054 (expand_target_clones): Diagnose and fail if node->definition and
22055 !tree_versionable_function_p (node->decl).
22056
22057 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
22058
22059 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
22060 sprint_ul.
22061 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
22062 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
22063 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
22064
22065 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22066
22067 PR target/84710
22068 * combine.c (try_combine): Use reg_or_subregno instead of handling
22069 just paradoxical SUBREGs and REGs.
22070
22071 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
22072
22073 * config/arc/arc.c (arc_finalize_pic): Remove function.
22074 (arc_must_save_register): We use single base PIC register, remove
22075 checks to save/restore the PIC register.
22076 (arc_expand_prologue): Likewise.
22077 * config/arc/arc-protos.h (arc_set_default_type_attributes):
22078 Remove.
22079 (arc_verify_short): Likewise.
22080 (arc_attr_type): Likewise.
22081 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
22082 (walk_stores): Likewise.
22083 (arc_address_cost): Make it static.
22084 (arc_verify_short): Likewise.
22085 (branch_dest): Likewise.
22086 (arc_attr_type): Likewise.
22087 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
22088 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
22089 (arc_final_prescan_insn): Remove inserting the nops due to
22090 hardware hazards. It is done in reorg step.
22091 (insn_length_variant_t): Remove.
22092 (insn_length_parameters_t): Likewise.
22093 (arc_insn_length_parameters): Likewise.
22094 (arc_get_insn_variants): Likewise.
22095 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
22096
22097 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22098
22099 PR inline-asm/84683
22100 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
22101 assertion failure.
22102
22103 PR tree-optimization/84687
22104 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
22105 on new_node->decl.
22106 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
22107
22108 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22109
22110 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
22111 Rename to ppc_speculation_barrier.
22112 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
22113 __builtin_ppc_speculation_barrier.
22114
22115 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22116
22117 PR target/84700
22118 * combine.c (combine_simplify_rtx): Don't try to simplify if
22119 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
22120 are equal to x.
22121
22122 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
22123
22124 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
22125 to 32 bytes when compiling for POWER9.
22126
22127 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22128
22129 PR target/84564
22130 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
22131 regparm >= 3 with no arg reg available also for calls with
22132 flag_force_indirect_call. Pass decl to ix86_function_regparm.
22133
22134 PR target/84524
22135 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
22136 orig,vex.
22137 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
22138
22139 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
22140
22141 PR target/84264
22142 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
22143
22144 2018-03-05 Richard Biener <rguenther@suse.de>
22145
22146 PR tree-optimization/84486
22147 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
22148 When inserting a __builtin_assume_aligned call set the LHS
22149 SSA name alignment info accordingly.
22150
22151 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
22152
22153 PR tree-optimization/84114
22154 * config/aarch64/aarch64.c (aarch64_reassociation_width)
22155 Avoid reassociation of FLOAT_MODE addition.
22156
22157 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
22158
22159 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
22160 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
22161 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
22162 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
22163 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
22164 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
22165 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
22166 and -mwbnoinvd.
22167 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22168 __builtin_ia32_wbinvd): New builtins.
22169 (SPECIAL_ARGS2): New.
22170 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22171 (SPECIAL_ARGS2): New.
22172 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22173 (ix86_valid_target_attribute_inner_p): Ditto.
22174 (ix86_init_mmx_sse_builtins): Add special_args2.
22175 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22176 TARGET_WBNOINVD_P): New.
22177 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22178 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22179 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22180 * config/i386/immintrin.h (_wbinvd): New intrinsic.
22181 * config/i386/pconfigintrin.h: New file.
22182 * config/i386/wbnoinvdintrin.h: Ditto.
22183 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22184 wbnoinvdintrin.h.
22185 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22186
22187 2018-03-05 Richard Biener <rguenther@suse.de>
22188
22189 PR tree-optimization/84670
22190 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22191 member.
22192 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22193 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22194 (compute_antic_aux): Only assert the number of values in ANTIC_IN
22195 doesn't grow if all successors (recursively) were visited at least
22196 once.
22197
22198 2018-03-05 Richard Biener <rguenther@suse.de>
22199
22200 PR tree-optimization/84650
22201 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22202 if executed in the loop pipeline.
22203
22204 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
22205
22206 * doc/configfiles.texi (Configuration Files): Move info about
22207 conditionalizing $target-protos.h to...
22208 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
22209 differs from $target-protos.h.
22210
22211 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
22212 Chung-Ju Wu <jasonwucj@gmail.com>
22213
22214 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22215 * config/nds32/nds32-multiple.md (setmemsi): Define.
22216 * config/nds32/nds32-memory-manipulation.c
22217 (nds32_gen_dup_4_byte_to_word_value): New.
22218 (emit_setmem_word_loop): New.
22219 (emit_setmem_byte_loop): New.
22220 (nds32_expand_setmem_loop): New.
22221 (nds32_expand_setmem_loop_v3m): New.
22222 (nds32_expand_setmem_unroll): New.
22223 (nds32_expand_setmem): New.
22224
22225 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22226 Chung-Ju Wu <jasonwucj@gmail.com>
22227
22228 * config/nds32/nds32-memory-manipulation.c
22229 (nds32_emit_load_store): New.
22230 (nds32_emit_post_inc_load_store): New.
22231 (nds32_emit_mem_move): New.
22232 (nds32_emit_mem_move_block): New.
22233 (nds32_expand_movmemsi_loop_unknown_size): New.
22234 (nds32_expand_movmemsi_loop_known_size): New.
22235 (nds32_expand_movmemsi_loop): New.
22236 (nds32_expand_movmemsi_unroll): New.
22237 (nds32_expand_movmemqi): Rename ...
22238 (nds32_expand_movmemsi): ... to this.
22239 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22240 (movmemsi): ... to this.
22241 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22242 (nds32_expand_movmemsi): ... to this.
22243
22244 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22245 Monk Chiang <sh.chiang04@gmail.com>
22246 Chung-Ju Wu <jasonwucj@gmail.com>
22247
22248 * config/nds32/nds32-protos.h
22249 (nds32_expand_load_multiple): New arguments.
22250 (nds32_expand_store_multiple): Ditto.
22251 (nds32_valid_multiple_load_store): Rename ...
22252 (nds32_valid_multiple_load_store_p): ... to this.
22253 * config/nds32/nds32-memory-manipulation.c
22254 (nds32_expand_load_multiple): Refine implementation.
22255 (nds32_expand_store_multiple): Ditto.
22256 * config/nds32/nds32-multiple.md
22257 (load_multiple): Update nds32_expand_load_multiple interface.
22258 (store_multiple): Update nds32_expand_store_multiple interface.
22259 * config/nds32/nds32-predicates.c
22260 (nds32_valid_multiple_load_store): Rename ...
22261 (nds32_valid_multiple_load_store_p): ... to this and refine
22262 implementation.
22263 * config/nds32/predicates.md
22264 (nds32_load_multiple_and_update_address_operation): New predicate.
22265 (nds32_store_multiple_and_update_address_operation): New predicate.
22266
22267 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22268 Chung-Ju Wu <jasonwucj@gmail.com>
22269
22270 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22271 (combo): New attribute.
22272 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22273
22274 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
22275
22276 * config/nds32/nds32.opt: Change -mcmodel= default value.
22277
22278 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
22279 Monk Chiang <sh.chiang04@gmail.com>
22280 Chung-Ju Wu <jasonwucj@gmail.com>
22281
22282 * config/nds32/constants.md (unspec_element): New enum.
22283 * config/nds32/constraints.md (Umw): New constraint.
22284 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22285 * config/nds32/nds32-intrinsic.md: Likewise.
22286 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22287 (nds32_valid_smw_lwm_base_p): New.
22288 (nds32_output_smw_single_word): New.
22289 (nds32_output_lmw_single_word): New.
22290 (nds32_expand_unaligned_load): New.
22291 (nds32_expand_unaligned_store): New.
22292 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22293 (nds32_output_smw_single_word): Declare.
22294 (nds32_output_lmw_single_word): Declare.
22295 (nds32_expand_unaligned_load): Declare.
22296 (nds32_expand_unaligned_store): Declare.
22297 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22298 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22299 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22300 NDS32_BUILTIN_UASTORE_DW.
22301 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22302 predicate.
22303
22304 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
22305 Kito Cheng <kito.cheng@gmail.com>
22306 Chung-Ju Wu <jasonwucj@gmail.com>
22307
22308 * config/nds32/nds32-intrinsic.c
22309 (nds32_expand_builtin_null_ftype_reg): Delete.
22310 (nds32_expand_builtin_reg_ftype_imm): Ditto.
22311 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22312 (nds32_read_argument): New.
22313 (nds32_legitimize_target): Ditto.
22314 (nds32_legitimize_argument): Ditto.
22315 (nds32_check_constant_argument): Ditto.
22316 (nds32_expand_unop_builtin): Ditto.
22317 (nds32_expand_unopimm_builtin): Ditto.
22318 (nds32_expand_binop_builtin): Ditto.
22319 (nds32_builtin_decl_impl): Ditto.
22320 (builtin_description): Ditto.
22321 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22322 (nds32_init_builtins_impl): Ditto.
22323 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22324 (nds32_builtin_decl): New.
22325 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22326 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22327
22328 2018-03-02 Jeff Law <law@redhat.com>
22329
22330 * reorg.c (stop_search_p): Handle DEBUG_INSN.
22331 (redundant_insn, fill_simple_delay_slots): Likewise.
22332 (fill_slots_from_thread): Likewise.
22333 * resource.c (mark_referenced_resources): Likewise.
22334 (mark_set_resources, find_dead_or_set_registers): Likewise.
22335
22336 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22337
22338 * substring-locations.h (format_warning_va): Formatting fix for
22339 ATTRIBUTE_GCC_DIAG.
22340 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22341 argument.
22342 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22343 * substring-locations.c: Include intl.h.
22344 (format_warning_va): Turned into small wrapper around
22345 format_warning_n_va, renamed to ...
22346 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22347 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22348 use ngettext.
22349 (format_warning_at_substring_n): New function.
22350 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22351 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
22352 format_warning_at_substring with just a shorter name instead of
22353 const function pointer.
22354 (fmtwarn_n): New function.
22355 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22356 appropriate, get rid of all the fmtstr temporaries, move conditionals
22357 with G_() wrapped string literals directly into fmtwarn arguments,
22358 cast dir.len to (int), formatting fixes.
22359
22360 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
22361
22362 * doc/invoke.texi: Remove "Cilk Plus" references.
22363
22364 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22365 Richard Biener <rguenther@suse.de>
22366
22367 PR ipa/84628
22368 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22369 for error or warning attributes if CALL_FROM_THUNK_P is set.
22370 Formatting fixes.
22371
22372 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22373
22374 PR target/56540
22375 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22376 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22377
22378 PR target/56540
22379 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22380 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22381
22382 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22383 instead of -1U in last predictors element's probability member.
22384
22385 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22386
22387 PR ipa/83983
22388 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22389 arguments if they are comparable.
22390
22391 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22392
22393 PR tree-optimization/84634
22394 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22395 masks and masked_loop_p with a single loop_masks, making sure it's
22396 null for bb vectorization.
22397
22398 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22399
22400 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22401 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22402 loop->force_vectorize to check whether there is no alias.
22403
22404 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22405
22406 PR target/84614
22407 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22408 prototypes.
22409 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22410 comments.
22411 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22412 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22413 instead of a loop around prev_real_insn.
22414 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22415 prev_real_insn.
22416
22417 PR inline-asm/84625
22418 * config/i386/i386.c (ix86_print_operand): Use conditional
22419 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22420 zero vector.
22421
22422 2018-03-02 Richard Biener <rguenther@suse.de>
22423
22424 PR tree-optimization/84427
22425 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22426 (bitmap_set_subtract_values): Rewrite to handle multiple
22427 exprs per value.
22428 (clean): Likewise.
22429 (prune_clobbered_mems): Likewise.
22430 (phi_translate): Take edge instead of pred/phiblock.
22431 (phi_translate_1): Likewise.
22432 (phi_translate_set): Likewise. Insert all translated
22433 exprs for a value into the set, keeping possibly multiple
22434 expressions per value.
22435 (compute_antic_aux): Adjust for phi_translate changes.
22436 When intersecting union the expressions and prune those
22437 not in the final value set, keeping possibly multiple
22438 expressions per value. Do not use value-insertion
22439 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22440 all expressions. Add verification that the value-sets
22441 only shrink during iteration.
22442 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22443 (do_pre_regular_insertion): Likewise.
22444 (do_pre_partial_partial_insertion): Likewise.
22445
22446 2018-03-02 Richard Biener <rguenther@suse.de>
22447
22448 PR target/82005
22449 * config/darwin.c (saved_debug_info_level): New static global.
22450 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22451 (darwin_asm_lto_end): Restore debug info generation settings.
22452
22453 2018-03-01 Martin Liska <mliska@suse.cz>
22454
22455 PR sanitizer/82484
22456 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22457 volatile arguments.
22458
22459 2018-03-01 Richard Biener <rguenther@suse.de>
22460
22461 PR debug/84645
22462 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22463 type annotation with LTO when debug was disabled at compile-time.
22464
22465 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22466
22467 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22468 XINT with INTVAL.
22469 (mips_final_postscan_insn): Likewise.
22470
22471 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22472
22473 PR rtl-optimization/84528
22474 * alias.c (init_alias_target): Add commentary.
22475 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22476 a unique base value if the frame pointer is not eliminated
22477 to the stack pointer.
22478
22479 2018-03-01 Tom de Vries <tom@codesourcery.com>
22480
22481 PR rtl-optimization/83327
22482 * lra-int.h (hard_regs_spilled_into): Declare.
22483 * lra.c (hard_regs_spilled_into): Define.
22484 (init_reg_info): Init hard_regs_spilled_into.
22485 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22486 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22487 (process_bb_lives): Handle hard_regs_spilled_into.
22488 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22489 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22490
22491 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22492
22493 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22494 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22495 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22496 * config/rs6000/aix72.h: New file.
22497
22498 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22499
22500 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22501 instead of warning_at with conditional singular and plural messages
22502 where possible.
22503
22504 PR target/52991
22505 * stor-layout.c (update_alignment_for_field): For
22506 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22507 && !DECL_PACKED (field), do the alignment update, just use
22508 only desired_align instead of MAX (type_align, desired_align)
22509 as the alignment.
22510 (place_field): Don't do known_align < desired_align handling
22511 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22512 is non-NULL, instead do it after rli->prev_field handling and
22513 only if not within a bitfield word. For DECL_PACKED (field)
22514 use type_align of BITS_PER_UNIT.
22515
22516 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22517
22518 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22519 superfluous parentheses and trailing spaces.
22520
22521 2018-02-28 Richard Biener <rguenther@suse.de>
22522
22523 PR tree-optimization/84584
22524 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22525 SCoPs with fake exit edge.
22526
22527 2018-02-28 Martin Liska <mliska@suse.cz>
22528
22529 PR testsuite/84597
22530 * timevar.c (timer::print): Fix format to properly print 100%
22531 values.
22532
22533 2018-02-28 Richard Biener <rguenther@suse.de>
22534
22535 PR middle-end/84607
22536 * genmatch.c (capture_info::walk_match): Do not mark
22537 captured expressions without operands as expr_p given
22538 they act more like predicates and should be subject to
22539 "lost tail" side-effect preserving.
22540
22541 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22542
22543 PR rtl-optimization/81611
22544 * auto-inc-dec.c (attempt_change): Move dead note from
22545 mem_insn if it's the next use of regno
22546 (find_address): Take address use of reg holding
22547 non-incremented value. Add parm to limit search to the named
22548 reg only.
22549 (merge_in_block): Attempt to use a mem insn that is the next
22550 use of the original regno.
22551
22552 2018-02-27 Martin Sebor <msebor@redhat.com>
22553
22554 PR c++/83871
22555 * doc/invoke.texi (-Wmissing-attributes): New option.
22556 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22557
22558 2018-02-27 Martin Sebor <msebor@redhat.com>
22559
22560 PR translation/84207
22561 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22562 n argument to unsigned HOST_WIDE_INT.
22563 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22564 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22565 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22566 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22567
22568 2018-02-27 Richard Biener <rguenther@suse.de>
22569
22570 PR tree-optimization/84512
22571 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22572 Do not use the estimate returned from record_stmt_cost for
22573 the scalar iteration cost but sum properly using add_stmt_cost.
22574
22575 2018-02-27 Richard Biener <rguenther@suse.de>
22576
22577 PR tree-optimization/84466
22578 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22579 Adjust last change to less strictly validate use operands.
22580
22581 2018-02-27 Martin Liska <mliska@suse.cz>
22582
22583 PR gcov-profile/84548
22584 * gcov.c (process_file): Allow partial overlap and consider it
22585 also as group functions.
22586 (output_lines): Properly calculate range of lines for a group.
22587
22588 2018-02-27 Martin Liska <mliska@suse.cz>
22589
22590 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22591 'ggc' suffixes. Change first column width.
22592 (timer::print): Fix formatting of the column.
22593
22594 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22595
22596 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22597 preserve inline entry blocks for the sake of debug inline
22598 entry point markers alone.
22599 (remove_unused_locals): Suggest in comments a better place to
22600 force the preservation of inline entry blocks that are
22601 otherwise unused, but do not preserve them.
22602
22603 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22604
22605 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22606
22607 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22608
22609 PR target/84039
22610 * config/i386/constraints.md (Bs): Replace
22611 ix86_indirect_branch_register with
22612 TARGET_INDIRECT_BRANCH_REGISTER.
22613 (Bw): Likewise.
22614 * config/i386/i386.md (indirect_jump): Likewise.
22615 (tablejump): Likewise.
22616 (*sibcall_memory): Likewise.
22617 (*sibcall_value_memory): Likewise.
22618 Peepholes of indirect call and jump via memory: Likewise.
22619 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22620 (*sibcall_value_GOT_32): Likewise.
22621 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22622 (GOT_memory_operand): Likewise.
22623 (call_insn_operand): Likewise.
22624 (sibcall_insn_operand): Likewise.
22625 (GOT32_symbol_operand): Likewise.
22626 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22627
22628 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22629
22630 PR rtl-optimization/83496
22631 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22632 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22633 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22634 redundant insn, if any.
22635 (relax_delay_slots): Likewise.
22636 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22637
22638 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22639
22640 PR tree-optimization/83965
22641 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22642 that grouped statements are part of a reduction chain. Return
22643 true if the statement is not marked as a reduction itself but
22644 is part of a group.
22645 (vect_recog_dot_prod_pattern): Don't check whether the statement
22646 is part of a group here.
22647 (vect_recog_sad_pattern): Likewise.
22648 (vect_recog_widen_sum_pattern): Likewise.
22649
22650 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22651
22652 PR debug/84545
22653 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22654
22655 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22656
22657 PR target/84530
22658 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22659 the bool argument.
22660 (ix86_output_indirect_function_return): New prototype.
22661 (ix86_split_simple_return_pop_internal): Likewise.
22662 * config/i386/i386.c (indirect_return_via_cx): New.
22663 (indirect_return_via_cx_bnd): Likewise.
22664 (indirect_thunk_name): Handle return va CX_REG.
22665 (output_indirect_thunk_function): Create alias for
22666 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22667 (ix86_output_indirect_jmp): Remove the bool argument.
22668 (ix86_output_indirect_function_return): New function.
22669 (ix86_split_simple_return_pop_internal): Likewise.
22670 * config/i386/i386.md (*indirect_jump): Don't pass false
22671 to ix86_output_indirect_jmp.
22672 (*tablejump_1): Likewise.
22673 (simple_return_pop_internal): Change it to define_insn_and_split.
22674 Call ix86_split_simple_return_pop_internal to split it for
22675 -mfunction-return=.
22676 (simple_return_indirect_internal): Call
22677 ix86_output_indirect_function_return instead of
22678 ix86_output_indirect_jmp.
22679
22680 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22681
22682 PR bootstrap/84405
22683 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22684 memset and value initialization afterwards.
22685
22686 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22687
22688 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22689
22690 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22691
22692 PR target/84521
22693 * common/config/aarch64/aarch64-common.c
22694 (aarch_option_optimization_table[]): Switch
22695 off fomit-frame-pointer
22696
22697 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22698 Chung-Ju Wu <jasonwucj@gmail.com>
22699
22700 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22701 volatile memory.
22702 (store_multiple): Ditto.
22703
22704 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22705
22706 * config.gcc: Add --with-cpu support for nds32 target.
22707 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22708 * config/nds32/nds32.opt: Add -mcpu= option.
22709
22710 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22711
22712 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22713 isel=yes): Warn for these deprecated options.
22714
22715 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22716
22717 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22718 ISA_2_5_MASKS_EMBEDDED.
22719
22720 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22721
22722 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22723 p->max as pointers rather than using iterative_hash_expr.
22724
22725 2018-02-23 Carl Love <cel@us.ibm.com>
22726
22727 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22728 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22729 BU_P8V_OVERLOAD_2.
22730 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22731 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22732 P8V_BUILTIN_VEC_VUNSIGNED2.
22733
22734 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22735
22736 PR target/81572
22737 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22738 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22739 LRA_UNKNOWN_ALT.
22740 * lra-constraints.c (curr_insn_transform): Set up
22741 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22742 LRA_UNKNOWN_ALT.
22743 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22744 * lra-eliminations.c (spill_pseudos): Ditto.
22745 (process_insn_for_elimination): Ditto.
22746 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22747 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22748 LRA_NON_CLOBBERED_ALT.
22749
22750 2018-02-22 Martin Sebor <msebor@redhat.com>
22751
22752 PR tree-optimization/84480
22753 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22754 to maybe_diag_stxncpy_trunc. Call it.
22755 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22756 from gimple_fold_builtin_strcpy. Print inlining stack.
22757 (handle_builtin_stxncpy): Print inlining stack.
22758 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22759
22760 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22761
22762 PR target/84176
22763 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22764 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22765 and -fcheck-pointer-bounds are used together.
22766 (indirect_thunk_prefix): New enum.
22767 (indirect_thunk_need_prefix): New function.
22768 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22769 "_nt" instead of "_bnd" for NOTRACK prefix.
22770 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22771 (output_indirect_thunk_function): Likewise.
22772 (): Likewise.
22773 (ix86_code_end): Update output_indirect_thunk_function calls.
22774 (ix86_output_indirect_branch_via_reg): Replace
22775 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22776 (ix86_output_indirect_branch_via_push): Likewise.
22777 (ix86_output_function_return): Likewise.
22778 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22779 incompatible with -fcf-protection=branch and
22780 -fcheck-pointer-bounds.
22781
22782 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22783
22784 PR target/83335
22785 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22786 Change gcc_assert call to output_operand_lossage.
22787
22788 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22789
22790 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22791
22792 2018-02-22 DJ Delorie <dj@redhat.com>
22793 Sebastian Perta <sebastian.perta@renesas.com>
22794 Oleg Endo <olegendo@gcc.gnu.org>
22795
22796 * config/rx/rx.c (rx_rtx_costs): New function.
22797 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22798
22799 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22800
22801 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22802
22803 2018-02-22 Martin Liska <mliska@suse.cz>
22804
22805 PR driver/83193
22806 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22807 Add "native" as a possible value.
22808
22809 2018-02-22 Martin Liska <mliska@suse.cz>
22810
22811 PR driver/83193
22812 * config/i386/i386.c (ix86_option_override_internal):
22813 Add "native" as a possible value for -march and -mtune.
22814
22815 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22816
22817 PR target/84502
22818 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22819 to all type variants.
22820
22821 PR tree-optimization/84503
22822 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22823 width as info->bitpos + info->bitsize - start.
22824 (merged_store_group::merge_overlapping): Simplify width computation.
22825 (check_no_overlap): New function.
22826 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22827 start + width and last_order of the group, fail if check_no_overlap
22828 fails.
22829 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22830 to group if check_no_overlap fails.
22831
22832 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22833
22834 * config/rs6000/altivec.md: Delete contraint arguments to
22835 define_expand, define_split, and define_peephole2, and in
22836 define_insn_and_split if always unused.
22837 * config/rs6000/darwin.md: Ditto.
22838 * config/rs6000/dfp.md: Ditto.
22839 * config/rs6000/rs6000.md: Ditto.
22840 * config/rs6000/sync.md: Ditto.
22841 * config/rs6000/vector.md: Ditto.
22842 * config/rs6000/vsx.md: Ditto.
22843
22844 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22845
22846 * config/rs6000/altivec.md: Write output control strings as braced
22847 blocks instead of double-quoted strings.
22848 * config/rs6000/darwin.md: Ditto.
22849 * config/rs6000/rs6000.md: Ditto.
22850 * config/rs6000/vector.md: Ditto.
22851 * config/rs6000/vsx.md: Ditto.
22852
22853 2018-02-21 Jason Merrill <jason@redhat.com>
22854
22855 PR c++/84314 - ICE with templates and fastcall attribute.
22856 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22857
22858 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22859
22860 * ipa-cp.c (determine_versionability): Fix comment typos.
22861
22862 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22863
22864 PR c/84229
22865 * ipa-cp.c (determine_versionability): Do not version functions caling
22866 va_arg_pack.
22867
22868 2018-02-21 Martin Liska <mliska@suse.cz>
22869
22870 PR driver/83193
22871 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22872 Add "native" as a possible value.
22873 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22874 the macro when native cpu detection is available.
22875
22876 2018-02-21 Martin Liska <mliska@suse.cz>
22877
22878 PR driver/83193
22879 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22880 Add "native" as a possible value.
22881 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22882 when native cpu detection is available.
22883
22884 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22885 Martin Sebor <msebor@redhat.com>
22886
22887 PR tree-optimization/84478
22888 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22889 false.
22890 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22891 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22892 support which is conservatively correct, for 2 only stay conservative
22893 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22894 argument to the 2 argument get_range_strlen, adjust 6 arg
22895 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22896 false.
22897 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22898 (gimple_fold_builtin_strlen): Pass true as last argument to
22899 get_range_strlen.
22900
22901 2018-02-20 Martin Sebor <msebor@redhat.com>
22902
22903 PR middle-end/84095
22904 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22905 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22906 (builtin_memref::builtin_memref): Factor out parts into
22907 set_base_and_offset and call it.
22908
22909 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22910
22911 PR middle-end/84406
22912 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22913 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22914 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22915 search at the associated MODE_INT.
22916
22917 2018-02-20 Jeff Law <law@redhat.com>
22918
22919 PR middle-end/82123
22920 PR tree-optimization/81592
22921 PR middle-end/79257
22922 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22923 for range data rather than using global data.
22924 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22925 range data rather than using global data.
22926 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22927 pass it to children as needed.
22928 (struct directive::fmtresult): Similarly.
22929 (struct directive::set_width): Similarly.
22930 (struct directive::set_precision): Similarly.
22931 (format_integer, format_directive, parse_directive): Similarly.
22932 (format_none): Accept unnamed vr_values parameter.
22933 (format_percent, format_floating, format_character): Similarly.
22934 (format_string, format_plain): Similarly.
22935 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22936 the EVRP range analyzer for range data rather than using global data.
22937 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22938 gimple-ssa-evrp-analyze.h
22939 (class sprintf_dom_walker): Add after_dom_children member function.
22940 Add evrp_range_analyzer member.
22941 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22942 range analyzer as needed.
22943 (sprintf_dom_walker::after_dom_children): New member function.
22944 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22945 if not optimizing.
22946 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22947 (evrp_range_analyzer::pop_to_marker): Likewise.
22948
22949 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22950
22951 PR tree-optimization/84419
22952 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22953 with the required type if its current type is compatible but
22954 different.
22955
22956 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22957
22958 PR middle-end/82004
22959 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22960 after vectorization.
22961
22962 2018-02-20 Martin Liska <mliska@suse.cz>
22963
22964 PR driver/83193
22965 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22966 possible values if we don't have a hint.
22967
22968 2018-02-20 Martin Liska <mliska@suse.cz>
22969
22970 PR c/84310
22971 PR target/79747
22972 * final.c (shorten_branches): Build align_tab array with one
22973 more element.
22974 * opts.c (finish_options): Add alignment option limit check.
22975 (MAX_CODE_ALIGN): Likewise.
22976 (MAX_CODE_ALIGN_VALUE): Likewise.
22977 * doc/invoke.texi: Document maximum allowed option value for
22978 all -falign-* options.
22979
22980 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22981
22982 PR target/84146
22983 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22984 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22985 * var-tracking.c (emit_note_insn_var_location): Remove all references
22986 to NOTE_INSN_CALL_ARG_LOCATION.
22987 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22988 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22989 Use copy_rtx_if_shared.
22990 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22991 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22992 (dwarf2out_var_location): Remove handling of
22993 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22994 on call_insn.
22995 * final.c (final_scan_insn): Remove all references to
22996 NOTE_INSN_CALL_ARG_LOCATION.
22997 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22998 before dumping final insns.
22999 * except.c (emit_note_eh_region_end): Remove all references to
23000 NOTE_INSN_CALL_ARG_LOCATION.
23001 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
23002 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
23003 * config/arc/arc.c (hwloop_optimize): Likewise.
23004 * config/arm/arm.c (create_fix_barrier): Likewise.
23005 * config/s390/s390.c (s390_chunkify_start): Likewise.
23006 * config/sh/sh.c (find_barrier): Likewise.
23007 * config/i386/i386.c (rest_of_insert_endbranch,
23008 ix86_seh_fixup_eh_fallthru): Likewise.
23009 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
23010 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
23011 * config/frv/frv.c (frv_function_prologue): Likewise.
23012 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
23013 reg note.
23014 (note_outside_basic_block_p): Remove all references to
23015 NOTE_INSN_CALL_ARG_LOCATION.
23016 * gengtype.c (adjust_field_rtx_def): Likewise.
23017 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
23018 Likewise.
23019 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
23020 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
23021
23022 PR c++/84444
23023 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
23024 is ADDR_EXPR.
23025
23026 PR tree-optimization/84452
23027 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
23028 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
23029 is NULL.
23030
23031 2018-02-19 Martin Liska <mliska@suse.cz>
23032
23033 PR sanitizer/82183
23034 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
23035
23036 2018-02-19 Martin Liska <mliska@suse.cz>
23037 Richard Sandiford <richard.sandiford@linaro.org>
23038
23039 PR tree-optimization/82491
23040 * gimple-fold.c (get_base_constructor): Make earlier bail out
23041 to prevent ubsan.
23042
23043 2018-02-19 Carl Love <cel@us.ibm.com>
23044
23045 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
23046 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
23047 BU_P8V_OVERLOAD_1.
23048 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
23049 P8V_BUILTIN_VEC_NEG.
23050
23051 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
23052
23053 * config/rl78/rl78.md (movdf): New define expand.
23054
23055 2018-02-19 Martin Liska <mliska@suse.cz>
23056
23057 PR other/80589
23058 * doc/invoke.texi: Fix typo.
23059 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
23060
23061 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
23062
23063 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
23064 handle rs6000_single_float and rs6000_double_float specially for
23065 e500 family CPUs.
23066
23067 2018-02-16 Jeff Law <law@redhat.com>
23068
23069 * config/rx/rx.c (add_pop_cfi_notes): New function.;
23070 (pop_regs): Use it.
23071
23072 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23073
23074 PR ipa/84425
23075 * ipa-inline.c (inline_small_functions): Fix a typo.
23076
23077 2018-02-16 Nathan Sidwell <nathan@acm.org>
23078
23079 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
23080
23081 2018-02-16 Carl Love <cel@us.ibm.com>
23082
23083 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
23084 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
23085 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
23086 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
23087 expansion to P8V_BUILTIN_VEC_FLOAT2.
23088
23089 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
23090
23091 PR rtl-optimization/70023
23092 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
23093 src_regno into account.
23094
23095 2018-02-16 Carl Love <cel@us.ibm.com>
23096
23097 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
23098 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
23099 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
23100 * config/rs6000/rs6000.c: Remove case statements for
23101 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
23102 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
23103 and P9V_BUILTIN_VEC_VINSERT4B.
23104 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
23105 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
23106 * config/rs6000/vsx.md:
23107 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
23108 vec_insert4b.
23109
23110 2018-02-16 Carl Love <cel@us.ibm.com>
23111
23112 * config/rs6000/altivec.h: Add builtin names vec_extract4b
23113 vec_insert4b.
23114 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
23115 definitions.
23116 * config/rs6000/rs6000-c.c: Add the definitions for
23117 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
23118 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
23119 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
23120 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
23121 definition for insert4b and define insn *insert3b_internal.
23122 * doc/extend.texi: Add documentation for vec_extract4b.
23123
23124 2018-02-16 Nathan Sidwell <nathan@acm.org>
23125
23126 * doc/extend.texi (Backwards Compatibility): Mention friend
23127 injection. Note for-scope is deprecated.
23128 * doc/invoke.texi (-ffriend-injection): Deprecate.
23129
23130 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
23131
23132 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
23133 that moved to I2, also allow destinations that are a paradoxical
23134 subreg (instead of a normal reg).
23135
23136 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
23137
23138 PR target/83831
23139 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
23140 to QImode.
23141
23142 2018-02-16 Richard Biener <rguenther@suse.de>
23143
23144 PR tree-optimization/84037
23145 PR tree-optimization/84016
23146 PR target/82862
23147 * config/i386/i386.c (ix86_builtin_vectorization_cost):
23148 Adjust vec_construct for the fact we need additional higher latency
23149 128bit inserts for AVX256 and AVX512 vector builds.
23150 (ix86_add_stmt_cost): Scale vector construction cost for
23151 elementwise loads.
23152
23153 2018-02-16 Richard Biener <rguenther@suse.de>
23154
23155 PR tree-optimization/84417
23156 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
23157 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
23158 (non_rewritable_lvalue_p): Likewise, use poly-ints.
23159
23160 2018-02-16 Martin Liska <mliska@suse.cz>
23161
23162 PR sanitizer/84307
23163 * internal-fn.def (ASAN_CHECK): Set proper flags.
23164 (ASAN_MARK): Likewise.
23165
23166 2018-02-16 Julia Koval <julia.koval@intel.com>
23167
23168 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23169 from PTA_CANNONLAKE.
23170
23171 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23172
23173 PR target/84272
23174 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23175 Use ++iter rather than iter++ for std::list iterators.
23176 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
23177 defer deleting them until all nodes in the forest are processed. Do
23178 free even leaf nodes. Change to_process into auto_vec.
23179
23180 PR bootstrap/84405
23181 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23182 * vec.h (vec_default_construct): Use memset instead of placement new
23183 if BROKEN_VALUE_INITIALIZATION is defined.
23184 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23185 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23186 is defined.
23187
23188 PR rtl-optimization/83723
23189 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23190 * lra.c (lra_substitute_pseudo): Likewise. If true, use
23191 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
23192 recursive calls.
23193 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23194 callers.
23195 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23196
23197 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
23198
23199 PR rtl-optimization/81443
23200 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23201 from inner REGs to paradoxical SUBREGs.
23202
23203 2018-02-16 Richard Biener <rguenther@suse.de>
23204
23205 PR tree-optimization/84399
23206 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23207 For operands we can analyze at their definition make sure we can
23208 analyze them at each use as well.
23209
23210 2018-02-16 Richard Biener <rguenther@suse.de>
23211
23212 PR tree-optimization/84190
23213 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23214 volatile accesses if the decl isn't volatile.
23215
23216 2018-02-15 Jason Merrill <jason@redhat.com>
23217
23218 PR c++/84314 - ICE with templates and fastcall attribute.
23219 * attribs.c (build_type_attribute_qual_variant): Don't clobber
23220 TYPE_CANONICAL on an existing type.
23221
23222 2018-02-15 Jakub Jelinek <jakub@redhat.com>
23223
23224 PR tree-optimization/84383
23225 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23226 dstoff nor call operand_equal_p if dstbase is NULL.
23227
23228 PR tree-optimization/84334
23229 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23230 also a CONSTANT_CLASS_P, punt.
23231
23232 2018-02-14 Jim Wilson <jimw@sifive.com>
23233
23234 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23235 first SMALL_OPERAND check. New local min_second_step. Move assert
23236 to where locals are set. Add TARGET_RVC support.
23237 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23238
23239 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
23240
23241 * doc/invoke.texi: Correct -Wformat-overflow code sample.
23242
23243 2018-02-14 Martin Sebor <msebor@redhat.com>
23244
23245 PR tree-optimization/83698
23246 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23247 arrays constrain the offset range to their bounds.
23248 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23249 (builtin_access::overlap): Avoid setting the size of overlap if it's
23250 already been set.
23251 (maybe_diag_overlap): Also consider arrays when deciding what values
23252 of offsets to include in diagnostics.
23253
23254 2018-02-14 Martin Sebor <msebor@redhat.com>
23255
23256 PR c/84108
23257 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23258 that correspond to the kind of a declaration.
23259
23260 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
23261
23262 PR target/83984
23263 * config/pa/pa.md: Load address of PIC label using the linkage table
23264 if the label is nonlocal.
23265
23266 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
23267
23268 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23269 warning message if user requests -maltivec=be.
23270 * doc/invoke.texi: Document deprecation of -maltivec=be.
23271
23272 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
23273
23274 PR target/84220
23275 * config/rs6000/rs6000-c.c: Update definitions for
23276 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23277 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23278
23279 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23280
23281 PR target/84239
23282 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23283 add _get_ssp intrinsics. Remove argument from
23284 __builtin_ia32_rdssp[d|q].
23285 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23286 * config/i386/i386-builtin.def: Remove argument from
23287 __builtin_ia32_rdssp[d|q].
23288 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23289 ix86_expand_special_args_builtin for _rdssp[d|q].
23290 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23291 Clear register before usage.
23292 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23293 Add documentation for new _get_ssp and _inc_ssp intrinsics.
23294
23295 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
23296
23297 PR tree-optimization/84357
23298 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23299 operand 1 of an ARRAY_REF too.
23300
23301 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
23302
23303 PR target/83831
23304 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23305 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23306 declarations.
23307 (set_of_reg): New struct.
23308 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23309 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23310 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23311 functions.
23312 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23313 Split into bitclr, bitset, bitinvert patterns if appropriate.
23314 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23315 use rx_fuse_in_memory_bitop.
23316 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23317 to named insn, correct maximum insn length.
23318
23319 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
23320
23321 PR target/79242
23322 * machmode.def: Define a complex mode for PARTIAL_INT.
23323 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23324 MODE_PARTIAL_INT.
23325 * doc/rtl.texi: Document CSPImode.
23326 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23327 handling.
23328 (msp430_hard_regno_nregs_with_padding): Likewise.
23329
23330 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
23331
23332 PR target/84279
23333 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23334
23335 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
23336
23337 PR rtl-optimization/84169
23338 * combine.c (try_combine): New variable split_i2i3. Set it to true if
23339 we generated a parallel as new i3 and we split that to new i2 and i3
23340 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
23341 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
23342 those to i2, not i1. Partially rewrite this scan code.
23343
23344 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23345
23346 PR c/82210
23347 * stor-layout.c (place_field): For variable length fields, adjust
23348 offset_align afterwards not just based on the field's alignment,
23349 but also on the size.
23350
23351 PR middle-end/84309
23352 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23353 of exps and logs in the use_exp2 case.
23354
23355 2018-02-13 Jeff Law <law@redhat.com>
23356
23357 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23358 entry for "vector".
23359
23360 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23361 ARGS as unused.
23362
23363 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
23364
23365 PR debug/84342
23366 PR debug/84319
23367 * common.opt (gas-loc-support, gas-locview-support): New.
23368 (ginline-points, ginternal-reset-location-views): New.
23369 * doc/invoke.texi: Document them. Use @itemx where intended.
23370 (gvariable-location-views): Adjust.
23371 * target.def (reset_location_view): New.
23372 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23373 (TARGET_RESET_LOCATION_VIEW): New.
23374 * doc/tm.texi: Rebuilt.
23375 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23376 (dwarf2out_default_as_locview_support): New.
23377 (output_asm_line_debug_info): Use option variables.
23378 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23379 (output_loc_list): Likewise.
23380 (add_high_low_attributes): Check option variables.
23381 Don't output entry view attribute in strict mode.
23382 (gen_inlined_subroutine_die): Check option variables.
23383 (dwarf2out_inline_entry): Likewise.
23384 (init_sections_and_labels): Likewise.
23385 (dwarf2out_early_finish): Likewise.
23386 (maybe_reset_location_view): New, from...
23387 (dwarf2out_var_location): ... here. Call it.
23388 * debug.h (dwarf2out_default_as_loc_support): Declare.
23389 (dwarf2out_default_as_locview_support): Declare.
23390 * hooks.c (hook_int_rtx_insn_0): New.
23391 * hooks.h (hook_int_rtx_insn_0): Declare.
23392 * toplev.c (process_options): Take -gas-loc-support and
23393 -gas-locview-support from dwarf2out. Enable
23394 -gvariable-location-views by default only with locview
23395 assembler support. Enable -ginternal-reset-location-views by
23396 default only if the target defines the corresponding hook.
23397 Enable -ginline-points by default if location views are
23398 enabled; force it disabled if statement frontiers are
23399 disabled.
23400 * tree-inline.c (expand_call_inline): Check option variables.
23401 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23402
23403 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23404
23405 PR tree-optimization/84321
23406 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23407 handling. Also check whether the anti-range contains any values
23408 that satisfy the mask; switch to a VR_RANGE if not.
23409
23410 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23411
23412 PR sanitizer/84340
23413 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23414
23415 2018-02-13 Martin Jambor <mjambor@suse.cz>
23416
23417 PR c++/83990
23418 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23419 of call statements, also set location of a load to a temporary.
23420
23421 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23422
23423 * config/rl78/rl78.c (add_vector_labels): New function.
23424 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23425 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23426 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23427 which checks that no arguments are passed.
23428 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23429 * doc/extend.texi: Documentation for the new attribute.
23430
23431 2018-02-13 Andreas Schwab <schwab@suse.de>
23432
23433 * config/riscv/linux.h (CPP_SPEC): Define.
23434
23435 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23436
23437 PR target/84335
23438 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23439 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23440 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23441 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23442 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23443 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23444 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23445 temporarily for AES and PCLMUL builtins.
23446
23447 PR tree-optimization/84339
23448 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23449 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23450 Formatting fixes.
23451
23452 PR middle-end/84309
23453 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23454 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23455 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23456 inline function.
23457 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23458 inline function.
23459 * omp-simd-clone.h: New file.
23460 * omp-simd-clone.c: Include omp-simd-clone.h.
23461 (expand_simd_clones): No longer static.
23462 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23463 cgraph.h and omp-simd-clone.h.
23464 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23465 (vect_recog_widen_shift_pattern): Formatting fix.
23466 (vect_pattern_recog_1): Don't check optab for calls.
23467
23468 PR target/84336
23469 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23470 operands[2] into a REG before using gen_lowpart on it.
23471
23472 2018-02-12 Jeff Law <law@redhat.com>
23473
23474 PR target/83760
23475 * config/sh/sh.c (find_barrier): Consider a sibling call
23476 a barrier as well.
23477
23478 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23479 successfully back substituting a reg.
23480
23481 2018-02-12 Richard Biener <rguenther@suse.de>
23482
23483 PR tree-optimization/84037
23484 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23485 parameter, move visited init to caller.
23486 (vect_slp_analyze_operations): Separate cost from validity
23487 check, initialize visited once for all instances.
23488 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23489 for all instances.
23490 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23491 out an assert.
23492 (vect_model_promotion_demotion_cost): Likewise.
23493 (vectorizable_bswap): Guard cost modeling with !slp_node
23494 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23495 SLP stmts.
23496 (vectorizable_call): Likewise.
23497 (vectorizable_conversion): Likewise.
23498 (vectorizable_assignment): Likewise.
23499 (vectorizable_shift): Likewise.
23500 (vectorizable_operation): Likewise.
23501 (vectorizable_store): Likewise.
23502 (vectorizable_load): Likewise.
23503 (vectorizable_condition): Likewise.
23504 (vectorizable_comparison): Likewise.
23505
23506 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23507
23508 PR sanitizer/84307
23509 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23510 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23511 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23512
23513 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23514
23515 PR middle-end/83665
23516 * params.def (inline-min-speedup): Increase from 8 to 15.
23517 (max-inline-insns-auto): Decrease from 40 to 30.
23518 * ipa-split.c (consider_split): Add some buffer for function to
23519 be considered inlining candidate.
23520 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23521 default values.
23522
23523 2018-02-12 Richard Biener <rguenther@suse.de>
23524
23525 PR tree-optimization/84037
23526 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23527 matched stmts if we cannot swap the non-matched ones.
23528
23529 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23530
23531 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23532 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23533 _mm_maskz_scalef_round_ss): New intrinsics.
23534 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23535 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23536 __builtin_ia32_scalefss_round): Remove.
23537 (__builtin_ia32_scalefsd_mask_round,
23538 __builtin_ia32_scalefss_mask_round): New intrinsics.
23539 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23540 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23541 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23542 "<round_constraint>")): Changed to ...
23543 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23544 "<round_scalar_constraint>")): ... this.
23545 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23546 %0, %1, %2<round_op3>}"): Changed to ...
23547 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23548 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23549 %2<round_scalar_mask_op3>}"): ... this.
23550 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23551
23552 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23553
23554 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23555 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23556 (_mm_maskz_sqrt_round_ss): New intrinsics.
23557 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23558 (__builtin_ia32_sqrtsd_mask_round)
23559 (__builtin_ia32_sqrtss_mask_round): New builtins.
23560 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23561 (__builtin_ia32_sqrtss_round): Remove.
23562 (__builtin_ia32_sqrtsd_mask_round)
23563 (__builtin_ia32_sqrtss_mask_round): New builtins.
23564 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23565 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23566 ((match_operand:VF_128 1 "vector_operand"
23567 "xBm,<round_constraint>")): Changed to ...
23568 ((match_operand:VF_128 1 "vector_operand"
23569 "xBm,<round_scalar_constraint>")): ... this.
23570 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23571 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23572 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23573 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23574 %<iptr>1<round_scalar_mask_op3>}): ... this.
23575 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23576 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23577
23578 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23579
23580 PR target/84266
23581 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23582 Cast vec_cmpeq result to correct type.
23583 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23584 Cast vec_cmpgt result to correct type.
23585
23586 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23587
23588 * final.c (final_scan_insn_1): Renamed from...
23589 (final_scan_insn): ... this. New wrapper, to recover
23590 seen from the outermost call in recursive ones.
23591 * config/sparc/sparc.c (output_return): Drop seen from call.
23592 (output_sibcall): Likewise.
23593 * config/visium/visium.c (output_branch): Likewise.
23594
23595 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23596
23597 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23598 function label.
23599
23600 2018-02-10 Alan Modra <amodra@gmail.com>
23601
23602 PR target/84300
23603 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23604 Specify LR as an input.
23605
23606 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23607
23608 PR sanitizer/83987
23609 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23610 remove_member_access_dummy_vars): New functions.
23611 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23612 lower_omp_1, execute_lower_omp): Use them.
23613
23614 PR rtl-optimization/84308
23615 * shrink-wrap.c (spread_components): Release todo vector.
23616
23617 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23618
23619 PR rtl-optimization/57193
23620 * ira-color.c (struct allocno_color_data): Add member
23621 conflict_allocno_hard_prefs.
23622 (update_conflict_allocno_hard_prefs): New.
23623 (bucket_allocno_compare_func): Add a preference based on
23624 conflict_allocno_hard_prefs.
23625 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23626 (color_allocnos): Remove a dead code. Initiate
23627 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23628
23629 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23630
23631 PR target/84226
23632 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23633 constraint from =wa to wa. Avoid a subreg on the output operand,
23634 instead use a pseudo and subreg it in a move.
23635 (p9_xxbrd_<mode>): Changed to ...
23636 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23637 (p9_xxbrd_v2df): New expander.
23638 (p9_xxbrw_<mode>): Changed to ...
23639 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23640 (p9_xxbrw_v4sf): New expander.
23641
23642 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23643
23644 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23645
23646 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23647
23648 PR target/83926
23649 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23650 multiply in 32-bit mode.
23651 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23652 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23653 mode.
23654
23655 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23656
23657 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23658 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23659 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23660 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23661
23662 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23663
23664 PR lto/84213
23665 * dwarf2out.c (is_trivial_indirect_ref): New function.
23666 (dwarf2out_late_global_decl): Do not generate a location
23667 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23668 and that are not defined in the current unit.
23669
23670 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23671
23672 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23673 instead of a libcall for UNORDERED.
23674
23675 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23676
23677 PR target/82641
23678 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23679 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23680
23681 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23682
23683 PR target/PR84295
23684 * config/s390/s390.c (s390_set_current_function): Invoke
23685 s390_indirect_branch_settings also if fndecl didn't change.
23686
23687 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23688
23689 * config/rs6000/rs6000.md (blockage): Set length to zero.
23690
23691 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23692
23693 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23694
23695 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23696
23697 PR sanitizer/84285
23698 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23699 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23700 -static-lib*san.
23701
23702 PR debug/84252
23703 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23704 PARALLEL incoming that failed vt_get_decl_and_offset check.
23705
23706 PR middle-end/84237
23707 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23708 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23709 TREE_READONLY bit.
23710 (get_variable_section): For decls in named .bss* sections pass true as
23711 second argument to bss_initializer_p.
23712
23713 2018-02-09 Marek Polacek <polacek@redhat.com>
23714 Jakub Jelinek <jakub@redhat.com>
23715
23716 PR c++/83659
23717 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23718 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23719 Sync some changes from cxx_fold_indirect_ref.
23720
23721 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23722
23723 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23724 markers.
23725 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23726 (BLOCK_INLINE_ENTRY_LABEL): New.
23727 (dwarf2out_var_location): Disregard inline entry markers.
23728 (inline_entry_data): New struct.
23729 (inline_entry_data_hasher): New hashtable type.
23730 (inline_entry_data_hasher::hash): New.
23731 (inline_entry_data_hasher::equal): New.
23732 (inline_entry_data_table): New variable.
23733 (add_high_low_attributes): Add DW_AT_entry_pc and
23734 DW_AT_GNU_entry_view attributes if a pending entry is found
23735 in inline_entry_data_table. Add old entry_pc attribute only
23736 if debug nonbinding markers are disabled.
23737 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23738 markers are enabled.
23739 (block_within_block_p, dwarf2out_inline_entry): New.
23740 (dwarf2out_finish): Check that no entries remained in
23741 inline_entry_data_table.
23742 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23743 (final_scan_insn, notice_source_line): Likewise.
23744 (rest_of_clean_state): Skip inline entry markers.
23745 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23746 markers.
23747 * gimple.c (gimple_build_debug_inline_entry): New.
23748 * gimple.h (enum gimple_debug_subcode): Add
23749 GIMPLE_DEBUG_INLINE_ENTRY.
23750 (gimple_build_debug_inline_entry): Declare.
23751 (gimple_debug_inline_entry_p): New.
23752 (gimple_debug_nonbind_marker_p): Adjust.
23753 * insn-notes.def (INLINE_ENTRY): New.
23754 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23755 inline entry marker notes.
23756 (print_insn): Likewise.
23757 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23758 (INSN_DEBUG_MARKER_KIND): Likewise.
23759 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23760 * tree-inline.c (expand_call_inline): Build and insert
23761 debug_inline_entry stmt.
23762 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23763 inline entry blocks early, if nonbind markers are enabled.
23764 (dump_scope_block): Dump fragment info.
23765 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23766 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23767 (gimple_build_debug_inline_entry): New.
23768 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23769 Enable/disable inline entry points too.
23770 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23771 (DEBUG_INSN): Describe inline entry markers.
23772
23773 * common.opt (gvariable-location-views): New.
23774 (gvariable-location-views=incompat5): New.
23775 * config.in: Rebuilt.
23776 * configure: Rebuilt.
23777 * configure.ac: Test assembler for view support.
23778 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23779 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23780 * dwarf2out.c (var_loc_view): New typedef.
23781 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23782 (dwarf2out_locviews_in_attribute): New.
23783 (dwarf2out_locviews_in_loclist): New.
23784 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23785 (enum dw_line_info_opcode): Add LI_adv_address.
23786 (struct dw_line_info_table): Add view.
23787 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23788 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23789 (zero_view_p): New variable.
23790 (ZERO_VIEW_P): New macro.
23791 (output_asm_line_debug_info): New.
23792 (struct var_loc_node): Add view.
23793 (add_AT_view_list, AT_loc_list): New.
23794 (add_var_loc_to_decl): Add view param. Test it against last.
23795 (new_loc_list): Add view params. Record them.
23796 (AT_loc_list_ptr): Handle loc and view lists.
23797 (view_list_to_loc_list_val_node): New.
23798 (print_dw_val): Handle dw_val_class_view_list.
23799 (size_of_die): Likewise.
23800 (value_format): Likewise.
23801 (loc_list_has_views): New.
23802 (gen_llsym): Set vl_symbol too.
23803 (maybe_gen_llsym, skip_loc_list_entry): New.
23804 (dwarf2out_maybe_output_loclist_view_pair): New.
23805 (output_loc_list): Output view list or entries too.
23806 (output_view_list_offset): New.
23807 (output_die): Handle dw_val_class_view_list.
23808 (output_dwarf_version): New.
23809 (output_compilation_unit_header): Use it.
23810 (output_skeleton_debug_sections): Likewise.
23811 (output_rnglists, output_line_info): Likewise.
23812 (output_pubnames, output_aranges): Update version comments.
23813 (output_one_line_info_table): Output view numbers in asm comments.
23814 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23815 Call maybe_gen_llsym.
23816 (loc_list_from_tree_1): Adjust.
23817 (add_AT_location_description): Create view list attribute if
23818 needed, check it's absent otherwise.
23819 (convert_cfa_to_fb_loc_list): Adjust.
23820 (maybe_emit_file): Call output_asm_line_debug_info for test.
23821 (dwarf2out_var_location): Reset views as needed. Precompute
23822 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23823 attribute. Set view.
23824 (new_line_info_table): Reset next view.
23825 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23826 (dwarf2out_source_line): Likewise. Output view resets and labels to
23827 the assembler, or select appropriate line info opcodes.
23828 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23829 (optimize_string_length): Catch it. Adjust.
23830 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23831 dw_val_class_view_list, and remove it if no longer needed.
23832 (hash_loc_list): Hash view numbers.
23833 (loc_list_hasher::equal): Compare them.
23834 (optimize_location_lists): Check whether a view list symbol is
23835 needed, and whether the locview attribute is present, and
23836 whether they match. Remove the locview attribute if no longer
23837 needed.
23838 (index_location_lists): Call skip_loc_list_entry for test.
23839 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23840 Use output_dwarf_version.
23841 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23842 (struct dw_val_node): Add val_view_list.
23843 * final.c (SEEN_NEXT_VIEW): New.
23844 (set_next_view_needed): New.
23845 (clear_next_view_needed): New.
23846 (maybe_output_next_view): New.
23847 (final_start_function): Rename to...
23848 (final_start_function_1): ... this. Take pointer to FIRST,
23849 add SEEN parameter. Emit param bindings in the initial view.
23850 (final_start_function): Reintroduce SEEN-less interface.
23851 (final): Rename to...
23852 (final_1): ... this. Take SEEN parameter. Output final pending
23853 next view at the end.
23854 (final): Reintroduce seen-less interface.
23855 (final_scan_insn): Output pending next view before switching
23856 sections or ending a block. Mark the next view as needed when
23857 outputting variable locations. Notify debug backend of section
23858 changes, and of location view changes.
23859 (rest_of_handle_final): Adjust.
23860 * toplev.c (process_options): Autodetect value for debug variable
23861 location views option. Warn on incompat5 without -gdwarf-5.
23862 * doc/invoke.texi (gvariable-location-views): New.
23863 (gvariable-location-views=incompat5): New.
23864 (gno-variable-location-views): New.
23865
23866 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23867
23868 PR tree-optimization/84136
23869 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23870 that the result of find_edge is non-NULL.
23871
23872 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23873
23874 PR target/83008
23875 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23876 storing integer register in SImode. Fix cost of 256 and 512
23877 byte aligned SSE register store.
23878
23879 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23880
23881 * config/i386/i386.c (ix86_multiplication_cost): Fix
23882 multiplication cost for TARGET_AVX512DQ.
23883
23884 2018-02-08 Marek Polacek <polacek@redhat.com>
23885
23886 PR tree-optimization/84238
23887 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23888 get_range_strlen.
23889
23890 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23891
23892 PR tree-optimization/84265
23893 * tree-vect-stmts.c (vectorizable_store): Don't treat
23894 VMAT_CONTIGUOUS accesses as grouped.
23895 (vectorizable_load): Likewise.
23896
23897 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23898
23899 PR tree-optimization/81635
23900 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23901 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23902 (test_round_for_mask): New functions.
23903 (wide_int_cc_tests): Call test_round_for_mask.
23904 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23905 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23906 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23907 range returned by get_range_info.
23908
23909 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23910
23911 PR ipa/81360
23912 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23913 * symtab.c: Include builtins.h
23914 (symtab_node::output_to_lto_symbol_table_p): Move here
23915 from lto-streamer-out.c:output_symbol_p.
23916 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23917 (output_symbol_p): Move all logic to symtab.c
23918 (produce_symtab): Update.
23919
23920 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23921
23922 * config/s390/s390-opts.h (enum indirect_branch): Define.
23923 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23924 (s390_indirect_branch_via_thunk)
23925 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23926 (enum s390_indirect_branch_type): Define.
23927 * config/s390/s390.c (struct s390_frame_layout, struct
23928 machine_function): Remove.
23929 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23930 (indirect_branch_table_label_no, indirect_branch_table_name):
23931 Define variables.
23932 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23933 (enum s390_indirect_branch_option): Define.
23934 (s390_return_addr_from_memory): New function.
23935 (s390_handle_string_attribute): New function.
23936 (s390_attribute_table): Add new attribute handler.
23937 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23938 (s390_indirect_branch_via_thunk): New function.
23939 (s390_indirect_branch_via_inline_thunk): New function.
23940 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23941 sibling call optimization for non z10 compiles.
23942 (s390_emit_call): Force indirect branch target to be a single
23943 register. Add r1 clobber for non-z10 compiles.
23944 (s390_emit_epilogue): Emit return jump via return_use expander.
23945 (s390_reorg): Handle JUMP_INSNs as execute targets.
23946 (s390_option_override_internal): Perform validity checks for the
23947 new command line options.
23948 (s390_indirect_branch_attrvalue): New function.
23949 (s390_indirect_branch_settings): New function.
23950 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23951 (s390_output_indirect_thunk_function): New function.
23952 (s390_code_end): Implement target hook.
23953 (s390_case_values_threshold): Implement target hook.
23954 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23955 macros.
23956 * config/s390/s390.h (struct s390_frame_layout)
23957 (struct machine_function): Move here from s390.c.
23958 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23959 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23960 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23961 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23962 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23963 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23964 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23965 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23966 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23967 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23968 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23969 (mnemonic attribute): Add values which aren't recognized
23970 automatically.
23971 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23972 pattern for branch conversion. Fix mnemonic attribute.
23973 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23974 indirect branch via thunk if requested.
23975 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23976 ("*indirect_jump"): Disable for branch conversion using out of
23977 line thunks.
23978 ("indirect_jump_via_thunk<mode>_z10")
23979 ("indirect_jump_via_thunk<mode>")
23980 ("indirect_jump_via_inlinethunk<mode>_z10")
23981 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23982 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23983 ("casesi_jump_via_inlinethunk<mode>_z10")
23984 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23985 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23986 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23987 ("*indirect2_jump"): Disable for branch conversion.
23988 ("casesi_jump"): Turn into expander and expand patterns for branch
23989 conversion.
23990 ("return_use"): New expander.
23991 ("*return"): Emit return via thunk and rename it to ...
23992 ("*return<mode>"): ... this one.
23993 * config/s390/s390.opt: Add new options and and enum for the
23994 option values.
23995
23996 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23997
23998 * lra-constraints.c (match_reload): Unconditionally use
23999 gen_lowpart_SUBREG, rather than selecting between that
24000 and equivalent gen_rtx_SUBREG code.
24001
24002 2018-02-08 Richard Biener <rguenther@suse.de>
24003
24004 PR tree-optimization/84233
24005 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
24006 changed flag instead of boguously re-using phi_inserted.
24007
24008 2018-02-08 Martin Jambor <mjambor@suse.cz>
24009
24010 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
24011 static local variables.
24012
24013 2018-02-08 Richard Biener <rguenther@suse.de>
24014
24015 PR tree-optimization/84278
24016 * tree-vect-stmts.c (vectorizable_store): When looking for
24017 smaller vector types to perform grouped strided loads/stores
24018 make sure the mode is supported by the target.
24019 (vectorizable_load): Likewise.
24020
24021 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24022
24023 * config/aarch64/aarch64.c (aarch64_components_for_bb):
24024 Increase LDP/STP opportunities by adding adjacent callee-saves.
24025
24026 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24027
24028 PR rtl-optimization/84068
24029 PR rtl-optimization/83459
24030 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
24031
24032 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
24033
24034 PR tree-optimization/84224
24035 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
24036 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
24037 non-zero arguments.
24038
24039 2018-02-07 Iain Sandoe <iain@codesourcery.com>
24040
24041 PR target/84113
24042 * config/rs6000/altivec.md (*restore_world): Remove LR use.
24043 * config/rs6000/predicates.md (restore_world_operation): Adjust op
24044 count, remove one USE.
24045
24046 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
24047
24048 * doc/install.texi (Configuration): Document the
24049 --with-long-double-format={ibm,ieee} PowerPC configuration
24050 options.
24051
24052 PR target/84154
24053 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
24054 Convert from define_expand to be define_insn_and_split. Rework
24055 float/double/_Float128 conversions to QI/HI/SImode to work with
24056 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
24057 conversions to QI/HImode types did a store and then a load to
24058 truncate the value. For conversions to VSX registers, don't split
24059 the insn, instead emit the code directly. Use the code iterator
24060 any_fix to combine signed and unsigned conversions.
24061 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
24062 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
24063 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24064 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
24065 (fix_<mode>di2_hw): Likewise.
24066 (fixuns_<mode>di2_hw): Likewise.
24067 (fix_<mode>si2_hw): Likewise.
24068 (fixuns_<mode>si2_hw): Likewise.
24069 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
24070 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24071 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
24072 fix<uns>_trunc<SFDF:mode>si2_p8.
24073 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
24074 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
24075 (fix<uns>_<mode>_mem): Likewise.
24076 (fctiw<u>z_<mode>_mem): Likewise.
24077 (fix<uns>_<mode>_mem): Likewise.
24078 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
24079 the register allocator from doing a direct move to the GPRs to do
24080 a store, and instead use the ISA 3.0 store byte/half-word from
24081 vector register instruction. For IEEE 128-bit floating point,
24082 also optimize stores of 32-bit ints.
24083 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
24084
24085 2018-02-07 Alan Hayward <alan.hayward@arm.com>
24086
24087 * genextract.c (push_pathstr_operand): New function to support
24088 [a-zA-Z].
24089 (walk_rtx): Call push_pathstr_operand.
24090 (print_path): Support [a-zA-Z].
24091
24092 2018-02-07 Richard Biener <rguenther@suse.de>
24093
24094 PR tree-optimization/84037
24095 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
24096 (cse_and_gimplify_to_preheader): Declare.
24097 (vect_get_place_in_interleaving_chain): Likewise.
24098 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24099 ivexpr_map.
24100 (_loop_vec_info::~_loop_vec_info): Delete it.
24101 (cse_and_gimplify_to_preheader): New function.
24102 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
24103 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
24104 (vectorizable_load): Likewise. For grouped stores always base
24105 the IV on the first element.
24106 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
24107 condition before gimplifying.
24108
24109 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24110
24111 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
24112 *DIV_EXPR and *MOD_EXPR.
24113
24114 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
24115
24116 PR target/84248
24117 * config/i386/i386.c (ix86_option_override_internal): Mask out
24118 the CF_SET bit when checking -fcf-protection.
24119
24120 2018-02-07 Tom de Vries <tom@codesourcery.com>
24121
24122 PR libgomp/84217
24123 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
24124 enough.
24125
24126 2018-02-07 Richard Biener <rguenther@suse.de>
24127
24128 PR tree-optimization/84204
24129 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
24130 this place.
24131
24132 PR tree-optimization/84205
24133 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
24134 special-case isl_ast_op_zdiv_r.
24135
24136 PR tree-optimization/84223
24137 * graphite-scop-detection.c (gather_bbs::before_dom_children):
24138 Only add conditions from within the region.
24139 (gather_bbs::after_dom_children): Adjust.
24140
24141 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
24142
24143 PR target/84209
24144 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
24145 * config/avr/avr.md: Only post-reload split REG-REG moves if
24146 either register is GENERAL_REG_P.
24147
24148 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24149
24150 PR tree-optimization/84235
24151 * tree-ssa-scopedtables.c
24152 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
24153 if the subtraction is performed in floating point type where NaNs are
24154 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
24155 build 1. Formatting fix.
24156
24157 2018-02-06 Jakub Jelinek <jakub@redhat.com>
24158
24159 PR target/84146
24160 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
24161 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
24162 and skip it regardless of bb boundaries. Use CALL_P macro,
24163 don't test INSN_P (insn) together with CALL_P or JUMP_P check
24164 unnecessarily, formatting fix.
24165
24166 2018-02-06 Michael Collison <michael.collison@arm.com>
24167
24168 * config/arm/thumb2.md:
24169 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24170 (*thumb_mov_notscc): Ditto.
24171
24172 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
24173
24174 PR target/84154
24175 * config/rs6000/rs6000.md (su code attribute): Use "u" for
24176 unsigned_fix, not "s".
24177
24178 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24179
24180 * configure.ac (gcc_fn_eh_frame_ro): New function.
24181 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24182 correct .eh_frame permissions.
24183 * configure: Regenerate.
24184
24185 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
24186
24187 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24188 irrelevant options.
24189
24190 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24191
24192 * config/rs6000/rs6000.c (rs6000_option_override_internal):
24193 Display warning message for -mno-speculate-indirect-jumps.
24194
24195 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
24196
24197 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24198 Undocumented.
24199 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24200
24201 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
24202
24203 PR tree-optimization/84225
24204 * tree-eh.c (find_trapping_overflow): Only call
24205 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24206
24207 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24208
24209 PR target/84145
24210 * config/i386/i386.c: Reimplement the check of possible options
24211 -mibt/-mshstk conbination. Change error messages.
24212 * doc/invoke.texi: Fix a typo: remove extra '='.
24213
24214 2018-02-06 Marek Polacek <polacek@redhat.com>
24215
24216 PR tree-optimization/84228
24217 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24218
24219 2018-02-06 Tamar Christina <tamar.christina@arm.com>
24220
24221 PR target/82641
24222 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24223 emitted arch directives.
24224 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24225 __ARM_FEATURE_COPROC before changing architectures.
24226
24227 2018-02-06 Richard Biener <rguenther@suse.de>
24228
24229 * config/i386/i386.c (print_reg): Fix typo.
24230 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24231
24232 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
24233
24234 * configure: Regenerate.
24235
24236 2018-02-05 Martin Sebor <msebor@redhat.com>
24237
24238 PR tree-optimization/83369
24239 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24240 inlining context.
24241
24242 2018-02-05 Martin Liska <mliska@suse.cz>
24243
24244 * doc/invoke.texi: Cherry-pick upstream r323995.
24245
24246 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
24247
24248 * ira.c (ira_init_register_move_cost): Adjust comment.
24249
24250 2018-02-05 Martin Liska <mliska@suse.cz>
24251
24252 PR gcov-profile/84137
24253 * doc/gcov.texi: Fix typo in documentation.
24254
24255 2018-02-05 Martin Liska <mliska@suse.cz>
24256
24257 PR gcov-profile/83879
24258 * doc/gcov.texi: Document necessity of --dynamic-list-data when
24259 using dlopen functionality.
24260
24261 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
24262
24263 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24264 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24265 _mm_maskz_range_ss, _mm_mask_range_round_ss,
24266 _mm_maskz_range_round_ss): New intrinsics.
24267 (__builtin_ia32_rangesd128_round)
24268 (__builtin_ia32_rangess128_round): Remove.
24269 (__builtin_ia32_rangesd128_mask_round,
24270 __builtin_ia32_rangess128_mask_round): New builtins.
24271 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24272 __builtin_ia32_rangess128_round): Remove.
24273 (__builtin_ia32_rangesd128_mask_round,
24274 __builtin_ia32_rangess128_mask_round): New builtins.
24275 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24276 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24277 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24278 "<round_saeonly_constraint>")): Changed to ...
24279 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24280 "<round_saeonly_scalar_constraint>")): ... this.
24281 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24282 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24283 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24284 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24285 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24286
24287 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
24288
24289 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24290 options.
24291 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24292 Remove all values except native, 8540 and 8548.
24293
24294 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
24295
24296 * config/i386/i386.c (ix86_output_function_return): Pass
24297 INVALID_REGNUM, instead of -1, as invalid register number to
24298 indirect_thunk_name and output_indirect_thunk.
24299
24300 2018-02-02 Julia Koval <julia.koval@intel.com>
24301
24302 * config.gcc: Add -march=icelake.
24303 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24304 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24305 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24306 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24307 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24308 (processor_target_table): Add icelake.
24309 (ix86_option_override_internal): Handle new PTAs.
24310 (get_builtin_code_for_version): Handle icelake.
24311 (M_INTEL_COREI7_ICELAKE): New.
24312 (fold_builtin_cpu): Handle icelake.
24313 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24314 * doc/invoke.texi: Add -march=icelake.
24315
24316 2018-02-02 Julia Koval <julia.koval@intel.com>
24317
24318 * config/i386/i386.c (ix86_option_override_internal): Change flags type
24319 to wide_int_bitmask.
24320 * wide-int-bitmask.h: New.
24321
24322 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24323
24324 PR target/84066
24325 * config/i386/i386.md: Replace Pmode with word_mode in
24326 builtin_setjmp_setup and builtin_longjmp to support x32.
24327
24328 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
24329
24330 PR target/56010
24331 PR target/83743
24332 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24333 #include "opts.h".
24334 (rs6000_supported_cpu_names): New static variable.
24335 (linux_cpu_translation_table): Likewise.
24336 (elf_platform) <cpu>: Define new static variable and use it.
24337 Translate kernel AT_PLATFORM name to canonical name if needed.
24338 Error if platform name is unknown.
24339
24340 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
24341
24342 PR target/84089
24343 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24344
24345 2018-02-01 Jeff Law <law@redhat.com>
24346
24347 PR target/84128
24348 * config/i386/i386.c (release_scratch_register_on_entry): Add new
24349 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
24350 the scratch if RELEASE_VIA_POP is false.
24351 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24352 If we have to save a temporary register, decrement SIZE appropriately.
24353 Pass new arguments to release_scratch_register_on_entry.
24354 (ix86_adjust_stack_and_probe): Likewise.
24355 (ix86_emit_probe_stack_range): Pass new arguments to
24356 release_scratch_register_on_entry.
24357
24358 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
24359
24360 PR rtl-optimization/84157
24361 * combine.c (change_zero_ext): Use REG_P predicate in
24362 front of HARD_REGISTER_P predicate.
24363
24364 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
24365
24366 * config/avr/avr.c (avr_option_override): Move disabling of
24367 -fdelete-null-pointer-checks to...
24368 * common/config/avr/avr-common.c (avr_option_optimization_table):
24369 ...here.
24370
24371 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24372
24373 PR tree-optimization/81635
24374 * tree-data-ref.c (split_constant_offset_1): For types that
24375 wrap on overflow, try to use range info to prove that wrapping
24376 cannot occur.
24377
24378 2018-02-01 Renlin Li <renlin.li@arm.com>
24379
24380 PR target/83370
24381 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24382 TAILCALL_ADDR_REGS.
24383 (aarch64_register_move_cost): Likewise.
24384 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24385 TAILCALL_ADDR_REGS.
24386 (REG_CLASS_NAMES): Likewise.
24387 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24388 TAILCALL_ADDR_REGS. Remove IP registers.
24389 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24390
24391 2018-02-01 Richard Biener <rguenther@suse.de>
24392
24393 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24394 for specifying RPO order and allow NULL for that.
24395 * domwalk.c (dom_walker::dom_walker): Likewise.
24396 (dom_walker::walk): Handle NULL RPO order.
24397 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24398 in RPO order.
24399 (rewrite_update_dom_walker): Likewise.
24400 (mark_def_dom_walker): Likewise.
24401
24402 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24403
24404 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24405 (aarch64_maybe_expand_sve_subreg_move): Declare.
24406 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24407 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24408 predicate.
24409 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24410 that are semantically a reverse operation.
24411 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24412 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24413 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24414 functions.
24415 (aarch64_can_change_mode_class): For big-endian, forbid changes
24416 between two SVE modes if they have different element sizes.
24417
24418 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24419
24420 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24421 the TImode handling for big-endian targets.
24422
24423 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24424
24425 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24426 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24427 not just bytes.
24428 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24429 Remove BSWAP handing for big-endian targets and use the form of
24430 LD1RQ appropariate for the mode.
24431
24432 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24433
24434 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24435 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24436 duplicated element.
24437
24438 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24439
24440 PR tearget/83845
24441 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24442 check for operands that need to go through aarch64_sve_reload_be.
24443
24444 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24445
24446 PR tree-optimization/81661
24447 PR tree-optimization/84117
24448 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24449 * tree-eh.c: Include gimplify.h.
24450 (find_trapping_overflow, replace_trapping_overflow,
24451 rewrite_to_non_trapping_overflow): New functions.
24452 * tree-vect-loop.c: Include tree-eh.h.
24453 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24454 * tree-data-ref.c: Include tree-eh.h.
24455 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24456
24457 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24458
24459 PR rtl-optimization/84123
24460 * combine.c (change_zero_ext): Check if hard register satisfies
24461 can_change_dest_mode before calling gen_lowpart_SUBREG.
24462
24463 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24464
24465 PR target/82444
24466 * ira.c (ira_init_register_move_cost): Remove assert.
24467
24468 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24469
24470 PR rtl-optimization/84071
24471 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24472 * doc/tm.texi: Regenerate.
24473
24474 2018-01-31 Richard Biener <rguenther@suse.de>
24475
24476 PR tree-optimization/84132
24477 * tree-data-ref.c (analyze_miv_subscript): Properly
24478 check whether evolution_function_is_affine_multivariate_p
24479 before calling gcd_of_steps_may_divide_p.
24480
24481 2018-01-31 Julia Koval <julia.koval@intel.com>
24482
24483 PR target/83618
24484 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24485 * config/i386/i386.md (rdpid_rex64) New.
24486 (rdpid): Make 32bit only.
24487
24488 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24489
24490 PR lto/84105
24491 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24492 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24493
24494 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24495
24496 Revert
24497 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24498
24499 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24500
24501 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24502
24503 PR rtl-optimization/84071
24504 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24505 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24506
24507 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24508
24509 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24510 (arc_attribute_table): Add 'aux' attribute.
24511 (arc_in_small_data_p): Consider aux like variables.
24512 (arc_is_aux_reg_p): New function.
24513 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24514 (arc_get_aux_arg): New function.
24515 (prepare_move_operands): Handle aux-register access.
24516 (arc_handle_aux_attribute): New function.
24517 * doc/extend.texi (ARC Variable attributes): Add subsection.
24518
24519 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24520
24521 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24522 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24523 (arc_attribute_table): Add 'uncached' attribute.
24524 (arc_print_operand): Print '.di' flag for uncached memory
24525 accesses.
24526 (arc_in_small_data_p): Do not consider for small data the uncached
24527 types.
24528 (arc_is_uncached_mem_p): New function.
24529 * config/arc/predicates.md (compact_store_memory_operand): Check
24530 for uncached memory accesses.
24531 (nonvol_nonimm_operand): Likewise.
24532 * doc/extend.texi (ARC Type Attribute): New subsection.
24533
24534 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24535
24536 PR c/84100
24537 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24538 falign-loops=): Add Optimization flag.
24539
24540 2018-01-30 Jeff Law <law@redhat.com>
24541
24542 PR target/84064
24543 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24544 INT_REGISTERS_SAVED. Check it prior to calling
24545 get_scratch_register_on_entry.
24546 (ix86_adjust_stack_and_probe): Similarly.
24547 (ix86_emit_probe_stack_range): Similarly.
24548 (ix86_expand_prologue): Corresponding changes.
24549
24550 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24551
24552 PR target/40411
24553 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24554 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24555
24556 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24557
24558 PR target/84112
24559 * lra-constraints.c (curr_insn_transform): Process AND in the
24560 address.
24561
24562 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24563
24564 PR rtl-optimization/83986
24565 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24566 dependence against last_pending_memory_flush in addition to
24567 pending_jump_insns.
24568
24569 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24570
24571 PR tree-optimization/81611
24572 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24573 copies.
24574
24575 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24576
24577 PR target/83758
24578 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24579 a reg rtx.
24580
24581 2018-01-30 Richard Biener <rguenther@suse.de>
24582 Jakub Jelinek <jakub@redhat.com>
24583
24584 PR tree-optimization/84111
24585 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24586 inner loops added during recursion, as they don't have up-to-date
24587 SSA form.
24588
24589 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24590
24591 PR ipa/81360
24592 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24593 (can_inline_edge_by_limits_p): ... here.
24594 (can_early_inline_edge_p, check_callers,
24595 update_caller_keys, update_callee_keys, recursive_inlining,
24596 add_new_edges_to_heap, speculation_useful_p,
24597 inline_small_functions,
24598 inline_small_functions, flatten_function,
24599 inline_to_all_callers_1): Update.
24600
24601 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24602
24603 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24604 zeros correctly.
24605
24606 2018-01-30 Richard Biener <rguenther@suse.de>
24607
24608 PR tree-optimization/83008
24609 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24610 invariant and constant vector uses in stmts when they need
24611 more than one stmt.
24612
24613 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24614
24615 PR bootstrap/84017
24616 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24617 * configure: Regenerate.
24618
24619 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24620
24621 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24622 pattern.
24623 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24624 Use gen_rtx_REG rather than gen_lowpart.
24625
24626 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24627
24628 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24629 rather than 0 when creating partial subregs.
24630
24631 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24632
24633 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24634 of usage.
24635
24636 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24637
24638 PR target/81550
24639 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24640 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24641 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24642 flags. This restores the settings used before the 2017-07-24.
24643 Turning off pre increment/decrement/modify allows IVOPTS to
24644 optimize DF/SF loops where the index is an int.
24645
24646 2018-01-29 Richard Biener <rguenther@suse.de>
24647 Kelvin Nilsen <kelvin@gcc.gnu.org>
24648
24649 PR bootstrap/80867
24650 * tree-vect-stmts.c (vectorizable_call): Don't call
24651 targetm.vectorize_builtin_md_vectorized_function if callee is
24652 NULL.
24653
24654 2018-01-22 Carl Love <cel@us.ibm.com>
24655
24656 * doc/extend.tex: Fix typo in second arg in
24657 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24658
24659 2018-01-29 Richard Biener <rguenther@suse.de>
24660
24661 PR tree-optimization/84086
24662 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24663 (flush_ssaname_freelist): When SSA names were released reset
24664 the SCEV hash table.
24665
24666 2018-01-29 Richard Biener <rguenther@suse.de>
24667
24668 PR tree-optimization/84057
24669 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24670 removed paths when removing edges.
24671
24672 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24673
24674 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24675 -mfunction-return=@var{choice}.
24676
24677 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24678
24679 PR diagnostic/84034
24680 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24681 Handle CR like TAB.
24682 (layout::print_source_line): Likewise.
24683 (test_get_line_width_without_trailing_whitespace): Add test cases.
24684
24685 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24686
24687 PR middle-end/84040
24688 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24689 debug insns.
24690
24691 2018-01-26 Jim Wilson <jimw@sifive.com>
24692
24693 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24694
24695 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24696 specified.
24697
24698 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24699
24700 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24701 and CMP + SUB-immediate -> SUBS.
24702
24703 2018-01-26 Martin Sebor <msebor@redhat.com>
24704
24705 PR tree-optimization/83896
24706 * tree-ssa-strlen.c (get_string_len): Rename...
24707 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24708 Avoid assuming length is constant.
24709 (handle_char_store): Use HOST_WIDE_INT for string length.
24710
24711 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24712
24713 PR target/81763
24714 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24715 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24716
24717 2018-01-26 Richard Biener <rguenther@suse.de>
24718
24719 PR rtl-optimization/84003
24720 * dse.c (record_store): Only record redundant stores when
24721 the earlier store aliases at least all accesses the later one does.
24722
24723 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24724
24725 PR rtl-optimization/83985
24726 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24727 REG_CFA_RESTORE insns.
24728 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24729 REG_CFA_RESTORE insns here.
24730
24731 PR c/83989
24732 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24733 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24734
24735 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24736
24737 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24738 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24739 (arc_init): Likewise.
24740 (arc_override_options): Likewise.
24741 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24742 value.
24743 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24744 support.
24745 * config/arc/arc.h (TARGET_DBNZ): Define.
24746 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24747 properly set the tune attribute.
24748 (dbnz): Use TARGET_DBNZ guard.
24749 * config/arc/arc.opt (mtune): Add core3 option.
24750
24751 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24752
24753 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24754 recognize new pic like addresses.
24755 (arc_delegitimize_address): Clean up.
24756
24757 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24758
24759 * config/arc/arc-arches.def: Option mrf16 valid for all
24760 architectures.
24761 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24762 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24763 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24764 * config/arc/arc-tables.opt: Regenerate.
24765 * config/arc/arc.c (arc_conditional_register_usage): Handle
24766 reduced register file case.
24767 (arc_file_start): Set must have build attributes.
24768 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24769 mrf16 option value.
24770 * config/arc/arc.opt (mrf16): Add new option.
24771 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24772 * config/arc/genmultilib.awk: Handle new mrf16 option.
24773 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24774 * config/arc/t-multilib: Regenerate.
24775 * doc/invoke.texi (ARC Options): Document mrf16 option.
24776
24777 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24778
24779 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24780 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24781 (arc_attribute_table): Add 'secure_call' attribute.
24782 (arc_print_operand): Print secure call operand.
24783 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24784 secure.
24785 (arc_is_secure_call_p): New function. * config/arc/arc.md
24786 (call_i): Add support for sjli instruction.
24787 (call_value_i): Likewise.
24788 * config/arc/constraints.md (Csc): New constraint.
24789
24790 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24791 John Eric Martin <John.Martin@emmicro-us.com>
24792
24793 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24794 * config/arc/arc.c (_arc_jli_section): New struct.
24795 (arc_jli_section): New type.
24796 (rc_jli_sections): New static variable.
24797 (arc_handle_jli_attribute): New function.
24798 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24799 (arc_file_end): New function.
24800 (TARGET_ASM_FILE_END): Define.
24801 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24802 (arc_add_jli_section): New function.
24803 (jli_call_scan): Likewise.
24804 (arc_reorg): Call jli_call_scan.
24805 (arc_output_addsi): Remove 'S' from printing asm operand.
24806 (arc_is_jli_call_p): New function.
24807 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24808 operand.
24809 (movhi_insn): Likewise.
24810 (movsi_insn): Likewise.
24811 (movsi_set_cc_insn): Likewise.
24812 (loadqi_update): Likewise.
24813 (load_zeroextendqisi_update): Likewise.
24814 (load_signextendqisi_update): Likewise.
24815 (loadhi_update): Likewise.
24816 (load_zeroextendhisi_update): Likewise.
24817 (load_signextendhisi_update): Likewise.
24818 (loadsi_update): Likewise.
24819 (loadsf_update): Likewise.
24820 (movsicc_insn): Likewise.
24821 (bset_insn): Likewise.
24822 (bxor_insn): Likewise.
24823 (bclr_insn): Likewise.
24824 (bmsk_insn): Likewise.
24825 (bicsi3_insn): Likewise.
24826 (cmpsi_cc_c_insn): Likewise.
24827 (movsi_ne): Likewise.
24828 (movsi_cond_exec): Likewise.
24829 (clrsbsi2): Likewise.
24830 (norm_f): Likewise.
24831 (normw): Likewise.
24832 (swap): Likewise.
24833 (divaw): Likewise.
24834 (flag): Likewise.
24835 (sr): Likewise.
24836 (kflag): Likewise.
24837 (ffs): Likewise.
24838 (ffs_f): Likewise.
24839 (fls): Likewise.
24840 (call_i): Remove 'S' asm letter, add jli instruction.
24841 (call_value_i): Likewise.
24842 * config/arc/arc.op (mjli-always): New option.
24843 * config/arc/constraints.md (Cji): New constraint.
24844 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24845 operand.
24846 (subsf3_fpx): Likewise.
24847 (mulsf3_fpx): Likewise.
24848 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24849 asm operand.
24850 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24851 function attrbutes.
24852 * doc/invoke.texi (ARC): Document mjli-always option.
24853
24854 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24855
24856 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24857 avoid addition with 0 and use incw and decw where possible.
24858
24859 2018-01-26 Richard Biener <rguenther@suse.de>
24860
24861 PR tree-optimization/81082
24862 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24863 association if it requires casting to unsigned.
24864 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24865 from fold_plusminus_mult_expr to catch important cases late when
24866 range info is available.
24867
24868 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24869
24870 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24871 * configure.ac (hidden_linkonce): New test.
24872 * configure: Regenerate.
24873 * config.in: Regenerate.
24874
24875 2018-01-26 Julia Koval <julia.koval@intel.com>
24876
24877 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24878 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24879 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24880 _mm_mask_bitshuffle_epi64_mask): Fix type.
24881 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24882 USI_FTYPE_V4DI_V4DI_USI): Remove.
24883 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24884 __builtin_ia32_vpshufbitqmb256_mask,
24885 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24886 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24887 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24888
24889 2018-01-26 Alan Modra <amodra@gmail.com>
24890
24891 PR target/84033
24892 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24893 UNSPEC_VBPERMQ. Sort other unspecs.
24894
24895 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24896
24897 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24898
24899 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24900
24901 PR middle-end/83055
24902 * predict.c (drop_profile): Do not push/pop cfun; update also
24903 node->count.
24904 (handle_missing_profiles): Fix logic looking for zero profiles.
24905
24906 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24907
24908 PR middle-end/83977
24909 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24910 on functions with #pragma omp declare simd or functions with simd
24911 attribute.
24912 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24913 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24914 Remove trailing \n from warning_at calls.
24915
24916 2018-01-25 Tom de Vries <tom@codesourcery.com>
24917
24918 PR target/84028
24919 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24920 for neutered workers.
24921
24922 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24923
24924 PR target/68467
24925 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24926 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24927
24928 2018-01-24 Jeff Law <law@redhat.com>
24929
24930 PR target/83994
24931 * i386.c (get_probe_interval): Move to earlier point.
24932 (ix86_compute_frame_layout): If -fstack-clash-protection and
24933 the frame is larger than the probe interval, then use pushes
24934 to save registers rather than reg->mem moves.
24935 (ix86_expand_prologue): Remove conditional for int_registers_saved
24936 assertion.
24937
24938 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24939
24940 PR target/84014
24941 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24942 min/max for never referenced object.
24943
24944 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24945
24946 PR middle-end/83977
24947 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24948 here.
24949 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24950 attributes from DECL_ATTRIBUTES (decl) without affecting
24951 DECL_ATTRIBUTES (current_function_decl).
24952 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24953 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24954
24955 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24956
24957 PR tree-optimization/83979
24958 * fold-const.c (fold_comparison): Use constant_boolean_node
24959 instead of boolean_{true,false}_node.
24960
24961 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24962
24963 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24964 with zero counts.
24965
24966 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24967
24968 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24969 Simplify the clause that sets the length attribute.
24970 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24971 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24972 clause that sets the length attribute.
24973 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24974
24975 2018-01-24 Tom de Vries <tom@codesourcery.com>
24976
24977 PR target/83589
24978 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24979 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24980 Add strict parameter.
24981 (prevent_branch_around_nothing): Insert dummy insn between branch to
24982 label and label with no ptx insn inbetween.
24983 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24984
24985 2018-01-24 Tom de Vries <tom@codesourcery.com>
24986
24987 PR target/81352
24988 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24989 for neutered threads in warp.
24990 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24991
24992 2018-01-24 Richard Biener <rguenther@suse.de>
24993
24994 PR tree-optimization/83176
24995 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24996 operands.
24997
24998 2018-01-24 Richard Biener <rguenther@suse.de>
24999
25000 PR tree-optimization/82819
25001 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
25002 code generating pluses that are no-ops in the target precision.
25003
25004 2018-01-24 Richard Biener <rguenther@suse.de>
25005
25006 PR middle-end/84000
25007 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
25008
25009 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25010
25011 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
25012 to merge probabilities.
25013 * predict.c (probably_never_executed): Also mark as cold functions
25014 with global 0 profile and guessed local profile.
25015 * profile-count.c (profile_probability::combine_with_count): New
25016 member function.
25017 * profile-count.h (profile_probability::operator*,
25018 profile_probability::operator*=, profile_probability::operator/,
25019 profile_probability::operator/=): Reduce precision to adjusted
25020 and set value to guessed on contradictory divisions.
25021 (profile_probability::combine_with_freq): Remove.
25022 (profile_probability::combine_wiht_count): Declare.
25023 (profile_count::force_nonzero):: Set to adjusted.
25024 (profile_count::probability_in):: Set quality to adjusted.
25025 * tree-ssa-tail-merge.c (replace_block_by): Use
25026 combine_with_count.
25027
25028 2018-01-23 Andrew Waterman <andrew@sifive.com>
25029 Jim Wilson <jimw@sifive.com>
25030
25031 * config/riscv/riscv.c (riscv_stack_boundary): New.
25032 (riscv_option_override): Set riscv_stack_boundary. Handle
25033 riscv_preferred_stack_boundary_arg.
25034 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
25035 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
25036 (STACK_BOUNDARY): Set to riscv_stack_boundary.
25037 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
25038 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
25039 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
25040
25041 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
25042
25043 PR target/83905
25044 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
25045 of struct ix86_frame.
25046 (ix86_expand_epilogue): Likewise. Add a local variable for
25047 the reg_save_offset field in struct ix86_frame.
25048
25049 2018-01-23 Bin Cheng <bin.cheng@arm.com>
25050
25051 PR tree-optimization/82604
25052 * tree-loop-distribution.c (enum partition_kind): New enum item
25053 PKIND_PARTIAL_MEMSET.
25054 (partition_builtin_p): Support above new enum item.
25055 (generate_code_for_partition): Ditto.
25056 (compute_access_range): Differentiate cases that equality can be
25057 proven at all loops, the innermost loops or no loops.
25058 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
25059 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
25060 (finalize_partitions, distribute_loop): Don't fuse partition of
25061 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
25062 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
25063 parloop is enabled.
25064
25065 2018-01-23 Martin Liska <mliska@suse.cz>
25066
25067 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
25068 order to ignore the predictor.
25069 (PRED_POLYMORPHIC_CALL): Likewise.
25070 (PRED_RECURSIVE_CALL): Likewise.
25071
25072 2018-01-23 Martin Liska <mliska@suse.cz>
25073
25074 * tree-profile.c (tree_profiling): Print function header to
25075 aware reader which function we are working on.
25076 * value-prof.c (gimple_find_values_to_profile): Do not print
25077 not interesting value histograms.
25078
25079 2018-01-23 Martin Liska <mliska@suse.cz>
25080
25081 * profile-count.h (enum profile_quality): Add
25082 profile_uninitialized as the first value. Do not number values
25083 as they are zero based.
25084 (profile_count::verify): Update sanity check.
25085 (profile_probability::verify): Likewise.
25086
25087 2018-01-23 Nathan Sidwell <nathan@acm.org>
25088
25089 * doc/invoke.texi (ffor-scope): Deprecate.
25090
25091 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25092
25093 PR tree-optimization/83510
25094 * domwalk.c (set_all_edges_as_executable): New function.
25095 (dom_walker::dom_walker): Convert bool param
25096 "skip_unreachable_blocks" to enum reachability. Move setup of
25097 edge flags to set_all_edges_as_executable and only do it when
25098 reachability is REACHABLE_BLOCKS.
25099 * domwalk.h (enum dom_walker::reachability): New enum.
25100 (dom_walker::dom_walker): Convert bool param
25101 "skip_unreachable_blocks" to enum reachability.
25102 (set_all_edges_as_executable): New decl.
25103 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
25104 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
25105 "reachability".
25106 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
25107 but converting true to REACHABLE_BLOCKS.
25108 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
25109 * tree-vrp.c
25110 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
25111 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
25112 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
25113 REACHABLE_BLOCKS.
25114 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
25115 if check_all_array_refs will be called.
25116
25117 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25118
25119 * tree.c (selftest::test_location_wrappers): Add more test
25120 coverage.
25121
25122 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25123
25124 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
25125 (selftest::test_bit_in_range): Likewise.
25126
25127 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25128
25129 PR testsuite/83888
25130 * doc/sourcebuild.texi (vect_float): Say that the selector
25131 only describes the situation when -funsafe-math-optimizations is on.
25132 (vect_float_strict): Document.
25133
25134 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25135
25136 PR tree-optimization/83965
25137 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
25138 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
25139 instead of checking only for a reduction.
25140 (vect_recog_widen_sum_pattern): Likewise.
25141
25142 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25143
25144 * predict.c (probably_never_executed): Only use precise profile info.
25145 (compute_function_frequency): Skip after inlining hack since we now
25146 have quality checking.
25147
25148 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25149
25150 * profile-count.h (profile_probability::very_unlikely,
25151 profile_probability::unlikely, profile_probability::even): Set
25152 precision to guessed.
25153
25154 2018-01-23 Richard Biener <rguenther@suse.de>
25155
25156 PR tree-optimization/83963
25157 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
25158 Properly terminate dominator walk when crossing the exit edge not
25159 when visiting its source block.
25160
25161 2018-01-23 Jakub Jelinek <jakub@redhat.com>
25162
25163 PR c++/83918
25164 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
25165 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25166
25167 2018-01-22 Jakub Jelinek <jakub@redhat.com>
25168
25169 PR tree-optimization/83957
25170 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
25171 semicolon after for body surrounded by braces.
25172
25173 PR tree-optimization/83081
25174 * profile-count.h (profile_probability::split): New method.
25175 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25176 Use profile_probability::split.
25177 (do_compare_rtx_and_jump): Fix adjustment of probabilities
25178 when splitting a single conditional jump into 2.
25179
25180 2018-01-22 David Malcolm <dmalcolm@redhat.com>
25181
25182 PR tree-optimization/69452
25183 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25184 decl.
25185
25186 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25187
25188 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25189 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25190 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25191
25192 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25193
25194 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25195 declaration.
25196 * config/rl78/rl78.md (movdi): New define_expand.
25197 * config/rl78/rl78.c (rl78_split_movdi): New function.
25198
25199 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
25200
25201 PR target/83862
25202 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25203 no longer used.
25204 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25205 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25206 128-bit to produce an UNSPEC move to get the double word with the
25207 signbit and then a shift directly to do signbit.
25208 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25209 implementation with a new version that just does either a direct
25210 move or a regular move. Move memory interface to separate insns.
25211 Move insns so they are next to the expander.
25212 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25213 with signbit move. Split big and little endian case.
25214 (signbit<mode>2_dm_mem_le): Likewise.
25215 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25216 (signbit<mode>2_dm2): Likewise.
25217
25218 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25219
25220 * config/rl78/rl78.md (anddi3): New define_expand.
25221
25222 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25223
25224 * config/rl78/rl78.md (umindi3): New define_expand.
25225
25226 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25227
25228 * config/rl78/rl78.md (smindi3): New define_expand.
25229
25230 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25231
25232 * config/rl78/rl78.md (smaxdi3): New define_expand.
25233
25234 2018-01-22 Carl Love <cel@us.ibm.com>
25235
25236 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25237 LVX_V1TI): Add macro expansion.
25238 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25239 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25240 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25241 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25242 Change check to determine if the instruction is a byte reversing
25243 entry. Fix typo in comment.
25244 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25245 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25246 Add def_builtin calls for new builtins.
25247 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25248 Add define_insn expansion.
25249
25250 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25251
25252 * config/rl78/rl78.md (umaxdi3): New define_expand.
25253
25254 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25255
25256 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25257 for non-QImode registers.
25258
25259 2018-01-22 Richard Biener <rguenther@suse.de>
25260
25261 PR tree-optimization/83963
25262 * graphite-scop-detection.c (scop_detection::get_sese): Delay
25263 including the loop exit block.
25264 (scop_detection::merge_sese): Likewise.
25265 (scop_detection::add_scop): Do it here instead.
25266
25267 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25268
25269 * doc/sourcebuild.texi (arm_softfloat): Document.
25270
25271 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
25272
25273 PR gcc/77734
25274 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25275 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25276 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25277
25278 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25279 David Edelsohn <dje.gcc@gmail.com>
25280
25281 PR target/83946
25282 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25283 Change "crset eq" to "crset 2".
25284 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25285 (*call_indirect_aix<mode>_nospec): Likewise.
25286 (*call_value_indirect_aix<mode>_nospec): Likewise.
25287 (*call_indirect_elfv2<mode>_nospec): Likewise.
25288 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25289 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25290 change assembly output from . to $.
25291 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25292 (indirect_jump<mode>_nospec): Change assembly output from . to $.
25293 (*tablejump<mode>_internal1_nospec): Likewise.
25294
25295 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
25296
25297 PR target/80870
25298 * config/sh/sh_optimize_sett_clrt.cc:
25299 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25300
25301 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
25302
25303 PR tree-optimization/83940
25304 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25305 offset_dt to vect_constant_def rather than vect_unknown_def_type.
25306 (vect_check_load_store_mask): Add a mask_dt_out parameter and
25307 use it to pass back the definition type.
25308 (vect_check_store_rhs): Likewise rhs_dt_out.
25309 (vect_build_gather_load_calls): Add a mask_dt argument and use
25310 it instead of a call to vect_is_simple_use.
25311 (vectorizable_store): Update calls to vect_check_load_store_mask
25312 and vect_check_store_rhs. Use the dt returned by the latter instead
25313 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
25314 instead of calls to vect_is_simple_use. Pass the scalar rather
25315 than the vector operand to vect_is_simple_use when handling
25316 second and subsequent copies of an rhs value.
25317 (vectorizable_load): Update calls to vect_check_load_store_mask
25318 and vect_build_gather_load_calls. Use the cached mask_dt and
25319 gs_info.offset_dt instead of calls to vect_is_simple_use.
25320
25321 2018-01-20 Jakub Jelinek <jakub@redhat.com>
25322
25323 PR middle-end/83945
25324 * tree-emutls.c: Include gimplify.h.
25325 (lower_emutls_2): New function.
25326 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25327 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25328 it before further processing.
25329
25330 PR target/83930
25331 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25332 UINTVAL (trueop1) instead of INTVAL (op1).
25333
25334 2018-01-19 Jakub Jelinek <jakub@redhat.com>
25335
25336 PR debug/81570
25337 PR debug/83728
25338 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25339 INCOMING_FRAME_SP_OFFSET if not defined.
25340 (scan_trace): Add ENTRY argument. If true and
25341 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25342 emit a note to adjust the CFA offset.
25343 (create_cfi_notes): Adjust scan_trace callers.
25344 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25345 INCOMING_FRAME_SP_OFFSET in the CIE.
25346 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25347 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25348 Likewise.
25349 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25350 * doc/tm.texi: Regenerated.
25351
25352 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25353
25354 PR rtl-optimization/83147
25355 * lra-constraints.c (remove_inheritance_pseudos): Use
25356 lra_substitute_pseudo_within_insn.
25357
25358 2018-01-19 Tom de Vries <tom@codesourcery.com>
25359 Cesar Philippidis <cesar@codesourcery.com>
25360
25361 PR target/83920
25362 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25363
25364 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
25365
25366 PR target/83790
25367 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25368 spaces for function labels.
25369
25370 2018-01-19 Martin Liska <mliska@suse.cz>
25371
25372 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25373 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25374 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25375 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25376 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25377 (PRED_CONST_RETURN): Change from 69 to 65.
25378 (PRED_NULL_RETURN): Change from 91 to 71.
25379 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25380 (PRED_LOOP_GUARD): Change from 66 to 73.
25381
25382 2018-01-19 Martin Liska <mliska@suse.cz>
25383
25384 * predict.c (predict_insn_def): Add new assert.
25385 (struct branch_predictor): Change type to signed integer.
25386 (test_prediction_value_range): Amend test to cover
25387 PROB_UNINITIALIZED.
25388 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25389 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25390 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25391 (PRED_LOOP_IV_COMPARE): Likewise.
25392 * predict.h (PROB_UNINITIALIZED): Define new constant.
25393
25394 2018-01-19 Martin Liska <mliska@suse.cz>
25395
25396 * predict.c (dump_prediction): Add new format for
25397 analyze_brprob.py script which is enabled with -details
25398 suboption.
25399 * profile-count.h (precise_p): New function.
25400
25401 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25402
25403 PR tree-optimization/83922
25404 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25405 there are no statements that need masking.
25406 (vect_active_double_reduction_p): New function.
25407 (vect_analyze_loop_operations): Use it when handling phis that
25408 are not in the loop header.
25409
25410 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25411
25412 PR tree-optimization/83914
25413 * tree-vect-loop.c (vectorizable_induction): Don't convert
25414 init_expr or apply the peeling adjustment for inductions
25415 that are nested within the vectorized loop.
25416
25417 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25418
25419 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25420 instead of NEG.
25421
25422 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25423
25424 PR sanitizer/81715
25425 PR testsuite/83882
25426 * function.h (gimplify_parameters): Add gimple_seq * argument.
25427 * function.c: Include gimple.h and options.h.
25428 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25429 for the added local temporaries if needed.
25430 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25431 if there are any parameter cleanups, wrap whole body into a
25432 try/finally with the cleanups.
25433
25434 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25435
25436 PR target/82964
25437 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25438 Use GET_MODE_CLASS for scalar floating point.
25439
25440 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25441
25442 PR ipa/82256
25443 patch by PaX Team
25444 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25445 Fix call of call_cgraph_insertion_hooks.
25446
25447 2018-01-18 Martin Sebor <msebor@redhat.com>
25448
25449 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25450
25451 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25452
25453 PR ipa/83619
25454 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25455 frequencies.
25456
25457 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25458
25459 PR other/70268
25460 * common.opt: (-ffile-prefix-map): New option.
25461 * opts.c (common_handle_option): Defer it.
25462 * opts-global.c (handle_common_deferred_options): Handle it.
25463 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25464 * file-prefix-map.h: New file.
25465 (remap_debug_filename, add_debug_prefix_map): ...here.
25466 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25467 * final.c (debug_prefix_map, add_debug_prefix_map
25468 remap_debug_filename): Move to...
25469 * file-prefix-map.c: New file.
25470 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25471 generalize, get rid of alloca(), use strrchr() instead of strchr().
25472 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25473 Implement in terms of add_prefix_map().
25474 (remap_macro_filename, remap_debug_filename): Implement in term of
25475 remap_filename().
25476 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25477 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25478 * dbxout.c: Include file-prefix-map.h.
25479 * varasm.c: Likewise.
25480 * vmsdbgout.c: Likewise.
25481 * xcoffout.c: Likewise.
25482 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25483 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25484 * doc/invoke.texi (-ffile-prefix-map): Document.
25485 (-fdebug-prefix-map): Update description.
25486
25487 2018-01-18 Martin Liska <mliska@suse.cz>
25488
25489 * config/i386/i386.c (indirect_thunk_name): Document that also
25490 lfence is emitted.
25491 (output_indirect_thunk): Document why both instructions
25492 (pause and lfence) are generated.
25493
25494 2018-01-18 Richard Biener <rguenther@suse.de>
25495
25496 PR tree-optimization/83887
25497 * graphite-scop-detection.c
25498 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25499 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25500 (scop_detection::merge_sese): Re-implement with a flood-fill
25501 algorithm that properly finds a SESE region if it exists.
25502
25503 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25504
25505 PR c/61240
25506 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25507 pointer_diff optimizations use view_convert instead of convert.
25508
25509 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25510
25511 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25512 Generate different code for -mno-speculate-indirect-jumps.
25513 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25514 (*call_indirect_aix<mode>): Disable for
25515 -mno-speculate-indirect-jumps.
25516 (*call_indirect_aix<mode>_nospec): New define_insn.
25517 (*call_value_indirect_aix<mode>): Disable for
25518 -mno-speculate-indirect-jumps.
25519 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25520 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25521 -mno-speculate-indirect-jumps.
25522 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25523
25524 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25525
25526 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25527 long double type, set the flags for noting the default long double
25528 type, even if we don't pass or return a long double type.
25529
25530 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25531
25532 PR ipa/83051
25533 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25534 failure.
25535
25536 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25537
25538 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25539 support for merge[hl].
25540 (fold_mergehl_helper): New helper function.
25541 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25542 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25543 (altivec_vmrglw_direct): Add xxmrglw insn.
25544
25545 2018-01-17 Andrew Waterman <andrew@sifive.com>
25546
25547 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25548 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25549
25550 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25551
25552 PR lto/83121
25553 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25554 call the lto_location_cache before reading the
25555 DECL_SOURCE_LOCATION of the types.
25556
25557 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25558 Richard Sandiford <richard.sandiford@linaro.org>
25559
25560 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25561 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25562 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25563 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25564 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25565 Add declaration.
25566 * config/aarch64/constraints.md (aarch64_movti_operand):
25567 Limit immediates.
25568 * config/aarch64/predicates.md (Uti): Add new constraint.
25569
25570 2018-01-17 Carl Love <cel@us.ibm.com>
25571
25572 * config/rs6000/vsx.md (define_expand xl_len_r,
25573 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25574 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25575 lxvll.
25576 (define_expand, define_insn): Move the shift left from the
25577 define_insn to the define_expand for lxvl and stxvl instructions.
25578 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25579 and XL_LEN_R definitions to PURE.
25580
25581 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25582
25583 * config/i386/i386.c (indirect_thunk_name): Declare regno
25584 as unsigned int. Compare regno with INVALID_REGNUM.
25585 (output_indirect_thunk): Ditto.
25586 (output_indirect_thunk_function): Ditto.
25587 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25588 in the call to output_indirect_thunk_function.
25589
25590 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25591
25592 PR middle-end/83884
25593 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25594 rather than the size of inner_type to determine the stack slot size
25595 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25596
25597 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25598
25599 PR target/83546
25600 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25601 to PTA_SILVERMONT.
25602
25603 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25604
25605 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25606 endian Linux systems to optionally enable multilibs for selecting
25607 the long double type if the user configured an explicit type.
25608 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25609 have no long double multilibs if not defined.
25610 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25611 warn if the user used -mabi={ieee,ibm}longdouble and we built
25612 multilibs for long double.
25613 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25614 appropriate multilib option.
25615 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25616 multilib options.
25617 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25618 for building long double multilibs.
25619 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25620
25621 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25622
25623 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25624 copies.
25625
25626 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25627 64 bits.
25628 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25629 128 bits.
25630
25631 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25632 variables.
25633
25634 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25635 return value.
25636
25637 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25638
25639 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25640 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25641
25642 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25643
25644 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25645 different rtl trees depending on TARGET_64BIT.
25646 (rs6000_gen_lvx): Likewise.
25647
25648 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25649
25650 * config/visium/visium.md (nop): Tweak comment.
25651 (hazard_nop): Likewise.
25652
25653 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25654
25655 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25656 -mspeculate-indirect-jumps.
25657 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25658 for -mno-speculate-indirect-jumps.
25659 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25660 (*call_value_indirect_elfv2<mode>): Disable for
25661 -mno-speculate-indirect-jumps.
25662 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25663 (indirect_jump): Emit different RTL for
25664 -mno-speculate-indirect-jumps.
25665 (*indirect_jump<mode>): Disable for
25666 -mno-speculate-indirect-jumps.
25667 (*indirect_jump<mode>_nospec): New define_insn.
25668 (tablejump): Emit different RTL for
25669 -mno-speculate-indirect-jumps.
25670 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25671 (tablejumpsi_nospec): New define_expand.
25672 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25673 (tablejumpdi_nospec): New define_expand.
25674 (*tablejump<mode>_internal1): Disable for
25675 -mno-speculate-indirect-jumps.
25676 (*tablejump<mode>_internal1_nospec): New define_insn.
25677 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25678 option.
25679
25680 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25681
25682 * caller-save.c (insert_save): Drop unnecessary parameter. All
25683 callers updated.
25684
25685 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25686 Richard Biener <rguenth@suse.de>
25687
25688 PR libgomp/83590
25689 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25690 return early, inline manually is_gimple_sizepos. Make sure if we
25691 call gimplify_expr we don't end up with a gimple constant.
25692 * tree.c (variably_modified_type_p): Don't return true for
25693 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25694 * gimplify.h (is_gimple_sizepos): Remove.
25695
25696 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25697
25698 PR tree-optimization/83857
25699 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25700 vectorizable_live_operation for pure SLP statements.
25701 (vectorizable_live_operation): Handle PHIs.
25702
25703 2018-01-16 Richard Biener <rguenther@suse.de>
25704
25705 PR tree-optimization/83867
25706 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25707 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25708
25709 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25710
25711 PR c/83844
25712 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25713 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25714 If off is not INTEGER_CST, issue a may not be aligned warning
25715 rather than isn't aligned. Use isn%'t rather than isn't.
25716 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25717 into MULT_EXPR.
25718 <case MULT_EXPR>: Improve the case when bottom and one of the
25719 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25720 operand, in that case check if the other operand is multiple of
25721 bottom divided by the INTEGER_CST operand.
25722
25723 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25724
25725 PR target/83858
25726 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25727 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25728 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25729 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25730 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25731 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25732 (pa_function_arg_size): New function.
25733
25734 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25735
25736 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25737 in a separate statement.
25738
25739 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25740
25741 PR tree-optimization/83847
25742 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25743 group gathers and scatters.
25744
25745 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25746
25747 PR rtl-optimization/86620
25748 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25749
25750 PR rtl-optimization/83213
25751 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25752 to last if both are JUMP_INSNs.
25753
25754 PR tree-optimization/83843
25755 * gimple-ssa-store-merging.c
25756 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25757 store_immediate_info for bswap/nop orig_stores.
25758
25759 2018-01-15 Andrew Waterman <andrew@sifive.com>
25760
25761 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25762 !TARGET_MUL.
25763 <UDIV>: Increase cost if !TARGET_DIV.
25764
25765 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25766
25767 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25768 (define_attr "cr_logical_3op"): New.
25769 (cceq_ior_compare): Adjust.
25770 (cceq_ior_compare_complement): Adjust.
25771 (*cceq_rev_compare): Adjust.
25772 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25773 (is_cracked_insn): Adjust.
25774 (insn_must_be_first_in_group): Adjust.
25775 * config/rs6000/40x.md: Adjust.
25776 * config/rs6000/440.md: Adjust.
25777 * config/rs6000/476.md: Adjust.
25778 * config/rs6000/601.md: Adjust.
25779 * config/rs6000/603.md: Adjust.
25780 * config/rs6000/6xx.md: Adjust.
25781 * config/rs6000/7450.md: Adjust.
25782 * config/rs6000/7xx.md: Adjust.
25783 * config/rs6000/8540.md: Adjust.
25784 * config/rs6000/cell.md: Adjust.
25785 * config/rs6000/e300c2c3.md: Adjust.
25786 * config/rs6000/e500mc.md: Adjust.
25787 * config/rs6000/e500mc64.md: Adjust.
25788 * config/rs6000/e5500.md: Adjust.
25789 * config/rs6000/e6500.md: Adjust.
25790 * config/rs6000/mpc.md: Adjust.
25791 * config/rs6000/power4.md: Adjust.
25792 * config/rs6000/power5.md: Adjust.
25793 * config/rs6000/power6.md: Adjust.
25794 * config/rs6000/power7.md: Adjust.
25795 * config/rs6000/power8.md: Adjust.
25796 * config/rs6000/power9.md: Adjust.
25797 * config/rs6000/rs64.md: Adjust.
25798 * config/rs6000/titan.md: Adjust.
25799
25800 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25801
25802 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25803 ix86_indirect_branch_register logic.
25804
25805 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25806
25807 * config/i386/constraints.md (Bs): Update
25808 ix86_indirect_branch_register check. Don't check
25809 ix86_indirect_branch_register with GOT_memory_operand.
25810 (Bw): Likewise.
25811 * config/i386/predicates.md (GOT_memory_operand): Don't check
25812 ix86_indirect_branch_register here.
25813 (GOT32_symbol_operand): Likewise.
25814
25815 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25816
25817 * config/i386/predicates.md (constant_call_address_operand):
25818 Rewrite ix86_indirect_branch_register logic.
25819 (sibcall_insn_operand): Likewise.
25820
25821 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25822
25823 * config/i386/constraints.md (Bs): Replace
25824 ix86_indirect_branch_thunk_register with
25825 ix86_indirect_branch_register.
25826 (Bw): Likewise.
25827 * config/i386/i386.md (indirect_jump): Likewise.
25828 (tablejump): Likewise.
25829 (*sibcall_memory): Likewise.
25830 (*sibcall_value_memory): Likewise.
25831 Peepholes of indirect call and jump via memory: Likewise.
25832 * config/i386/i386.opt: Likewise.
25833 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25834 (GOT_memory_operand): Likewise.
25835 (call_insn_operand): Likewise.
25836 (sibcall_insn_operand): Likewise.
25837 (GOT32_symbol_operand): Likewise.
25838
25839 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25840
25841 PR middle-end/83837
25842 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25843 type rather than type addr's type points to.
25844 (expand_omp_atomic_mutex): Likewise.
25845 (expand_omp_atomic): Likewise.
25846
25847 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25848
25849 PR target/83839
25850 * config/i386/i386.c (output_indirect_thunk_function): Use
25851 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25852 for __x86_return_thunk.
25853
25854 2018-01-15 Richard Biener <rguenther@suse.de>
25855
25856 PR middle-end/83850
25857 * expmed.c (extract_bit_field_1): Fix typo.
25858
25859 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25860
25861 PR target/83687
25862 * config/arm/iterators.md (VF): New mode iterator.
25863 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25864 Remove integer-related logic from pattern.
25865 (neon_vabd<mode>_3): Likewise.
25866
25867 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25868
25869 PR middle-end/82694
25870 * common.opt (fstrict-overflow): No longer an alias.
25871 (fwrapv-pointer): New option.
25872 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25873 also for pointer types based on flag_wrapv_pointer.
25874 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25875 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25876 opts->x_flag_wrapv got set.
25877 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25878 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25879 POINTER_TYPE_OVERFLOW_UNDEFINED.
25880 * match.pd: Likewise in address comparison pattern.
25881 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25882
25883 2018-01-15 Richard Biener <rguenther@suse.de>
25884
25885 PR lto/83804
25886 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25887 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25888 Reset type names to their identifier if their TYPE_DECL doesn't
25889 have linkage (and thus is used for ODR and devirt).
25890 (save_debug_info_for_decl): Remove.
25891 (save_debug_info_for_type): Likewise.
25892 (add_tree_to_fld_list): Adjust.
25893 * tree-pretty-print.c (dump_generic_node): Make dumping of
25894 type names more robust.
25895
25896 2018-01-15 Richard Biener <rguenther@suse.de>
25897
25898 * BASE-VER: Bump to 8.0.1.
25899
25900 2018-01-14 Martin Sebor <msebor@redhat.com>
25901
25902 PR other/83508
25903 * builtins.c (check_access): Avoid warning when the no-warning bit
25904 is set.
25905
25906 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25907
25908 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25909 * ira-color (allocno_hard_regs_compare): Likewise.
25910
25911 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25912
25913 PR target/83013
25914 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25915 Use .pushsection/.popsection.
25916
25917 2018-01-14 Martin Sebor <msebor@redhat.com>
25918
25919 PR c++/81327
25920 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25921
25922 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25923
25924 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25925 entry from extra_headers.
25926 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25927 extra_headers, make the list bitwise identical to the i?86-*-* one.
25928
25929 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25930
25931 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25932 -mcmodel=large with -mindirect-branch=thunk,
25933 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25934 -mfunction-return=thunk-extern.
25935 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25936 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25937 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25938
25939 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25940
25941 * config/i386/i386.c (print_reg): Print the name of the full
25942 integer register without '%'.
25943 (ix86_print_operand): Handle 'V'.
25944 * doc/extend.texi: Document 'V' modifier.
25945
25946 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25947
25948 * config/i386/constraints.md (Bs): Disallow memory operand for
25949 -mindirect-branch-register.
25950 (Bw): Likewise.
25951 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25952 (GOT_memory_operand): Likewise.
25953 (call_insn_operand): Likewise.
25954 (sibcall_insn_operand): Likewise.
25955 (GOT32_symbol_operand): Likewise.
25956 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25957 for -mindirect-branch-register.
25958 (tablejump): Likewise.
25959 (*sibcall_memory): Likewise.
25960 (*sibcall_value_memory): Likewise.
25961 Disallow peepholes of indirect call and jump via memory for
25962 -mindirect-branch-register.
25963 (*call_pop): Replace m with Bw.
25964 (*call_value_pop): Likewise.
25965 (*sibcall_pop_memory): Replace m with Bs.
25966 * config/i386/i386.opt (mindirect-branch-register): New option.
25967 * doc/invoke.texi: Document -mindirect-branch-register option.
25968
25969 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25970
25971 * config/i386/i386-protos.h (ix86_output_function_return): New.
25972 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25973 set function_return_type.
25974 (indirect_thunk_name): Add ret_p to indicate thunk for function
25975 return.
25976 (output_indirect_thunk_function): Pass false to
25977 indirect_thunk_name.
25978 (ix86_output_indirect_branch_via_reg): Likewise.
25979 (ix86_output_indirect_branch_via_push): Likewise.
25980 (output_indirect_thunk_function): Create alias for function
25981 return thunk if regno < 0.
25982 (ix86_output_function_return): New function.
25983 (ix86_handle_fndecl_attribute): Handle function_return.
25984 (ix86_attribute_table): Add function_return.
25985 * config/i386/i386.h (machine_function): Add
25986 function_return_type.
25987 * config/i386/i386.md (simple_return_internal): Use
25988 ix86_output_function_return.
25989 (simple_return_internal_long): Likewise.
25990 * config/i386/i386.opt (mfunction-return=): New option.
25991 (indirect_branch): Mention -mfunction-return=.
25992 * doc/extend.texi: Document function_return function attribute.
25993 * doc/invoke.texi: Document -mfunction-return= option.
25994
25995 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25996
25997 * config/i386/i386-opts.h (indirect_branch): New.
25998 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25999 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
26000 with local indirect jump when converting indirect call and jump.
26001 (ix86_set_indirect_branch_type): New.
26002 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
26003 (indirectlabelno): New.
26004 (indirect_thunk_needed): Likewise.
26005 (indirect_thunk_bnd_needed): Likewise.
26006 (indirect_thunks_used): Likewise.
26007 (indirect_thunks_bnd_used): Likewise.
26008 (INDIRECT_LABEL): Likewise.
26009 (indirect_thunk_name): Likewise.
26010 (output_indirect_thunk): Likewise.
26011 (output_indirect_thunk_function): Likewise.
26012 (ix86_output_indirect_branch_via_reg): Likewise.
26013 (ix86_output_indirect_branch_via_push): Likewise.
26014 (ix86_output_indirect_branch): Likewise.
26015 (ix86_output_indirect_jmp): Likewise.
26016 (ix86_code_end): Call output_indirect_thunk_function if needed.
26017 (ix86_output_call_insn): Call ix86_output_indirect_branch if
26018 needed.
26019 (ix86_handle_fndecl_attribute): Handle indirect_branch.
26020 (ix86_attribute_table): Add indirect_branch.
26021 * config/i386/i386.h (machine_function): Add indirect_branch_type
26022 and has_local_indirect_jump.
26023 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
26024 to true.
26025 (tablejump): Likewise.
26026 (*indirect_jump): Use ix86_output_indirect_jmp.
26027 (*tablejump_1): Likewise.
26028 (simple_return_indirect_internal): Likewise.
26029 * config/i386/i386.opt (mindirect-branch=): New option.
26030 (indirect_branch): New.
26031 (keep): Likewise.
26032 (thunk): Likewise.
26033 (thunk-inline): Likewise.
26034 (thunk-extern): Likewise.
26035 * doc/extend.texi: Document indirect_branch function attribute.
26036 * doc/invoke.texi: Document -mindirect-branch= option.
26037
26038 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
26039
26040 PR ipa/83051
26041 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
26042
26043 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
26044
26045 * ipa-inline.c (want_inline_small_function_p): Return false if
26046 inlining has already failed with CIF_FINAL_ERROR.
26047 (update_caller_keys): Call want_inline_small_function_p before
26048 can_inline_edge_p.
26049 (update_callee_keys): Likewise.
26050
26051 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
26052
26053 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
26054 New function.
26055 (rs6000_quadword_masked_address_p): Likewise.
26056 (quad_aligned_load_p): Likewise.
26057 (quad_aligned_store_p): Likewise.
26058 (const_load_sequence_p): Add comment to describe the outer-most loop.
26059 (mimic_memory_attributes_and_flags): New function.
26060 (rs6000_gen_stvx): Likewise.
26061 (replace_swapped_aligned_store): Likewise.
26062 (rs6000_gen_lvx): Likewise.
26063 (replace_swapped_aligned_load): Likewise.
26064 (replace_swapped_load_constant): Capitalize argument name in
26065 comment describing this function.
26066 (rs6000_analyze_swaps): Add a third pass to search for vector loads
26067 and stores that access quad-word aligned addresses and replace
26068 with stvx or lvx instructions when appropriate.
26069 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
26070 New function prototype.
26071 (rs6000_quadword_masked_address_p): Likewise.
26072 (rs6000_gen_lvx): Likewise.
26073 (rs6000_gen_stvx): Likewise.
26074 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
26075 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
26076 when memory address is aligned.
26077 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
26078 this split to select lvx instruction when memory address is aligned.
26079 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
26080 instruction when memory address is aligned.
26081 (*vsx_le_perm_load_v16qi): Likewise.
26082 (four unnamed splitters): Modify to select the stvx instruction
26083 when memory is aligned.
26084
26085 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
26086
26087 * predict.c (determine_unlikely_bbs): Handle correctly BBs
26088 which appears in the queue multiple times.
26089
26090 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26091 Alan Hayward <alan.hayward@arm.com>
26092 David Sherwood <david.sherwood@arm.com>
26093
26094 * tree-vectorizer.h (vec_lower_bound): New structure.
26095 (_loop_vec_info): Add check_nonzero and lower_bounds.
26096 (LOOP_VINFO_CHECK_NONZERO): New macro.
26097 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
26098 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
26099 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
26100 fields. Make seg_len the distance travelled, not including the
26101 access size.
26102 (dr_direction_indicator): Declare.
26103 (dr_zero_step_indicator): Likewise.
26104 (dr_known_forward_stride_p): Likewise.
26105 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
26106 tree-ssanames.h.
26107 (runtime_alias_check_p): Allow runtime alias checks with
26108 variable strides.
26109 (operator ==): Compare access_size and align.
26110 (prune_runtime_alias_test_list): Rework for new distinction between
26111 the access_size and seg_len.
26112 (create_intersect_range_checks_index): Likewise. Cope with polynomial
26113 segment lengths.
26114 (get_segment_min_max): New function.
26115 (create_intersect_range_checks): Use it.
26116 (dr_step_indicator): New function.
26117 (dr_direction_indicator): Likewise.
26118 (dr_zero_step_indicator): Likewise.
26119 (dr_known_forward_stride_p): Likewise.
26120 * tree-loop-distribution.c (data_ref_segment_size): Return
26121 DR_STEP * (niters - 1).
26122 (compute_alias_check_pairs): Update call to the dr_with_seg_len
26123 constructor.
26124 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
26125 (vect_preserves_scalar_order_p): New function, split out from...
26126 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
26127 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
26128 (vect_vfa_access_size): New function.
26129 (vect_vfa_align): Likewise.
26130 (vect_compile_time_alias): Take access_size_a and access_b arguments.
26131 (dump_lower_bound): New function.
26132 (vect_check_lower_bound): Likewise.
26133 (vect_small_gap_p): Likewise.
26134 (vectorizable_with_step_bound_p): Likewise.
26135 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
26136 depencies if the vectorization factor is 1. Convert the checks
26137 for nonzero steps into checks on the bounds of DR_STEP. Try using
26138 a bunds check for variable steps if the minimum required step is
26139 relatively small. Update calls to the dr_with_seg_len
26140 constructor and to vect_compile_time_alias.
26141 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
26142 function.
26143 (vect_loop_versioning): Call it.
26144 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
26145 when retrying.
26146 (vect_estimate_min_profitable_iters): Account for any bounds checks.
26147
26148 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26149 Alan Hayward <alan.hayward@arm.com>
26150 David Sherwood <david.sherwood@arm.com>
26151
26152 * doc/sourcebuild.texi (vect_scatter_store): Document.
26153 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
26154 optabs.
26155 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
26156 Document.
26157 * genopinit.c (main): Add supports_vec_scatter_store and
26158 supports_vec_scatter_store_cached to target_optabs.
26159 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
26160 IFN_MASK_SCATTER_STORE.
26161 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
26162 functions.
26163 * internal-fn.h (internal_store_fn_p): Declare.
26164 (internal_fn_stored_value_index): Likewise.
26165 * internal-fn.c (scatter_store_direct): New macro.
26166 (expand_scatter_store_optab_fn): New function.
26167 (direct_scatter_store_optab_supported_p): New macro.
26168 (internal_store_fn_p): New function.
26169 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26170 IFN_MASK_SCATTER_STORE.
26171 (internal_fn_mask_index): Likewise.
26172 (internal_fn_stored_value_index): New function.
26173 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26174 for scatter stores.
26175 * optabs-query.h (supports_vec_scatter_store_p): Declare.
26176 * optabs-query.c (supports_vec_scatter_store_p): New function.
26177 * tree-vectorizer.h (vect_get_store_rhs): Declare.
26178 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26179 true for scatter stores.
26180 (vect_gather_scatter_fn_p): Handle scatter stores too.
26181 (vect_check_gather_scatter): Consider using scatter stores if
26182 supports_vec_scatter_store_p.
26183 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26184 scatter stores too.
26185 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26186 internal_fn_stored_value_index.
26187 (check_load_store_masking): Handle scatter stores too.
26188 (vect_get_store_rhs): Make public.
26189 (vectorizable_call): Use internal_store_fn_p.
26190 (vectorizable_store): Handle scatter store internal functions.
26191 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26192 when deciding whether the end of the group has been reached.
26193 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26194 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26195 (mask_scatter_store<mode>): New insns.
26196
26197 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26198 Alan Hayward <alan.hayward@arm.com>
26199 David Sherwood <david.sherwood@arm.com>
26200
26201 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26202 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26203 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26204 function.
26205 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26206 Use vect_truncate_gather_scatter_offset if we can't treat the
26207 operation as a normal gather load or scatter store.
26208 (get_group_load_store_type): Take the gather_scatter_info
26209 as argument. Try using a gather load or scatter store for
26210 single-element groups.
26211 (get_load_store_type): Update calls to get_group_load_store_type
26212 and vect_use_strided_gather_scatters_p.
26213
26214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26215 Alan Hayward <alan.hayward@arm.com>
26216 David Sherwood <david.sherwood@arm.com>
26217
26218 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26219 optional tree argument.
26220 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26221 null target hooks.
26222 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26223 but continue to use the current value as a fallback.
26224 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26225 to compare the updates.
26226 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26227 (get_load_store_type): Use it when handling a strided access.
26228 (vect_get_strided_load_store_ops): New function.
26229 (vect_get_data_ptr_increment): Likewise.
26230 (vectorizable_load): Handle strided gather loads. Always pass
26231 a step to vect_create_data_ref_ptr and bump_vector_ptr.
26232
26233 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26234 Alan Hayward <alan.hayward@arm.com>
26235 David Sherwood <david.sherwood@arm.com>
26236
26237 * doc/md.texi (gather_load@var{m}): Document.
26238 (mask_gather_load@var{m}): Likewise.
26239 * genopinit.c (main): Add supports_vec_gather_load and
26240 supports_vec_gather_load_cached to target_optabs.
26241 * optabs-tree.c (init_tree_optimization_optabs): Use
26242 ggc_cleared_alloc to allocate target_optabs.
26243 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26244 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26245 functions.
26246 * internal-fn.h (internal_load_fn_p): Declare.
26247 (internal_gather_scatter_fn_p): Likewise.
26248 (internal_fn_mask_index): Likewise.
26249 (internal_gather_scatter_fn_supported_p): Likewise.
26250 * internal-fn.c (gather_load_direct): New macro.
26251 (expand_gather_load_optab_fn): New function.
26252 (direct_gather_load_optab_supported_p): New macro.
26253 (direct_internal_fn_optab): New function.
26254 (internal_load_fn_p): Likewise.
26255 (internal_gather_scatter_fn_p): Likewise.
26256 (internal_fn_mask_index): Likewise.
26257 (internal_gather_scatter_fn_supported_p): Likewise.
26258 * optabs-query.c (supports_at_least_one_mode_p): New function.
26259 (supports_vec_gather_load_p): Likewise.
26260 * optabs-query.h (supports_vec_gather_load_p): Declare.
26261 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26262 and memory_type field.
26263 (NUM_PATTERNS): Bump to 15.
26264 * tree-vect-data-refs.c: Include internal-fn.h.
26265 (vect_gather_scatter_fn_p): New function.
26266 (vect_describe_gather_scatter_call): Likewise.
26267 (vect_check_gather_scatter): Try using internal functions for
26268 gather loads. Recognize existing calls to a gather load function.
26269 (vect_analyze_data_refs): Consider using gather loads if
26270 supports_vec_gather_load_p.
26271 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26272 (vect_get_gather_scatter_offset_type): Likewise.
26273 (vect_convert_mask_for_vectype): Likewise.
26274 (vect_add_conversion_to_patterm): Likewise.
26275 (vect_try_gather_scatter_pattern): Likewise.
26276 (vect_recog_gather_scatter_pattern): New pattern recognizer.
26277 (vect_vect_recog_func_ptrs): Add it.
26278 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26279 internal_fn_mask_index and internal_gather_scatter_fn_p.
26280 (check_load_store_masking): Take the gather_scatter_info as an
26281 argument and handle gather loads.
26282 (vect_get_gather_scatter_ops): New function.
26283 (vectorizable_call): Check internal_load_fn_p.
26284 (vectorizable_load): Likewise. Handle gather load internal
26285 functions.
26286 (vectorizable_store): Update call to check_load_store_masking.
26287 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26288 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26289 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26290 (aarch64_gather_scale_operand_d): New predicates.
26291 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26292 (mask_gather_load<mode>): New insns.
26293
26294 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26295 Alan Hayward <alan.hayward@arm.com>
26296 David Sherwood <david.sherwood@arm.com>
26297
26298 * optabs.def (fold_left_plus_optab): New optab.
26299 * doc/md.texi (fold_left_plus_@var{m}): Document.
26300 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26301 * internal-fn.c (fold_left_direct): Define.
26302 (expand_fold_left_optab_fn): Likewise.
26303 (direct_fold_left_optab_supported_p): Likewise.
26304 * fold-const-call.c (fold_const_fold_left): New function.
26305 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26306 * tree-parloops.c (valid_reduction_p): New function.
26307 (gather_scalar_reductions): Use it.
26308 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26309 (vect_finish_replace_stmt): Declare.
26310 * tree-vect-loop.c (fold_left_reduction_fn): New function.
26311 (needs_fold_left_reduction_p): New function, split out from...
26312 (vect_is_simple_reduction): ...here. Accept reductions that
26313 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26314 (vect_force_simple_reduction): Also store the reduction type in
26315 the assignment's STMT_VINFO_REDUC_TYPE.
26316 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26317 (merge_with_identity): New function.
26318 (vect_expand_fold_left): Likewise.
26319 (vectorize_fold_left_reduction): Likewise.
26320 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
26321 scalar phi in place for it. Check for target support and reject
26322 cases that would reassociate the operation. Defer the transform
26323 phase to vectorize_fold_left_reduction.
26324 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26325 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26326 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26327
26328 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26329
26330 * tree-if-conv.c (predicate_mem_writes): Remove redundant
26331 call to ifc_temp_var.
26332
26333 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26334 Alan Hayward <alan.hayward@arm.com>
26335 David Sherwood <david.sherwood@arm.com>
26336
26337 * target.def (legitimize_address_displacement): Take the original
26338 offset as a poly_int.
26339 * targhooks.h (default_legitimize_address_displacement): Update
26340 accordingly.
26341 * targhooks.c (default_legitimize_address_displacement): Likewise.
26342 * doc/tm.texi: Regenerate.
26343 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26344 as an argument, moving assert of ad->disp == ad->disp_term to...
26345 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
26346 Try calling targetm.legitimize_address_displacement before expanding
26347 the address rather than afterwards, and adjust for the new interface.
26348 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26349 Match the new hook interface. Handle SVE addresses.
26350 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26351 new hook interface.
26352
26353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26354
26355 * Makefile.in (OBJS): Add early-remat.o.
26356 * target.def (select_early_remat_modes): New hook.
26357 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26358 * doc/tm.texi: Regenerate.
26359 * targhooks.h (default_select_early_remat_modes): Declare.
26360 * targhooks.c (default_select_early_remat_modes): New function.
26361 * timevar.def (TV_EARLY_REMAT): New timevar.
26362 * passes.def (pass_early_remat): New pass.
26363 * tree-pass.h (make_pass_early_remat): Declare.
26364 * early-remat.c: New file.
26365 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26366 function.
26367 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
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 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26374 vfm1 with a bound_epilog parameter.
26375 (vect_do_peeling): Update calls accordingly, and move the prologue
26376 call earlier in the function. Treat the base bound_epilog as 0 for
26377 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26378 this base when peeling for gaps.
26379 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26380 with fully-masked loops.
26381 (vect_estimate_min_profitable_iters): Handle the single peeled
26382 iteration in that case.
26383
26384 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26385 Alan Hayward <alan.hayward@arm.com>
26386 David Sherwood <david.sherwood@arm.com>
26387
26388 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26389 single-element interleaving even if the size is not a power of 2.
26390 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26391 accesses for single-element interleaving if the group size is
26392 not a power of 2.
26393
26394 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26395 Alan Hayward <alan.hayward@arm.com>
26396 David Sherwood <david.sherwood@arm.com>
26397
26398 * doc/md.texi (fold_extract_last_@var{m}): Document.
26399 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26400 * optabs.def (fold_extract_last_optab): New optab.
26401 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26402 * internal-fn.c (fold_extract_direct): New macro.
26403 (expand_fold_extract_optab_fn): Likewise.
26404 (direct_fold_extract_optab_supported_p): Likewise.
26405 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26406 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26407 EXTRACT_LAST_REDUCTION.
26408 (get_initial_def_for_reduction): Do not create an initial vector
26409 for EXTRACT_LAST_REDUCTION reductions.
26410 (vectorizable_reduction): Leave the scalar phi in place for
26411 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26412 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26413 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26414 transform phase to vectorizable_condition.
26415 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26416 split out from...
26417 (vect_finish_stmt_generation): ...here.
26418 (vect_finish_replace_stmt): New function.
26419 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26420 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26421 pattern.
26422 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26423
26424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26425 Alan Hayward <alan.hayward@arm.com>
26426 David Sherwood <david.sherwood@arm.com>
26427
26428 * doc/md.texi (extract_last_@var{m}): Document.
26429 * optabs.def (extract_last_optab): New optab.
26430 * internal-fn.def (EXTRACT_LAST): New internal function.
26431 * internal-fn.c (cond_unary_direct): New macro.
26432 (expand_cond_unary_optab_fn): Likewise.
26433 (direct_cond_unary_optab_supported_p): Likewise.
26434 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26435 loops using EXTRACT_LAST.
26436 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26437 (extract_last_<mode>): ...this optab.
26438 (vec_extract<mode><Vel>): Update accordingly.
26439
26440 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26441 Alan Hayward <alan.hayward@arm.com>
26442 David Sherwood <david.sherwood@arm.com>
26443
26444 * target.def (empty_mask_is_expensive): New hook.
26445 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26446 * doc/tm.texi: Regenerate.
26447 * targhooks.h (default_empty_mask_is_expensive): Declare.
26448 * targhooks.c (default_empty_mask_is_expensive): New function.
26449 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26450 if the target says that empty masks are expensive.
26451 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26452 New function.
26453 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26454
26455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26456 Alan Hayward <alan.hayward@arm.com>
26457 David Sherwood <david.sherwood@arm.com>
26458
26459 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26460 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26461 (vect_use_loop_mask_for_alignment_p): New function.
26462 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26463 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26464 niters_skip argument. Make sure that the first niters_skip elements
26465 of the first iteration are inactive.
26466 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26467 Update call to vect_set_loop_masks_directly.
26468 (get_misalign_in_elems): New function, split out from...
26469 (vect_gen_prolog_loop_niters): ...here.
26470 (vect_update_init_of_dr): Take a code argument that specifies whether
26471 the adjustment should be added or subtracted.
26472 (vect_update_init_of_drs): Likewise.
26473 (vect_prepare_for_masked_peels): New function.
26474 (vect_do_peeling): Skip prologue peeling if we're using a mask
26475 instead. Update call to vect_update_inits_of_drs.
26476 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26477 mask_skip_niters.
26478 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26479 alignment. Do not include the number of peeled iterations in
26480 the minimum threshold in that case.
26481 (vectorizable_induction): Adjust the start value down by
26482 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26483 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26484 Take the number of skipped iterations into account when calculating
26485 the loop bounds.
26486 * tree-vect-stmts.c (vect_gen_while_not): New function.
26487
26488 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26489 Alan Hayward <alan.hayward@arm.com>
26490 David Sherwood <david.sherwood@arm.com>
26491
26492 * doc/sourcebuild.texi (vect_fully_masked): Document.
26493 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26494 default value to 0.
26495 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26496 split out from...
26497 (vect_analyze_loop_2): ...here. Don't check the vectorization
26498 factor against the number of loop iterations if the loop is
26499 fully-masked.
26500
26501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26502 Alan Hayward <alan.hayward@arm.com>
26503 David Sherwood <david.sherwood@arm.com>
26504
26505 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26506 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26507 (dump_groups): Update accordingly.
26508 (iv_use::mem_type): New member variable.
26509 (address_p): New function.
26510 (record_use): Add a mem_type argument and initialize the new
26511 mem_type field.
26512 (record_group_use): Add a mem_type argument. Use address_p.
26513 Remove obsolete null checks of base_object. Update call to record_use.
26514 (find_interesting_uses_op): Update call to record_group_use.
26515 (find_interesting_uses_cond): Likewise.
26516 (find_interesting_uses_address): Likewise.
26517 (get_mem_type_for_internal_fn): New function.
26518 (find_address_like_use): Likewise.
26519 (find_interesting_uses_stmt): Try find_address_like_use before
26520 calling find_interesting_uses_op.
26521 (addr_offset_valid_p): Use the iv mem_type field as the type
26522 of the addressed memory.
26523 (add_autoinc_candidates): Likewise.
26524 (get_address_cost): Likewise.
26525 (split_small_address_groups_p): Use address_p.
26526 (split_address_groups): Likewise.
26527 (add_iv_candidate_for_use): Likewise.
26528 (autoinc_possible_for_pair): Likewise.
26529 (rewrite_groups): Likewise.
26530 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26531 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26532 (get_alias_ptr_type_for_ptr_address): New function.
26533 (rewrite_use_address): Rewrite address uses in calls that were
26534 identified by find_address_like_use.
26535
26536 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26537 Alan Hayward <alan.hayward@arm.com>
26538 David Sherwood <david.sherwood@arm.com>
26539
26540 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26541 TARGET_MEM_REFs.
26542 * gimple-expr.h (is_gimple_addressable: Likewise.
26543 * gimple-expr.c (is_gimple_address): Likewise.
26544 * internal-fn.c (expand_call_mem_ref): New function.
26545 (expand_mask_load_optab_fn): Use it.
26546 (expand_mask_store_optab_fn): Likewise.
26547
26548 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26549 Alan Hayward <alan.hayward@arm.com>
26550 David Sherwood <david.sherwood@arm.com>
26551
26552 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26553 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26554 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26555 (cond_umax@var{mode}): Document.
26556 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26557 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26558 (cond_umin_optab, cond_umax_optab): New optabs.
26559 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26560 (COND_IOR, COND_XOR): New internal functions.
26561 * internal-fn.h (get_conditional_internal_fn): Declare.
26562 * internal-fn.c (cond_binary_direct): New macro.
26563 (expand_cond_binary_optab_fn): Likewise.
26564 (direct_cond_binary_optab_supported_p): Likewise.
26565 (get_conditional_internal_fn): New function.
26566 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26567 Cope with reduction statements that are vectorized as calls rather
26568 than assignments.
26569 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26570 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26571 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26572 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26573 (UNSPEC_COND_EOR): New unspecs.
26574 (optab): Add mappings for them.
26575 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26576 (sve_int_op, sve_fp_op): New int attributes.
26577
26578 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26579 Alan Hayward <alan.hayward@arm.com>
26580 David Sherwood <david.sherwood@arm.com>
26581
26582 * optabs.def (while_ult_optab): New optab.
26583 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26584 * internal-fn.def (WHILE_ULT): New internal function.
26585 * internal-fn.h (direct_internal_fn_supported_p): New override
26586 that takes two types as argument.
26587 * internal-fn.c (while_direct): New macro.
26588 (expand_while_optab_fn): New function.
26589 (convert_optab_supported_p): Likewise.
26590 (direct_while_optab_supported_p): New macro.
26591 * wide-int.h (wi::udiv_ceil): New function.
26592 * tree-vectorizer.h (rgroup_masks): New structure.
26593 (vec_loop_masks): New typedef.
26594 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26595 and fully_masked_p.
26596 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26597 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26598 (vect_max_vf): New function.
26599 (slpeel_make_loop_iterate_ntimes): Delete.
26600 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26601 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26602 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26603 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26604 internal-fn.h, stor-layout.h and optabs-query.h.
26605 (vect_set_loop_mask): New function.
26606 (add_preheader_seq): Likewise.
26607 (add_header_seq): Likewise.
26608 (interleave_supported_p): Likewise.
26609 (vect_maybe_permute_loop_masks): Likewise.
26610 (vect_set_loop_masks_directly): Likewise.
26611 (vect_set_loop_condition_masked): Likewise.
26612 (vect_set_loop_condition_unmasked): New function, split out from
26613 slpeel_make_loop_iterate_ntimes.
26614 (slpeel_make_loop_iterate_ntimes): Rename to..
26615 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26616 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26617 (vect_do_peeling): Update call accordingly.
26618 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26619 loops.
26620 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26621 mask_compare_type, can_fully_mask_p and fully_masked_p.
26622 (release_vec_loop_masks): New function.
26623 (_loop_vec_info): Use it to free the loop masks.
26624 (can_produce_all_loop_masks_p): New function.
26625 (vect_get_max_nscalars_per_iter): Likewise.
26626 (vect_verify_full_masking): Likewise.
26627 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26628 retries, and free the mask rgroups before retrying. Check loop-wide
26629 reasons for disallowing fully-masked loops. Make the final decision
26630 about whether use a fully-masked loop or not.
26631 (vect_estimate_min_profitable_iters): Do not assume that peeling
26632 for the number of iterations will be needed for fully-masked loops.
26633 (vectorizable_reduction): Disable fully-masked loops.
26634 (vectorizable_live_operation): Likewise.
26635 (vect_halve_mask_nunits): New function.
26636 (vect_double_mask_nunits): Likewise.
26637 (vect_record_loop_mask): Likewise.
26638 (vect_get_loop_mask): Likewise.
26639 (vect_transform_loop): Handle the case in which the final loop
26640 iteration might handle a partial vector. Call vect_set_loop_condition
26641 instead of slpeel_make_loop_iterate_ntimes.
26642 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26643 (check_load_store_masking): New function.
26644 (prepare_load_store_mask): Likewise.
26645 (vectorizable_store): Handle fully-masked loops.
26646 (vectorizable_load): Likewise.
26647 (supportable_widening_operation): Use vect_halve_mask_nunits for
26648 booleans.
26649 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26650 (vect_gen_while): New function.
26651 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26652 (aarch64_uqdec<mode>): New insn.
26653
26654 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26655 Alan Hayward <alan.hayward@arm.com>
26656 David Sherwood <david.sherwood@arm.com>
26657
26658 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26659 (reduc_xor_scal_optab): New optabs.
26660 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26661 (reduc_xor_scal_@var{m}): Document.
26662 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26663 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26664 internal functions.
26665 * fold-const-call.c (fold_const_call): Handle them.
26666 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26667 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26668 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26669 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26670 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26671 (UNSPEC_XORV): New unspecs.
26672 (optab): Add entries for them.
26673 (BITWISEV): New int iterator.
26674 (bit_reduc_op): New int attributes.
26675
26676 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26677 Alan Hayward <alan.hayward@arm.com>
26678 David Sherwood <david.sherwood@arm.com>
26679
26680 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26681 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26682 * optabs.def (vec_shl_insert_optab): New optab.
26683 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26684 (duplicate_and_interleave): Likewise.
26685 * tree-vect-loop.c: Include internal-fn.h.
26686 (neutral_op_for_slp_reduction): New function, split out from
26687 get_initial_defs_for_reduction.
26688 (get_initial_def_for_reduction): Handle option 2 for variable-length
26689 vectors by loading the neutral value into a vector and then shifting
26690 the initial value into element 0.
26691 (get_initial_defs_for_reduction): Replace the code argument with
26692 the neutral value calculated by neutral_op_for_slp_reduction.
26693 Use gimple_build_vector for constant-length vectors.
26694 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26695 but the first group_size elements have a neutral value.
26696 Use duplicate_and_interleave otherwise.
26697 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26698 Update call to get_initial_defs_for_reduction. Handle SLP
26699 reductions for variable-length vectors by creating one vector
26700 result for each scalar result, with the elements associated
26701 with other scalar results stubbed out with the neutral value.
26702 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26703 Require IFN_VEC_SHL_INSERT for double reductions on
26704 variable-length vectors, or SLP reductions that have
26705 a neutral value. Require can_duplicate_and_interleave_p
26706 support for variable-length unchained SLP reductions if there
26707 is no neutral value, such as for MIN/MAX reductions. Also require
26708 the number of vector elements to be a multiple of the number of
26709 SLP statements when doing variable-length unchained SLP reductions.
26710 Update call to vect_create_epilog_for_reduction.
26711 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26712 and remove initial values.
26713 (duplicate_and_interleave): Make public.
26714 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26715 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26716
26717 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26718 Alan Hayward <alan.hayward@arm.com>
26719 David Sherwood <david.sherwood@arm.com>
26720
26721 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26722 (can_duplicate_and_interleave_p): New function.
26723 (vect_get_and_check_slp_defs): Take the vector of statements
26724 rather than just the current one. Remove excess parentheses.
26725 Restriction rejectinon of vect_constant_def and vect_external_def
26726 for variable-length vectors to boolean types, or types for which
26727 can_duplicate_and_interleave_p is false.
26728 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26729 (duplicate_and_interleave): New function.
26730 (vect_get_constant_vectors): Use gimple_build_vector for
26731 constant-length vectors and suitable variable-length constant
26732 vectors. Use duplicate_and_interleave for other variable-length
26733 vectors. Don't defer the update when inserting new statements.
26734
26735 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26736 Alan Hayward <alan.hayward@arm.com>
26737 David Sherwood <david.sherwood@arm.com>
26738
26739 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26740 min_profitable_iters doesn't go negative.
26741
26742 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26743 Alan Hayward <alan.hayward@arm.com>
26744 David Sherwood <david.sherwood@arm.com>
26745
26746 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26747 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26748 * optabs.def (vec_mask_load_lanes_optab): New optab.
26749 (vec_mask_store_lanes_optab): Likewise.
26750 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26751 (MASK_STORE_LANES): Likewise.
26752 * internal-fn.c (mask_load_lanes_direct): New macro.
26753 (mask_store_lanes_direct): Likewise.
26754 (expand_mask_load_optab_fn): Handle masked operations.
26755 (expand_mask_load_lanes_optab_fn): New macro.
26756 (expand_mask_store_optab_fn): Handle masked operations.
26757 (expand_mask_store_lanes_optab_fn): New macro.
26758 (direct_mask_load_lanes_optab_supported_p): Likewise.
26759 (direct_mask_store_lanes_optab_supported_p): Likewise.
26760 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26761 parameter.
26762 (vect_load_lanes_supported): Likewise.
26763 * tree-vect-data-refs.c (strip_conversion): New function.
26764 (can_group_stmts_p): Likewise.
26765 (vect_analyze_data_ref_accesses): Use it instead of checking
26766 for a pair of assignments.
26767 (vect_store_lanes_supported): Take a masked_p parameter.
26768 (vect_load_lanes_supported): Likewise.
26769 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26770 vect_store_lanes_supported and vect_load_lanes_supported.
26771 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26772 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26773 parameter. Don't allow gaps for masked accesses.
26774 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26775 and vect_load_lanes_supported.
26776 (get_load_store_type): Take a masked_p parameter and update
26777 call to get_group_load_store_type.
26778 (vectorizable_store): Update call to get_load_store_type.
26779 Handle IFN_MASK_STORE_LANES.
26780 (vectorizable_load): Update call to get_load_store_type.
26781 Handle IFN_MASK_LOAD_LANES.
26782
26783 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26784 Alan Hayward <alan.hayward@arm.com>
26785 David Sherwood <david.sherwood@arm.com>
26786
26787 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26788 modes for SVE.
26789 * config/aarch64/aarch64-protos.h
26790 (aarch64_sve_struct_memory_operand_p): Declare.
26791 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26792 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26793 (VPRED, vpred): Handle SVE structure modes.
26794 * config/aarch64/constraints.md (Utx): New constraint.
26795 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26796 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26797 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26798 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26799 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26800 structure modes. Split into pieces after RA.
26801 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26802 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26803 New patterns.
26804 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26805 SVE structure modes.
26806 (aarch64_classify_address): Likewise.
26807 (sizetochar): Move earlier in file.
26808 (aarch64_print_operand): Handle SVE register lists.
26809 (aarch64_array_mode): New function.
26810 (aarch64_sve_struct_memory_operand_p): Likewise.
26811 (TARGET_ARRAY_MODE): Redefine.
26812
26813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26814 Alan Hayward <alan.hayward@arm.com>
26815 David Sherwood <david.sherwood@arm.com>
26816
26817 * target.def (array_mode): New target hook.
26818 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26819 * doc/tm.texi: Regenerate.
26820 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26821 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26822 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26823 targetm.array_mode.
26824 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26825 type sizes.
26826
26827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26828 Alan Hayward <alan.hayward@arm.com>
26829 David Sherwood <david.sherwood@arm.com>
26830
26831 * fold-const.c (fold_binary_loc): Check the argument types
26832 rather than the result type when testing for a vector operation.
26833
26834 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26835
26836 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26837 * doc/tm.texi: Regenerate.
26838
26839 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26840 Alan Hayward <alan.hayward@arm.com>
26841 David Sherwood <david.sherwood@arm.com>
26842
26843 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26844 (sve): Document new AArch64 extension.
26845 * doc/md.texi (w): Extend the description of the AArch64
26846 constraint to include SVE vectors.
26847 (Upl, Upa): Document new AArch64 predicate constraints.
26848 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26849 enum.
26850 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26851 (msve-vector-bits=): New option.
26852 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26853 SVE when these are disabled.
26854 (sve): New extension.
26855 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26856 modes. Adjust their number of units based on aarch64_sve_vg.
26857 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26858 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26859 aarch64_addr_query_type.
26860 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26861 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26862 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26863 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26864 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26865 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26866 (aarch64_simd_imm_zero_p): Delete.
26867 (aarch64_check_zero_based_sve_index_immediate): Declare.
26868 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26869 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26870 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26871 (aarch64_sve_float_mul_immediate_p): Likewise.
26872 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26873 rather than an rtx.
26874 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26875 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26876 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26877 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26878 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26879 (aarch64_regmode_natural_size): Likewise.
26880 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26881 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26882 left one place.
26883 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26884 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26885 for VG and the SVE predicate registers.
26886 (V_ALIASES): Add a "z"-prefixed alias.
26887 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26888 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26889 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26890 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26891 (REG_CLASS_NAMES): Add entries for them.
26892 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26893 and the predicate registers.
26894 (aarch64_sve_vg): Declare.
26895 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26896 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26897 (REGMODE_NATURAL_SIZE): Define.
26898 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26899 SVE macros.
26900 * config/aarch64/aarch64.c: Include cfgrtl.h.
26901 (simd_immediate_info): Add a constructor for series vectors,
26902 and an associated step field.
26903 (aarch64_sve_vg): New variable.
26904 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26905 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26906 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26907 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26908 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26909 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26910 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26911 (aarch64_get_mask_mode): New functions.
26912 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26913 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26914 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26915 predicate modes and predicate registers. Explicitly restrict
26916 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26917 to store a vector mode if it is recognized by
26918 aarch64_classify_vector_mode.
26919 (aarch64_regmode_natural_size): New function.
26920 (aarch64_hard_regno_caller_save_mode): Return the original mode
26921 for predicates.
26922 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26923 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26924 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26925 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26926 functions.
26927 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26928 does not overlap dest if the function is frame-related. Handle
26929 SVE constants.
26930 (aarch64_split_add_offset): New function.
26931 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26932 them aarch64_add_offset.
26933 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26934 and update call to aarch64_sub_sp.
26935 (aarch64_add_cfa_expression): New function.
26936 (aarch64_expand_prologue): Pass extra temporary registers to the
26937 functions above. Handle the case in which we need to emit new
26938 DW_CFA_expressions for registers that were originally saved
26939 relative to the stack pointer, but now have to be expressed
26940 relative to the frame pointer.
26941 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26942 functions above.
26943 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26944 IP0 and IP1 values for SVE frames.
26945 (aarch64_expand_vec_series): New function.
26946 (aarch64_expand_sve_widened_duplicate): Likewise.
26947 (aarch64_expand_sve_const_vector): Likewise.
26948 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26949 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26950 into the register, rather than emitting a SET directly.
26951 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26952 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26953 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26954 (offset_9bit_signed_scaled_p): New functions.
26955 (aarch64_replicate_bitmask_imm): New function.
26956 (aarch64_bitmask_imm): Use it.
26957 (aarch64_cannot_force_const_mem): Reject expressions involving
26958 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26959 (aarch64_classify_index): Handle SVE indices, by requiring
26960 a plain register index with a scale that matches the element size.
26961 (aarch64_classify_address): Handle SVE addresses. Assert that
26962 the mode of the address is VOIDmode or an integer mode.
26963 Update call to aarch64_classify_symbol.
26964 (aarch64_classify_symbolic_expression): Update call to
26965 aarch64_classify_symbol.
26966 (aarch64_const_vec_all_in_range_p): New function.
26967 (aarch64_print_vector_float_operand): Likewise.
26968 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26969 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26970 and the FP immediates 1.0 and 0.5.
26971 (aarch64_print_address_internal): Handle SVE addresses.
26972 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26973 (aarch64_regno_regclass): Handle predicate registers.
26974 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26975 data modes.
26976 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26977 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26978 (aarch64_convert_sve_vector_bits): New function.
26979 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26980 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26981 rather than an rtx.
26982 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26983 Handle SVE vector and predicate modes. Accept VL-based constants
26984 that need only one temporary register, and VL offsets that require
26985 no temporary registers.
26986 (aarch64_conditional_register_usage): Mark the predicate registers
26987 as fixed if SVE isn't available.
26988 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26989 Return true for SVE vector and predicate modes.
26990 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26991 rather than an unsigned int. Handle SVE modes.
26992 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26993 SVE modes.
26994 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26995 if SVE is enabled.
26996 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26997 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26998 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26999 (aarch64_sve_float_mul_immediate_p): New functions.
27000 (aarch64_sve_valid_immediate): New function.
27001 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
27002 Explicitly reject structure modes. Check for INDEX constants.
27003 Handle PTRUE and PFALSE constants.
27004 (aarch64_check_zero_based_sve_index_immediate): New function.
27005 (aarch64_simd_imm_zero_p): Delete.
27006 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
27007 vector modes. Accept constants in the range of CNT[BHWD].
27008 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
27009 ask for an Advanced SIMD mode.
27010 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
27011 (aarch64_simd_vector_alignment): Handle SVE predicates.
27012 (aarch64_vectorize_preferred_vector_alignment): New function.
27013 (aarch64_simd_vector_alignment_reachable): Use it instead of
27014 the vector size.
27015 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
27016 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
27017 functions.
27018 (MAX_VECT_LEN): Delete.
27019 (expand_vec_perm_d): Add a vec_flags field.
27020 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
27021 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
27022 (aarch64_evpc_ext): Don't apply a big-endian lane correction
27023 for SVE modes.
27024 (aarch64_evpc_rev): Rename to...
27025 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
27026 (aarch64_evpc_rev_global): New function.
27027 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
27028 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
27029 MAX_VECT_LEN.
27030 (aarch64_evpc_sve_tbl): New function.
27031 (aarch64_expand_vec_perm_const_1): Update after rename of
27032 aarch64_evpc_rev. Handle SVE permutes too, trying
27033 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
27034 than aarch64_evpc_tbl.
27035 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
27036 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
27037 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
27038 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
27039 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
27040 (aarch64_expand_sve_vcond): New functions.
27041 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
27042 of aarch64_vector_mode_p.
27043 (aarch64_dwarf_poly_indeterminate_value): New function.
27044 (aarch64_compute_pressure_classes): Likewise.
27045 (aarch64_can_change_mode_class): Likewise.
27046 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
27047 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
27048 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
27049 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
27050 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
27051 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
27052 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
27053 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
27054 constraints.
27055 (Dn, Dl, Dr): Accept const as well as const_vector.
27056 (Dz): Likewise. Compare against CONST0_RTX.
27057 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
27058 of "vector" where appropriate.
27059 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
27060 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
27061 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
27062 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
27063 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
27064 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
27065 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
27066 (v_int_equiv): Extend to SVE modes.
27067 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
27068 mode attributes.
27069 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
27070 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
27071 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
27072 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
27073 (SVE_COND_FP_CMP): New int iterators.
27074 (perm_hilo): Handle the new unpack unspecs.
27075 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
27076 attributes.
27077 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
27078 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
27079 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
27080 (aarch64_equality_operator, aarch64_constant_vector_operand)
27081 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
27082 (aarch64_sve_nonimmediate_operand): Likewise.
27083 (aarch64_sve_general_operand): Likewise.
27084 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
27085 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
27086 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
27087 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
27088 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
27089 (aarch64_sve_float_arith_immediate): Likewise.
27090 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
27091 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
27092 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
27093 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
27094 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
27095 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
27096 (aarch64_sve_float_arith_operand): Likewise.
27097 (aarch64_sve_float_arith_with_sub_operand): Likewise.
27098 (aarch64_sve_float_mul_operand): Likewise.
27099 (aarch64_sve_vec_perm_operand): Likewise.
27100 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
27101 (aarch64_mov_operand): Accept const_poly_int and const_vector.
27102 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
27103 as well as const_vector.
27104 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
27105 in file. Use CONST0_RTX and CONSTM1_RTX.
27106 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
27107 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
27108 Use aarch64_simd_imm_zero.
27109 * config/aarch64/aarch64-sve.md: New file.
27110 * config/aarch64/aarch64.md: Include it.
27111 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
27112 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
27113 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
27114 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
27115 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
27116 (sve): New attribute.
27117 (enabled): Disable instructions with the sve attribute unless
27118 TARGET_SVE.
27119 (movqi, movhi): Pass CONST_POLY_INT operaneds through
27120 aarch64_expand_mov_immediate.
27121 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
27122 CNT[BHSD] immediates.
27123 (movti): Split CONST_POLY_INT moves into two halves.
27124 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
27125 Split additions that need a temporary here if the destination
27126 is the stack pointer.
27127 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
27128 (*add<mode>3_poly_1): New instruction.
27129 (set_clobber_cc): New expander.
27130
27131 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27132
27133 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
27134 parameter and use it instead of GET_MODE_SIZE (innermode). Use
27135 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
27136 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
27137 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
27138 Change innermode from fixed_mode_size to machine_mode.
27139 (simplify_subreg): Update call accordingly. Handle a constant-sized
27140 subreg of a variable-length CONST_VECTOR.
27141
27142 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27143 Alan Hayward <alan.hayward@arm.com>
27144 David Sherwood <david.sherwood@arm.com>
27145
27146 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
27147 (add_offset_to_base): New function, split out from...
27148 (create_mem_ref): ...here. When handling a scale other than 1,
27149 check first whether the address is valid without the offset.
27150 Add it into the base if so, leaving the index and scale as-is.
27151
27152 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27153
27154 PR c++/83778
27155 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
27156 fold_for_warn before checking if arg2 is INTEGER_CST.
27157
27158 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
27159
27160 * config/rs6000/predicates.md (load_multiple_operation): Delete.
27161 (store_multiple_operation): Delete.
27162 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
27163 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
27164 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
27165 guarded by TARGET_STRING.
27166 (rs6000_output_load_multiple): Delete.
27167 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27168 OPTION_MASK_STRING / TARGET_STRING handling.
27169 (print_operand) <'N', 'O'>: Add comment that these are unused now.
27170 (const rs6000_opt_masks) <"string">: Change mask to 0.
27171 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27172 (MASK_STRING): Delete.
27173 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27174 parts. Simplify.
27175 (load_multiple): Delete.
27176 (*ldmsi8): Delete.
27177 (*ldmsi7): Delete.
27178 (*ldmsi6): Delete.
27179 (*ldmsi5): Delete.
27180 (*ldmsi4): Delete.
27181 (*ldmsi3): Delete.
27182 (store_multiple): Delete.
27183 (*stmsi8): Delete.
27184 (*stmsi7): Delete.
27185 (*stmsi6): Delete.
27186 (*stmsi5): Delete.
27187 (*stmsi4): Delete.
27188 (*stmsi3): Delete.
27189 (movmemsi_8reg): Delete.
27190 (corresponding unnamed define_insn): Delete.
27191 (movmemsi_6reg): Delete.
27192 (corresponding unnamed define_insn): Delete.
27193 (movmemsi_4reg): Delete.
27194 (corresponding unnamed define_insn): Delete.
27195 (movmemsi_2reg): Delete.
27196 (corresponding unnamed define_insn): Delete.
27197 (movmemsi_1reg): Delete.
27198 (corresponding unnamed define_insn): Delete.
27199 * config/rs6000/rs6000.opt (mno-string): New.
27200 (mstring): Replace by deprecation warning stub.
27201 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27202
27203 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27204
27205 * regrename.c (regrename_do_replace): If replacing the same
27206 reg multiple times, try to reuse last created gen_raw_REG.
27207
27208 PR debug/81155
27209 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27210 main to workaround a bug in GDB.
27211
27212 2018-01-12 Tom de Vries <tom@codesourcery.com>
27213
27214 PR target/83737
27215 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27216
27217 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
27218
27219 PR rtl-optimization/80481
27220 * ira-color.c (get_cap_member): New function.
27221 (allocnos_conflict_by_live_ranges_p): Use it.
27222 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27223 (setup_slot_coalesced_allocno_live_ranges): Ditto.
27224
27225 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
27226
27227 PR target/83628
27228 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27229 (*saddl_se_1): Ditto.
27230 (*ssubsi_1): Ditto.
27231 (*ssubl_se_1): Ditto.
27232
27233 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27234
27235 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27236 rather than wi::to_widest for DR_INITs.
27237 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27238 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27239 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27240 INTEGER_CSTs.
27241 (vect_analyze_group_access_1): Note that here.
27242
27243 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27244
27245 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27246 polynomial type sizes.
27247
27248 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27249
27250 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27251 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27252 (gimple_add_tmp_var): Likewise.
27253
27254 2018-01-12 Martin Liska <mliska@suse.cz>
27255
27256 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27257 (gimple_alloc_sizes): Likewise.
27258 (dump_gimple_statistics): Use PRIu64 in printf format.
27259 * gimple.h: Change uint64_t to int.
27260
27261 2018-01-12 Martin Liska <mliska@suse.cz>
27262
27263 * tree-core.h: Use uint64_t instead of int.
27264 * tree.c (tree_node_counts): Likewise.
27265 (tree_node_sizes): Likewise.
27266 (dump_tree_statistics): Use PRIu64 in printf format.
27267
27268 2018-01-12 Martin Liska <mliska@suse.cz>
27269
27270 * Makefile.in: As qsort_chk is implemented in vec.c, add
27271 vec.o to linkage of gencfn-macros.
27272 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27273 passing the info to record_node_allocation_statistics.
27274 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27275 and pass the info.
27276 * ggc-common.c (struct ggc_usage): Add operator== and use
27277 it in operator< and compare function.
27278 * mem-stats.h (struct mem_usage): Likewise.
27279 * vec.c (struct vec_usage): Remove operator< and compare
27280 function. Can be simply inherited.
27281
27282 2018-01-12 Martin Jambor <mjambor@suse.cz>
27283
27284 PR target/81616
27285 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27286 * tree-ssa-math-opts.c: Include domwalk.h.
27287 (convert_mult_to_fma_1): New function.
27288 (fma_transformation_info): New type.
27289 (fma_deferring_state): Likewise.
27290 (cancel_fma_deferring): New function.
27291 (result_of_phi): Likewise.
27292 (last_fma_candidate_feeds_initial_phi): Likewise.
27293 (convert_mult_to_fma): Added deferring logic, split actual
27294 transformation to convert_mult_to_fma_1.
27295 (math_opts_dom_walker): New type.
27296 (math_opts_dom_walker::after_dom_children): New method, body moved
27297 here from pass_optimize_widening_mul::execute, added deferring logic
27298 bits.
27299 (pass_optimize_widening_mul::execute): Moved most of code to
27300 math_opts_dom_walker::after_dom_children.
27301 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27302 * config/i386/i386.c (ix86_option_override_internal): Added
27303 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27304
27305 2018-01-12 Richard Biener <rguenther@suse.de>
27306
27307 PR debug/83157
27308 * dwarf2out.c (gen_variable_die): Do not reset old_die for
27309 inline instance vars.
27310
27311 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
27312
27313 PR target/81819
27314 * config/rx/rx.c (rx_is_restricted_memory_address):
27315 Handle SUBREG case.
27316
27317 2018-01-12 Richard Biener <rguenther@suse.de>
27318
27319 PR tree-optimization/80846
27320 * target.def (split_reduction): New target hook.
27321 * targhooks.c (default_split_reduction): New function.
27322 * targhooks.h (default_split_reduction): Declare.
27323 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27324 target requests first reduce vectors by combining low and high
27325 parts.
27326 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27327 (get_vectype_for_scalar_type_and_size): Export.
27328 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27329 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27330 * doc/tm.texi: Regenerate.
27331 * config/i386/i386.c (ix86_split_reduction): Implement
27332 TARGET_VECTORIZE_SPLIT_REDUCTION.
27333
27334 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27335
27336 PR target/83368
27337 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27338 in PIC mode except for TARGET_VXWORKS_RTP.
27339 * config/sparc/sparc.c: Include cfgrtl.h.
27340 (TARGET_INIT_PIC_REG): Define.
27341 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27342 (sparc_pic_register_p): New predicate.
27343 (sparc_legitimate_address_p): Use it.
27344 (sparc_legitimize_pic_address): Likewise.
27345 (sparc_delegitimize_address): Likewise.
27346 (sparc_mode_dependent_address_p): Likewise.
27347 (gen_load_pcrel_sym): Remove 4th parameter.
27348 (load_got_register): Adjust call to above. Remove obsolete stuff.
27349 (sparc_expand_prologue): Do not call load_got_register here.
27350 (sparc_flat_expand_prologue): Likewise.
27351 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27352 (sparc_use_pseudo_pic_reg): New function.
27353 (sparc_init_pic_reg): Likewise.
27354 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27355 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27356
27357 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
27358
27359 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27360 Add item for branch_cost.
27361
27362 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27363
27364 PR rtl-optimization/83565
27365 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27366 not extend the result to a larger mode for rotate operations.
27367 (num_sign_bit_copies1): Likewise.
27368
27369 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27370
27371 PR target/40411
27372 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27373 -symbolic.
27374 Use values-Xc.o for -pedantic.
27375 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27376
27377 2018-01-12 Martin Liska <mliska@suse.cz>
27378
27379 PR ipa/83054
27380 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27381 New function.
27382 (possible_polymorphic_call_targets): Use it.
27383 (ipa_devirt): Likewise.
27384
27385 2018-01-12 Martin Liska <mliska@suse.cz>
27386
27387 * profile-count.h (enum profile_quality): Use 0 as invalid
27388 enum value of profile_quality.
27389
27390 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27391
27392 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27393 -mext-string options.
27394
27395 2018-01-12 Richard Biener <rguenther@suse.de>
27396
27397 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27398 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27399 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27400 Likewise.
27401 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27402
27403 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27404
27405 * configure.ac (--with-long-double-format): Add support for the
27406 configuration option to change the default long double format on
27407 PowerPC systems.
27408 * config.gcc (powerpc*-linux*-*): Likewise.
27409 * configure: Regenerate.
27410 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27411 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27412 used without modification.
27413
27414 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27415
27416 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27417 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27418 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27419 MISC_BUILTIN_SPEC_BARRIER.
27420 (rs6000_init_builtins): Likewise.
27421 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27422 enum value.
27423 (speculation_barrier): New define_insn.
27424 * doc/extend.texi: Document __builtin_speculation_barrier.
27425
27426 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27427
27428 PR target/83203
27429 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27430 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27431 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27432 iterators.
27433 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27434 integral modes instead of "ss" and "sd".
27435 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27436 vectors with 32-bit and 64-bit elements.
27437 (vecdupssescalarmodesuffix): New mode attribute.
27438 (vec_dup<mode>): Use it.
27439
27440 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27441
27442 PR target/83330
27443 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27444 frame if argument is passed on stack.
27445
27446 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27447
27448 PR target/82682
27449 * ree.c (combine_reaching_defs): Optimize also
27450 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27451 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27452
27453 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27454
27455 PR middle-end/83189
27456 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27457
27458 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27459
27460 PR middle-end/83718
27461 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27462 after they are computed.
27463
27464 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27465
27466 PR tree-optimization/83695
27467 * gimple-loop-linterchange.cc
27468 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27469 reset cached scev information after interchange.
27470 (pass_linterchange::execute): Remove call to scev_reset_htab.
27471
27472 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27473
27474 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27475 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27476 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27477 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27478 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27479 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27480 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27481 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27482 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27483 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27484 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27485 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27486 (V_lane_reg): Likewise.
27487 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27488 New define_expand.
27489 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27490 (vfmal_lane_low<mode>_intrinsic,
27491 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27492 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27493 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27494 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27495 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27496 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27497
27498 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27499
27500 * config/arm/arm-cpus.in (fp16fml): New feature.
27501 (ALL_SIMD): Add fp16fml.
27502 (armv8.2-a): Add fp16fml as an option.
27503 (armv8.3-a): Likewise.
27504 (armv8.4-a): Add fp16fml as part of fp16.
27505 * config/arm/arm.h (TARGET_FP16FML): Define.
27506 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27507 when appropriate.
27508 * config/arm/arm-modes.def (V2HF): Define.
27509 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27510 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27511 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27512 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27513 vfmsl_low, vfmsl_high): New set of builtins.
27514 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27515 (vfml_op): New code attribute.
27516 (VFMLHALVES): New int iterator.
27517 (VFML, VFMLSEL): New mode attributes.
27518 (V_reg): Define mapping for V2HF.
27519 (V_hi, V_lo): New mode attributes.
27520 (VF_constraint): Likewise.
27521 (vfml_half, vfml_half_selector): New int attributes.
27522 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27523 define_expand.
27524 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27525 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27526 New define_insn.
27527 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27528 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27529 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27530 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27531 documentation.
27532 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27533 Document new effective target and option set.
27534
27535 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27536
27537 * config/arm/arm-cpus.in (armv8_4): New feature.
27538 (ARMv8_4a): New fgroup.
27539 (armv8.4-a): New arch.
27540 * config/arm/arm-tables.opt: Regenerate.
27541 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27542 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27543 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27544 Add matching rules for -march=armv8.4-a and extensions.
27545 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27546
27547 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27548
27549 PR target/81821
27550 * config/rx/rx.md (BW): New mode attribute.
27551 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27552
27553 2018-01-11 Richard Biener <rguenther@suse.de>
27554
27555 PR tree-optimization/83435
27556 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27557 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27558 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27559
27560 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27561 Alan Hayward <alan.hayward@arm.com>
27562 David Sherwood <david.sherwood@arm.com>
27563
27564 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27565 field.
27566 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27567 (aarch64_print_address_internal): Use it to check for a zero offset.
27568
27569 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27570 Alan Hayward <alan.hayward@arm.com>
27571 David Sherwood <david.sherwood@arm.com>
27572
27573 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27574 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27575 Return a poly_int64 rather than a HOST_WIDE_INT.
27576 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27577 rather than a HOST_WIDE_INT.
27578 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27579 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27580 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27581 final_offset from HOST_WIDE_INT to poly_int64.
27582 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27583 to_constant when getting the number of units in an Advanced SIMD
27584 mode.
27585 (aarch64_builtin_vectorized_function): Check for a constant number
27586 of units.
27587 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27588 GET_MODE_SIZE.
27589 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27590 attribute instead of GET_MODE_NUNITS.
27591 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27592 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27593 GET_MODE_SIZE for fixed-size registers.
27594 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27595 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27596 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27597 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27598 (aarch64_print_operand, aarch64_print_address_internal)
27599 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27600 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27601 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27602 Handle polynomial GET_MODE_SIZE.
27603 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27604 wider than SImode without modification.
27605 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27606 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27607 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27608 passing and returning SVE modes.
27609 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27610 rather than GEN_INT.
27611 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27612 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27613 (aarch64_allocate_and_probe_stack_space): Likewise.
27614 (aarch64_layout_frame): Cope with polynomial offsets.
27615 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27616 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27617 polynomial offsets.
27618 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27619 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27620 poly_int64 rather than a HOST_WIDE_INT.
27621 (aarch64_get_separate_components, aarch64_process_components)
27622 (aarch64_expand_prologue, aarch64_expand_epilogue)
27623 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27624 (aarch64_anchor_offset): New function, split out from...
27625 (aarch64_legitimize_address): ...here.
27626 (aarch64_builtin_vectorization_cost): Handle polynomial
27627 TYPE_VECTOR_SUBPARTS.
27628 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27629 GET_MODE_NUNITS.
27630 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27631 number of elements from the PARALLEL rather than the mode.
27632 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27633 rather than GET_MODE_BITSIZE.
27634 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27635 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27636 (aarch64_expand_vec_perm_const_1): Handle polynomial
27637 d->perm.length () and d->perm elements.
27638 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27639 Apply to_constant to d->perm elements.
27640 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27641 polynomial CONST_VECTOR_NUNITS.
27642 (aarch64_move_pointer): Take amount as a poly_int64 rather
27643 than an int.
27644 (aarch64_progress_pointer): Avoid temporary variable.
27645 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27646 the mode attribute instead of GET_MODE.
27647
27648 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27649 Alan Hayward <alan.hayward@arm.com>
27650 David Sherwood <david.sherwood@arm.com>
27651
27652 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27653 x exists before using it.
27654 (aarch64_add_constant_internal): Rename to...
27655 (aarch64_add_offset_1): ...this. Replace regnum with separate
27656 src and dest rtxes. Handle the case in which they're different,
27657 including when the offset is zero. Replace scratchreg with an rtx.
27658 Use 2 additions if there is no spare register into which we can
27659 move a 16-bit constant.
27660 (aarch64_add_constant): Delete.
27661 (aarch64_add_offset): Replace reg with separate src and dest
27662 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27663 Use aarch64_add_offset_1.
27664 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27665 an rtx rather than an int. Take the delta as a poly_int64
27666 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27667 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27668 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27669 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27670 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27671 and aarch64_add_sp.
27672 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27673 aarch64_add_constant.
27674
27675 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27676
27677 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27678 Use scalar_float_mode.
27679
27680 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27681
27682 * config/aarch64/aarch64-simd.md
27683 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27684 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27685 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27686 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27687 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27688 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27689 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27690 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27691 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27692 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27693
27694 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27695
27696 PR target/83514
27697 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27698 targ_options->x_arm_arch_string is non NULL.
27699
27700 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27701
27702 * config/aarch64/aarch64.h
27703 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27704
27705 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27706
27707 PR target/82096
27708 * expmed.c (emit_store_flag_force): Swap if const op0
27709 and change VOIDmode to mode of op0.
27710
27711 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27712
27713 PR rtl-optimization/83761
27714 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27715 than bytes to mode_for_size.
27716
27717 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27718
27719 PR middle-end/83189
27720 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27721 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27722 profile.
27723
27724 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27725
27726 PR middle-end/83575
27727 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27728 when in layout mode.
27729 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27730 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27731 partition fixup.
27732
27733 2018-01-10 Michael Collison <michael.collison@arm.com>
27734
27735 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27736 * config/aarch64/aarch64-option-extension.def: Add
27737 AARCH64_OPT_EXTENSION of 'fp16fml'.
27738 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27739 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27740 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27741 * config/aarch64/constraints.md (Ui7): New constraint.
27742 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27743 (VFMLA_SEL_W): Ditto.
27744 (f16quad): Ditto.
27745 (f16mac1): Ditto.
27746 (VFMLA16_LOW): New int iterator.
27747 (VFMLA16_HIGH): Ditto.
27748 (UNSPEC_FMLAL): New unspec.
27749 (UNSPEC_FMLSL): Ditto.
27750 (UNSPEC_FMLAL2): Ditto.
27751 (UNSPEC_FMLSL2): Ditto.
27752 (f16mac): New code attribute.
27753 * config/aarch64/aarch64-simd-builtins.def
27754 (aarch64_fmlal_lowv2sf): Ditto.
27755 (aarch64_fmlsl_lowv2sf): Ditto.
27756 (aarch64_fmlalq_lowv4sf): Ditto.
27757 (aarch64_fmlslq_lowv4sf): Ditto.
27758 (aarch64_fmlal_highv2sf): Ditto.
27759 (aarch64_fmlsl_highv2sf): Ditto.
27760 (aarch64_fmlalq_highv4sf): Ditto.
27761 (aarch64_fmlslq_highv4sf): Ditto.
27762 (aarch64_fmlal_lane_lowv2sf): Ditto.
27763 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27764 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27765 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27766 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27767 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27768 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27769 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27770 (aarch64_fmlal_lane_highv2sf): Ditto.
27771 (aarch64_fmlsl_lane_highv2sf): Ditto.
27772 (aarch64_fmlal_laneq_highv2sf): Ditto.
27773 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27774 (aarch64_fmlalq_lane_highv4sf): Ditto.
27775 (aarch64_fmlsl_lane_highv4sf): Ditto.
27776 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27777 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27778 * config/aarch64/aarch64-simd.md:
27779 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27780 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27781 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27782 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27783 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27784 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27785 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27786 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27787 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27788 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27789 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27790 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27791 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27792 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27793 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27794 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27795 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27796 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27797 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27798 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27799 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27800 (vfmlsl_low_u32): Ditto.
27801 (vfmlalq_low_u32): Ditto.
27802 (vfmlslq_low_u32): Ditto.
27803 (vfmlal_high_u32): Ditto.
27804 (vfmlsl_high_u32): Ditto.
27805 (vfmlalq_high_u32): Ditto.
27806 (vfmlslq_high_u32): Ditto.
27807 (vfmlal_lane_low_u32): Ditto.
27808 (vfmlsl_lane_low_u32): Ditto.
27809 (vfmlal_laneq_low_u32): Ditto.
27810 (vfmlsl_laneq_low_u32): Ditto.
27811 (vfmlalq_lane_low_u32): Ditto.
27812 (vfmlslq_lane_low_u32): Ditto.
27813 (vfmlalq_laneq_low_u32): Ditto.
27814 (vfmlslq_laneq_low_u32): Ditto.
27815 (vfmlal_lane_high_u32): Ditto.
27816 (vfmlsl_lane_high_u32): Ditto.
27817 (vfmlal_laneq_high_u32): Ditto.
27818 (vfmlsl_laneq_high_u32): Ditto.
27819 (vfmlalq_lane_high_u32): Ditto.
27820 (vfmlslq_lane_high_u32): Ditto.
27821 (vfmlalq_laneq_high_u32): Ditto.
27822 (vfmlslq_laneq_high_u32): Ditto.
27823 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27824 (AARCH64_FL_FOR_ARCH8_4): New.
27825 (AARCH64_ISA_F16FML): New ISA flag.
27826 (TARGET_F16FML): New feature flag for fp16fml.
27827 (doc/invoke.texi): Document new fp16fml option.
27828
27829 2018-01-10 Michael Collison <michael.collison@arm.com>
27830
27831 * config/aarch64/aarch64-builtins.c:
27832 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27833 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27834 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27835 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27836 (AARCH64_ISA_SHA3): New ISA flag.
27837 (TARGET_SHA3): New feature flag for sha3.
27838 * config/aarch64/iterators.md (sha512_op): New int attribute.
27839 (CRYPTO_SHA512): New int iterator.
27840 (UNSPEC_SHA512H): New unspec.
27841 (UNSPEC_SHA512H2): Ditto.
27842 (UNSPEC_SHA512SU0): Ditto.
27843 (UNSPEC_SHA512SU1): Ditto.
27844 * config/aarch64/aarch64-simd-builtins.def
27845 (aarch64_crypto_sha512hqv2di): New builtin.
27846 (aarch64_crypto_sha512h2qv2di): Ditto.
27847 (aarch64_crypto_sha512su0qv2di): Ditto.
27848 (aarch64_crypto_sha512su1qv2di): Ditto.
27849 (aarch64_eor3qv8hi): Ditto.
27850 (aarch64_rax1qv2di): Ditto.
27851 (aarch64_xarqv2di): Ditto.
27852 (aarch64_bcaxqv8hi): Ditto.
27853 * config/aarch64/aarch64-simd.md:
27854 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27855 (aarch64_crypto_sha512su0qv2di): Ditto.
27856 (aarch64_crypto_sha512su1qv2di): Ditto.
27857 (aarch64_eor3qv8hi): Ditto.
27858 (aarch64_rax1qv2di): Ditto.
27859 (aarch64_xarqv2di): Ditto.
27860 (aarch64_bcaxqv8hi): Ditto.
27861 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27862 (vsha512h2q_u64): Ditto.
27863 (vsha512su0q_u64): Ditto.
27864 (vsha512su1q_u64): Ditto.
27865 (veor3q_u16): Ditto.
27866 (vrax1q_u64): Ditto.
27867 (vxarq_u64): Ditto.
27868 (vbcaxq_u16): Ditto.
27869 * config/arm/types.md (crypto_sha512): New type attribute.
27870 (crypto_sha3): Ditto.
27871 (doc/invoke.texi): Document new sha3 option.
27872
27873 2018-01-10 Michael Collison <michael.collison@arm.com>
27874
27875 * config/aarch64/aarch64-builtins.c:
27876 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27877 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27878 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27879 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27880 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27881 (AARCH64_ISA_SM4): New ISA flag.
27882 (TARGET_SM4): New feature flag for sm4.
27883 * config/aarch64/aarch64-simd-builtins.def
27884 (aarch64_sm3ss1qv4si): Ditto.
27885 (aarch64_sm3tt1aq4si): Ditto.
27886 (aarch64_sm3tt1bq4si): Ditto.
27887 (aarch64_sm3tt2aq4si): Ditto.
27888 (aarch64_sm3tt2bq4si): Ditto.
27889 (aarch64_sm3partw1qv4si): Ditto.
27890 (aarch64_sm3partw2qv4si): Ditto.
27891 (aarch64_sm4eqv4si): Ditto.
27892 (aarch64_sm4ekeyqv4si): Ditto.
27893 * config/aarch64/aarch64-simd.md:
27894 (aarch64_sm3ss1qv4si): Ditto.
27895 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27896 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27897 (aarch64_sm4eqv4si): Ditto.
27898 (aarch64_sm4ekeyqv4si): Ditto.
27899 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27900 (sm3part_op): Ditto.
27901 (CRYPTO_SM3TT): Ditto.
27902 (CRYPTO_SM3PART): Ditto.
27903 (UNSPEC_SM3SS1): New unspec.
27904 (UNSPEC_SM3TT1A): Ditto.
27905 (UNSPEC_SM3TT1B): Ditto.
27906 (UNSPEC_SM3TT2A): Ditto.
27907 (UNSPEC_SM3TT2B): Ditto.
27908 (UNSPEC_SM3PARTW1): Ditto.
27909 (UNSPEC_SM3PARTW2): Ditto.
27910 (UNSPEC_SM4E): Ditto.
27911 (UNSPEC_SM4EKEY): Ditto.
27912 * config/aarch64/constraints.md (Ui2): New constraint.
27913 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27914 * config/arm/types.md (crypto_sm3): New type attribute.
27915 (crypto_sm4): Ditto.
27916 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27917 (vsm3tt1aq_u32): Ditto.
27918 (vsm3tt1bq_u32): Ditto.
27919 (vsm3tt2aq_u32): Ditto.
27920 (vsm3tt2bq_u32): Ditto.
27921 (vsm3partw1q_u32): Ditto.
27922 (vsm3partw2q_u32): Ditto.
27923 (vsm4eq_u32): Ditto.
27924 (vsm4ekeyq_u32): Ditto.
27925 (doc/invoke.texi): Document new sm4 option.
27926
27927 2018-01-10 Michael Collison <michael.collison@arm.com>
27928
27929 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27930 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27931 (AARCH64_FL_FOR_ARCH8_4): New.
27932 (AARCH64_FL_V8_4): New flag.
27933 (doc/invoke.texi): Document new armv8.4-a option.
27934
27935 2018-01-10 Michael Collison <michael.collison@arm.com>
27936
27937 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27938 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27939 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27940 * config/aarch64/aarch64-option-extension.def: Add
27941 AARCH64_OPT_EXTENSION of 'sha2'.
27942 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27943 (crypto): Disable sha2 and aes if crypto disabled.
27944 (crypto): Enable aes and sha2 if enabled.
27945 (simd): Disable sha2 and aes if simd disabled.
27946 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27947 New flags.
27948 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27949 (TARGET_SHA2): New feature flag for sha2.
27950 (TARGET_AES): New feature flag for aes.
27951 * config/aarch64/aarch64-simd.md:
27952 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27953 conditional on TARGET_AES.
27954 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27955 (aarch64_crypto_sha1hsi): Make pattern conditional
27956 on TARGET_SHA2.
27957 (aarch64_crypto_sha1hv4si): Ditto.
27958 (aarch64_be_crypto_sha1hv4si): Ditto.
27959 (aarch64_crypto_sha1su1v4si): Ditto.
27960 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27961 (aarch64_crypto_sha1su0v4si): Ditto.
27962 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27963 (aarch64_crypto_sha256su0v4si): Ditto.
27964 (aarch64_crypto_sha256su1v4si): Ditto.
27965 (doc/invoke.texi): Document new aes and sha2 options.
27966
27967 2018-01-10 Martin Sebor <msebor@redhat.com>
27968
27969 PR tree-optimization/83781
27970 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27971 as string arrays.
27972
27973 2018-01-11 Martin Sebor <msebor@gmail.com>
27974 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27975
27976 PR tree-optimization/83501
27977 PR tree-optimization/81703
27978
27979 * tree-ssa-strlen.c (get_string_cst): Rename...
27980 (get_string_len): ...to this. Handle global constants.
27981 (handle_char_store): Adjust.
27982
27983 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27984 Jim Wilson <jimw@sifive.com>
27985
27986 * config/riscv/riscv-protos.h (riscv_output_return): New.
27987 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27988 (riscv_attribute_table, riscv_output_return),
27989 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27990 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27991 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27992 function.
27993 (riscv_expand_prologue): Add early return for naked function.
27994 (riscv_expand_epilogue): Likewise.
27995 (riscv_function_ok_for_sibcall): Return false for naked function.
27996 (riscv_set_current_function): New.
27997 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27998 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27999 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
28000 * doc/extend.texi (RISC-V Function Attributes): New.
28001
28002 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
28003
28004 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
28005 check for 128-bit long double before checking TCmode.
28006 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
28007 128-bit long doubles before checking TFmode or TCmode.
28008 (FLOAT128_IBM_P): Likewise.
28009
28010 2018-01-10 Martin Sebor <msebor@redhat.com>
28011
28012 PR tree-optimization/83671
28013 * builtins.c (c_strlen): Unconditionally return zero for the empty
28014 string.
28015 Use -Warray-bounds for warnings.
28016 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
28017 for non-constant array indices with COMPONENT_REF, arrays of
28018 arrays, and pointers to arrays.
28019 (gimple_fold_builtin_strlen): Determine and set length range for
28020 non-constant character arrays.
28021
28022 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
28023
28024 PR middle-end/81897
28025 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
28026 empty blocks.
28027
28028 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
28029
28030 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
28031
28032 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28033
28034 PR target/83399
28035 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
28036 VECTOR_MEM_ALTIVEC_OR_VSX_P.
28037 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
28038 indexed_or_indirect_operand predicate.
28039 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
28040 (*vsx_le_perm_load_v8hi): Likewise.
28041 (*vsx_le_perm_load_v16qi): Likewise.
28042 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
28043 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
28044 (*vsx_le_perm_store_v8hi): Likewise.
28045 (*vsx_le_perm_store_v16qi): Likewise.
28046 (eight unnamed splitters): Likewise.
28047
28048 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28049
28050 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
28051 * config/rs6000/emmintrin.h: Likewise.
28052 * config/rs6000/mmintrin.h: Likewise.
28053 * config/rs6000/xmmintrin.h: Likewise.
28054
28055 2018-01-10 David Malcolm <dmalcolm@redhat.com>
28056
28057 PR c++/43486
28058 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
28059 "public_flag".
28060 * tree.c (tree_nop_conversion): Return true for location wrapper
28061 nodes.
28062 (maybe_wrap_with_location): New function.
28063 (selftest::check_strip_nops): New function.
28064 (selftest::test_location_wrappers): New function.
28065 (selftest::tree_c_tests): Call it.
28066 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
28067 (maybe_wrap_with_location): New decl.
28068 (EXPR_LOCATION_WRAPPER_P): New macro.
28069 (location_wrapper_p): New inline function.
28070 (tree_strip_any_location_wrapper): New inline function.
28071
28072 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
28073
28074 PR target/83735
28075 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
28076 stack_realign_offset for the largest alignment of stack slot
28077 actually used.
28078 (ix86_find_max_used_stack_alignment): New function.
28079 (ix86_finalize_stack_frame_flags): Use it. Set
28080 max_used_stack_alignment if we don't realign stack.
28081 * config/i386/i386.h (machine_function): Add
28082 max_used_stack_alignment.
28083
28084 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
28085
28086 * config/arm/arm.opt (-mbranch-cost): New option.
28087 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
28088 account.
28089
28090 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
28091
28092 PR target/83629
28093 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
28094 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
28095
28096 2018-01-10 Richard Biener <rguenther@suse.de>
28097
28098 PR debug/83765
28099 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
28100 early out so it also covers the case where we have a non-NULL
28101 origin.
28102
28103 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28104
28105 PR tree-optimization/83753
28106 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
28107 for non-strided grouped accesses if the number of elements is 1.
28108
28109 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28110
28111 PR target/81616
28112 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
28113 * i386.h (TARGET_USE_GATHER): Define.
28114 * x86-tune.def (X86_TUNE_USE_GATHER): New.
28115
28116 2018-01-10 Martin Liska <mliska@suse.cz>
28117
28118 PR bootstrap/82831
28119 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
28120 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
28121 partitioning.
28122 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
28123 CLEANUP_NO_PARTITIONING is not set.
28124
28125 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28126
28127 * doc/rtl.texi: Remove documentation of (const ...) wrappers
28128 for vectors, as a partial revert of r254296.
28129 * rtl.h (const_vec_p): Delete.
28130 (const_vec_duplicate_p): Don't test for vector CONSTs.
28131 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
28132 * expmed.c (make_tree): Likewise.
28133
28134 Revert:
28135 * common.md (E, F): Use CONSTANT_P instead of checking for
28136 CONST_VECTOR.
28137 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
28138 checking for CONST_VECTOR.
28139
28140 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28141
28142 PR middle-end/83575
28143 * predict.c (force_edge_cold): Handle in more sane way edges
28144 with no prediction.
28145
28146 2018-01-09 Carl Love <cel@us.ibm.com>
28147
28148 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
28149 V4SI, V4SF types.
28150 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
28151 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
28152 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
28153 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
28154 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
28155 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
28156 * config/rs6000/rs6000-protos.h: Add extern defition for
28157 rs6000_generate_float2_double_code.
28158 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
28159 function.
28160 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
28161 (float2_v2df): Add define_expand.
28162
28163 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
28164
28165 PR target/83628
28166 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28167 op_mode in the force_to_mode call.
28168
28169 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28170
28171 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28172 instead of checking each element individually.
28173 (aarch64_evpc_uzp): Likewise.
28174 (aarch64_evpc_zip): Likewise.
28175 (aarch64_evpc_ext): Likewise.
28176 (aarch64_evpc_rev): Likewise.
28177 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28178 instead of checking each element individually. Return true without
28179 generating rtl if
28180 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28181 whether all selected elements come from the same input, instead of
28182 checking each element individually. Remove calls to gen_rtx_REG,
28183 start_sequence and end_sequence and instead assert that no rtl is
28184 generated.
28185
28186 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28187
28188 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28189 order of HIGH and CONST checks.
28190
28191 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28192
28193 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28194 if the destination isn't an SSA_NAME.
28195
28196 2018-01-09 Richard Biener <rguenther@suse.de>
28197
28198 PR tree-optimization/83668
28199 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28200 move prologue...
28201 (canonicalize_loop_form): ... here, renamed from ...
28202 (canonicalize_loop_closed_ssa_form): ... this and amended to
28203 swap successor edges for loop exit blocks to make us use
28204 the RPO order we need for initial schedule generation.
28205
28206 2018-01-09 Joseph Myers <joseph@codesourcery.com>
28207
28208 PR tree-optimization/64811
28209 * match.pd: When optimizing comparisons with Inf, avoid
28210 introducing or losing exceptions from comparisons with NaN.
28211
28212 2018-01-09 Martin Liska <mliska@suse.cz>
28213
28214 PR sanitizer/82517
28215 * asan.c (shadow_mem_size): Add gcc_assert.
28216
28217 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
28218
28219 Don't save registers in main().
28220
28221 PR target/83738
28222 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28223 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28224 * config/avr/avr.c (avr_set_current_function): Don't error if
28225 naked, OS_task or OS_main are specified at the same time.
28226 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28227 OS_main.
28228 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28229 attribute.
28230 * common/config/avr/avr-common.c (avr_option_optimization_table):
28231 Switch on -mmain-is-OS_task for optimizing compilations.
28232
28233 2018-01-09 Richard Biener <rguenther@suse.de>
28234
28235 PR tree-optimization/83572
28236 * graphite.c: Include cfganal.h.
28237 (graphite_transform_loops): Connect infinite loops to exit
28238 and remove fake edges at the end.
28239
28240 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28241
28242 * ipa-inline.c (edge_badness): Revert accidental checkin.
28243
28244 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28245
28246 PR ipa/80763
28247 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28248 symbols; not inline clones.
28249
28250 2018-01-09 Jakub Jelinek <jakub@redhat.com>
28251
28252 PR target/83507
28253 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28254 hard registers. Formatting fixes.
28255
28256 PR preprocessor/83722
28257 * gcc.c (try_generate_repro): Pass
28258 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28259 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28260 do_report_bug.
28261
28262 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
28263 Kito Cheng <kito.cheng@gmail.com>
28264
28265 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28266 (riscv_leaf_function_p): Delete.
28267 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28268
28269 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28270
28271 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28272 function.
28273 (do_ifelse): New function.
28274 (do_isel): New function.
28275 (do_sub3): New function.
28276 (do_add3): New function.
28277 (do_load_mask_compare): New function.
28278 (do_overlap_load_compare): New function.
28279 (expand_compare_loop): New function.
28280 (expand_block_compare): Call expand_compare_loop() when appropriate.
28281 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28282 option description.
28283 (-mblock-compare-inline-loop-limit): New option.
28284
28285 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28286
28287 PR target/83677
28288 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28289 Reverse order of second and third operands in first alternative.
28290 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28291 of first and second elements in UNSPEC_VPERMR vector.
28292 (altivec_expand_vec_perm_le): Likewise.
28293
28294 2018-01-08 Jeff Law <law@redhat.com>
28295
28296 PR rtl-optimizatin/81308
28297 * tree-switch-conversion.c (cfg_altered): New file scoped static.
28298 (process_switch): If group_case_labels makes a change, then set
28299 cfg_altered.
28300 (pass_convert_switch::execute): If a switch is converted, then
28301 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
28302
28303 PR rtl-optimization/81308
28304 * recog.c (split_all_insns): Conditionally cleanup the CFG after
28305 splitting insns.
28306
28307 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
28308
28309 PR target/83663 - Revert r255946
28310 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28311 generation for cases where splatting a value is not useful.
28312 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28313 across a vec_duplicate and a paradoxical subreg forming a vector
28314 mode to a vec_concat.
28315
28316 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28317
28318 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28319 -march=armv8.3-a variants.
28320 * config/arm/t-multilib: Likewise.
28321 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
28322
28323 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28324
28325 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28326 to generate rtl.
28327 (cceq_ior_compare_complement): Give it a name so I can use it, and
28328 change boolean_or_operator predicate to boolean_operator so it can
28329 be used to generate a crand.
28330 (eqne): New code iterator.
28331 (bd/bd_neg): New code_attrs.
28332 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28333 a single define_insn.
28334 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28335 decrement (bdnzt/bdnzf/bdzt/bdzf).
28336 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28337 with the new names of the branch decrement patterns, and added the
28338 names of the branch decrement conditional patterns.
28339
28340 2018-01-08 Richard Biener <rguenther@suse.de>
28341
28342 PR tree-optimization/83563
28343 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28344 cache.
28345
28346 2018-01-08 Richard Biener <rguenther@suse.de>
28347
28348 PR middle-end/83713
28349 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28350
28351 2018-01-08 Richard Biener <rguenther@suse.de>
28352
28353 PR tree-optimization/83685
28354 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28355 references to abnormals.
28356
28357 2018-01-08 Richard Biener <rguenther@suse.de>
28358
28359 PR lto/83719
28360 * dwarf2out.c (output_indirect_strings): Handle empty
28361 skeleton_debug_str_hash.
28362 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28363
28364 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28365
28366 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28367 (emit_store_direct): Likewise.
28368 (arc_trampoline_adjust_address): Likewise.
28369 (arc_asm_trampoline_template): New function.
28370 (arc_initialize_trampoline): Use asm_trampoline_template.
28371 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28372 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28373 * config/arc/arc.md (flush_icache): Delete pattern.
28374
28375 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28376
28377 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28378 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28379 munaligned-access.
28380
28381 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28382
28383 PR target/83681
28384 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28385 by not USED_FOR_TARGET.
28386 (make_pass_resolve_sw_modes): Likewise.
28387
28388 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28389
28390 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28391 USED_FOR_TARGET.
28392
28393 2018-01-08 Richard Biener <rguenther@suse.de>
28394
28395 PR middle-end/83580
28396 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28397
28398 2018-01-08 Richard Biener <rguenther@suse.de>
28399
28400 PR middle-end/83517
28401 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28402
28403 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28404
28405 PR middle-end/81897
28406 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28407 basic blocks with a small number of successors.
28408 (convert_control_dep_chain_into_preds): Improve handling of
28409 forwarder blocks.
28410 (dump_predicates): Split apart into...
28411 (dump_pred_chain): ...here...
28412 (dump_pred_info): ...and here.
28413 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28414 (can_chain_union_be_invalidated_p): Improve check for invalidation
28415 of paths.
28416 (uninit_uses_cannot_happen): Avoid unnecessary if
28417 convert_control_dep_chain_into_preds yielded nothing.
28418
28419 2018-01-06 Martin Sebor <msebor@redhat.com>
28420
28421 PR tree-optimization/83640
28422 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28423 subtracting negative offset from size.
28424 (builtin_access::overlap): Adjust offset bounds of the access to fall
28425 within the size of the object if possible.
28426
28427 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28428
28429 PR rtl-optimization/83699
28430 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28431 extract_bit_field_as_subreg to cases in which the extracted
28432 value is also a vector.
28433
28434 * lra-constraints.c (process_alt_operands): Test for the equivalence
28435 substitutions when detecting a possible reload cycle.
28436
28437 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28438
28439 PR debug/83480
28440 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28441 by default if flag_selective_schedling{,2}. Formatting fixes.
28442
28443 PR rtl-optimization/83682
28444 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28445 if it has non-VECTOR_MODE element mode.
28446 (vec_duplicate_p): Likewise.
28447
28448 PR middle-end/83694
28449 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28450 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28451
28452 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28453
28454 PR target/83604
28455 * config/i386/i386-builtin.def
28456 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28457 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28458 Require also OPTION_MASK_ISA_AVX512F in addition to
28459 OPTION_MASK_ISA_GFNI.
28460 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28461 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28462 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28463 to OPTION_MASK_ISA_GFNI.
28464 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28465 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28466 OPTION_MASK_ISA_AVX512BW.
28467 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28468 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28469 addition to OPTION_MASK_ISA_GFNI.
28470 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28471 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28472 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28473 to OPTION_MASK_ISA_GFNI.
28474 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28475 a requirement for all ISAs rather than any of them with a few
28476 exceptions.
28477 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28478 processing.
28479 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28480 bitmasks to be enabled with 3 exceptions, instead of requiring any
28481 enabled ISA with lots of exceptions.
28482 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28483 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28484 Change avx512bw in isa attribute to avx512f.
28485 * config/i386/sgxintrin.h: Add license boilerplate.
28486 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28487 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28488 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28489 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28490 defined.
28491 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28492 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28493 temporarily sse2 rather than sse if not enabled already.
28494
28495 PR target/83604
28496 * config/i386/sse.md (VI248_VLBW): Rename to ...
28497 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28498 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28499 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28500 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28501 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28502 mode iterator instead of VI248_VLBW.
28503
28504 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28505
28506 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28507 (record_modified): Skip clobbers; add debug output.
28508 (param_change_prob): Use sreal frequencies.
28509
28510 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28511
28512 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28513 punt for user-aligned variables.
28514
28515 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28516
28517 * tree-chrec.c (chrec_contains_symbols): Return true for
28518 POLY_INT_CST.
28519
28520 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28521
28522 PR target/82439
28523 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28524 of (x|y) == x for BICS pattern.
28525
28526 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28527
28528 PR tree-optimization/83605
28529 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28530 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28531 can throw.
28532
28533 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28534
28535 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28536 * config/epiphany/rtems.h: New file.
28537
28538 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28539 Uros Bizjak <ubizjak@gmail.com>
28540
28541 PR target/83554
28542 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28543 QIreg_operand instead of register_operand predicate.
28544 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28545 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28546 comments instead of -fmitigate[-_]rop.
28547
28548 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28549
28550 PR bootstrap/81926
28551 * cgraphunit.c (symbol_table::compile): Switch to text_section
28552 before calling assembly_start debug hook.
28553 * run-rtl-passes.c (run_rtl_passes): Likewise.
28554 Include output.h.
28555
28556 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28557
28558 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28559 range_int_cst_p rather than !symbolic_range_p before calling
28560 extract_range_from_multiplicative_op_1.
28561
28562 2018-01-04 Jeff Law <law@redhat.com>
28563
28564 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28565 redundant test in assertion.
28566
28567 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28568
28569 * doc/rtl.texi: Document machine_mode wrapper classes.
28570
28571 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28572
28573 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28574 using tree_to_uhwi.
28575
28576 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28577
28578 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28579 the VEC_PERM_EXPR fold to fail.
28580
28581 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28582
28583 PR debug/83585
28584 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28585 to switched_sections.
28586
28587 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28588
28589 PR target/83680
28590 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28591 test for d.testing.
28592
28593 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28594
28595 PR target/83387
28596 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28597 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28598
28599 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28600
28601 PR debug/83666
28602 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28603 is BLKmode and bitpos not zero or mode change is needed.
28604
28605 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28606
28607 PR target/83675
28608 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28609 TARGET_VIS2.
28610
28611 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28612
28613 PR target/83628
28614 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28615 instead of MULT rtx. Update all corresponding splitters.
28616 (*saddl_se): Ditto.
28617 (*ssub<modesuffix>): Ditto.
28618 (*ssubl_se): Ditto.
28619 (*cmp_sadd_di): Update split patterns.
28620 (*cmp_sadd_si): Ditto.
28621 (*cmp_sadd_sidi): Ditto.
28622 (*cmp_ssub_di): Ditto.
28623 (*cmp_ssub_si): Ditto.
28624 (*cmp_ssub_sidi): Ditto.
28625 * config/alpha/predicates.md (const23_operand): New predicate.
28626 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28627 Look for ASHIFT, not MULT inner operand.
28628 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28629
28630 2018-01-04 Martin Liska <mliska@suse.cz>
28631
28632 PR gcov-profile/83669
28633 * gcov.c (output_intermediate_file): Add version to intermediate
28634 gcov file.
28635 * doc/gcov.texi: Document new field 'version' in intermediate
28636 file format. Fix location of '-k' option of gcov command.
28637
28638 2018-01-04 Martin Liska <mliska@suse.cz>
28639
28640 PR ipa/82352
28641 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28642
28643 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28644
28645 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28646
28647 2018-01-03 Martin Sebor <msebor@redhat.com>
28648
28649 PR tree-optimization/83655
28650 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28651 checking calls with invalid arguments.
28652
28653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28654
28655 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28656 (vectorizable_mask_load_store): Delete.
28657 (vectorizable_call): Return false for masked loads and stores.
28658 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28659 instead of gimple_assign_rhs1.
28660 (vectorizable_load): Handle IFN_MASK_LOAD.
28661 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28662
28663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28664
28665 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28666 split out from..,
28667 (vectorizable_mask_load_store): ...here.
28668 (vectorizable_load): ...and here.
28669
28670 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28671
28672 * tree-vect-stmts.c (vect_build_all_ones_mask)
28673 (vect_build_zero_merge_argument): New functions, split out from...
28674 (vectorizable_load): ...here.
28675
28676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28677
28678 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28679 split out from...
28680 (vectorizable_mask_load_store): ...here.
28681 (vectorizable_store): ...and here.
28682
28683 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28684
28685 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28686 split out from...
28687 (vectorizable_mask_load_store): ...here.
28688
28689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28690
28691 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28692 (vect_model_store_cost): Take a vec_load_store_type instead of a
28693 vect_def_type.
28694 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28695 (vect_model_store_cost): Take a vec_load_store_type instead of a
28696 vect_def_type.
28697 (vectorizable_mask_load_store): Update accordingly.
28698 (vectorizable_store): Likewise.
28699 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28700
28701 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28702
28703 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28704 IFN_MASK_LOAD calls here rather than...
28705 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28706
28707 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28708 Alan Hayward <alan.hayward@arm.com>
28709 David Sherwood <david.sherwood@arm.com>
28710
28711 * expmed.c (extract_bit_field_1): For vector extracts,
28712 fall back to extract_bit_field_as_subreg if vec_extract
28713 isn't available.
28714
28715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28716 Alan Hayward <alan.hayward@arm.com>
28717 David Sherwood <david.sherwood@arm.com>
28718
28719 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28720 they are variable or constant sized.
28721 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28722 slots for constant-sized data.
28723
28724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28725 Alan Hayward <alan.hayward@arm.com>
28726 David Sherwood <david.sherwood@arm.com>
28727
28728 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28729 handling COND_EXPRs with boolean comparisons, try to find a better
28730 basis for the mask type than the boolean itself.
28731
28732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28733
28734 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28735 is calculated and how it can be overridden.
28736 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28737 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28738 if defined.
28739 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28740 if nonzero.
28741
28742 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28743 Alan Hayward <alan.hayward@arm.com>
28744 David Sherwood <david.sherwood@arm.com>
28745
28746 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28747 Remove the mode argument.
28748 (aarch64_simd_valid_immediate): Remove the mode and inverse
28749 arguments.
28750 * config/aarch64/iterators.md (bitsize): New iterator.
28751 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28752 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28753 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28754 aarch64_simd_valid_immediate.
28755 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28756 (aarch64_reg_or_bic_imm): Likewise.
28757 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28758 with an insn_type enum and msl with a modifier_type enum.
28759 Replace element_width with a scalar_mode. Change the shift
28760 to unsigned int. Add constructors for scalar_float_mode and
28761 scalar_int_mode elements.
28762 (aarch64_vect_float_const_representable_p): Delete.
28763 (aarch64_can_const_movi_rtx_p)
28764 (aarch64_simd_scalar_immediate_valid_for_move)
28765 (aarch64_simd_make_constant): Update call to
28766 aarch64_simd_valid_immediate.
28767 (aarch64_advsimd_valid_immediate_hs): New function.
28768 (aarch64_advsimd_valid_immediate): Likewise.
28769 (aarch64_simd_valid_immediate): Remove mode and inverse
28770 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28771 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28772 and aarch64_float_const_representable_p on the result.
28773 (aarch64_output_simd_mov_immediate): Remove mode argument.
28774 Update call to aarch64_simd_valid_immediate and use of
28775 simd_immediate_info.
28776 (aarch64_output_scalar_simd_mov_immediate): Update call
28777 accordingly.
28778
28779 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28780 Alan Hayward <alan.hayward@arm.com>
28781 David Sherwood <david.sherwood@arm.com>
28782
28783 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28784 (mode_nunits): Likewise CONST_MODE_NUNITS.
28785 * machmode.def (ADJUST_NUNITS): Document.
28786 * genmodes.c (mode_data::need_nunits_adj): New field.
28787 (blank_mode): Update accordingly.
28788 (adj_nunits): New variable.
28789 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28790 parameter.
28791 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28792 listed in adj_nunits.
28793 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28794 listed in adj_nunits. Don't emit case statements for such modes.
28795 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28796 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28797 nothing if adj_nunits is nonnull.
28798 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28799 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28800 (emit_mode_fbit): Update use of print_maybe_const_decl.
28801 (emit_move_size): Likewise. Treat the array as non-const
28802 if adj_nunits.
28803 (emit_mode_adjustments): Handle adj_nunits.
28804
28805 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28806
28807 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28808 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28809 (VECTOR_MODES): Use it.
28810 (make_vector_modes): Take the prefix as an argument.
28811
28812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28813 Alan Hayward <alan.hayward@arm.com>
28814 David Sherwood <david.sherwood@arm.com>
28815
28816 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28817 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28818 for MODE_VECTOR_BOOL.
28819 * machmode.def (VECTOR_BOOL_MODE): Document.
28820 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28821 (make_vector_bool_mode): New function.
28822 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28823 MODE_VECTOR_BOOL.
28824 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28825 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28826 Likewise.
28827 * stor-layout.c (int_mode_for_mode): Likewise.
28828 * tree.c (build_vector_type_for_mode): Likewise.
28829 * varasm.c (output_constant_pool_2): Likewise.
28830 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28831 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28832 for MODE_VECTOR_BOOL.
28833 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28834 of mode class checks.
28835 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28836 instead of a list of mode class checks.
28837 (expand_vector_scalar_condition): Likewise.
28838 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28839
28840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28841 Alan Hayward <alan.hayward@arm.com>
28842 David Sherwood <david.sherwood@arm.com>
28843
28844 * machmode.h (mode_size): Change from unsigned short to
28845 poly_uint16_pod.
28846 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28847 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28848 or if measurement_type is not polynomial.
28849 (fixed_size_mode::includes_p): Check for constant-sized modes.
28850 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28851 return a poly_uint16 rather than an unsigned short.
28852 (emit_mode_size): Change the type of mode_size from unsigned short
28853 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28854 (emit_mode_adjustments): Cope with polynomial vector sizes.
28855 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28856 for GET_MODE_SIZE.
28857 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28858 for GET_MODE_SIZE.
28859 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28860 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28861 * caller-save.c (setup_save_areas): Likewise.
28862 (replace_reg_with_saved_mem): Likewise.
28863 * calls.c (emit_library_call_value_1): Likewise.
28864 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28865 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28866 (gen_lowpart_for_combine): Likewise.
28867 * convert.c (convert_to_integer_1): Likewise.
28868 * cse.c (equiv_constant, cse_insn): Likewise.
28869 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28870 (cselib_subst_to_values): Likewise.
28871 * dce.c (word_dce_process_block): Likewise.
28872 * df-problems.c (df_word_lr_mark_ref): Likewise.
28873 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28874 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28875 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28876 (rtl_for_decl_location): Likewise.
28877 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28878 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28879 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28880 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28881 (expand_expr_real_1): Likewise.
28882 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28883 (pad_below): Likewise.
28884 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28885 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28886 * ira.c (get_subreg_tracking_sizes): Likewise.
28887 * ira-build.c (ira_create_allocno_objects): Likewise.
28888 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28889 (ira_sort_regnos_for_alter_reg): Likewise.
28890 * ira-costs.c (record_operand_costs): Likewise.
28891 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28892 (resolve_simple_move): Likewise.
28893 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28894 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28895 (lra_constraints): Likewise.
28896 (CONST_POOL_OK_P): Reject variable-sized modes.
28897 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28898 (add_pseudo_to_slot, lra_spill): Likewise.
28899 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28900 * optabs-query.c (get_best_extraction_insn): Likewise.
28901 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28902 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28903 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28904 * recog.c (offsettable_address_addr_space_p): Likewise.
28905 * regcprop.c (maybe_mode_change): Likewise.
28906 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28907 * regrename.c (build_def_use): Likewise.
28908 * regstat.c (dump_reg_info): Likewise.
28909 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28910 (find_reloads, find_reloads_subreg_address): Likewise.
28911 * reload1.c (eliminate_regs_1): Likewise.
28912 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28913 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28914 (simplify_binary_operation_1, simplify_subreg): Likewise.
28915 * targhooks.c (default_function_arg_padding): Likewise.
28916 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28917 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28918 (verify_gimple_assign_ternary): Likewise.
28919 * tree-inline.c (estimate_move_cost): Likewise.
28920 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28921 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28922 (get_address_cost_ainc): Likewise.
28923 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28924 (vect_supportable_dr_alignment): Likewise.
28925 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28926 (vectorizable_reduction): Likewise.
28927 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28928 (vectorizable_operation, vectorizable_load): Likewise.
28929 * tree.c (build_same_sized_truth_vector_type): Likewise.
28930 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28931 * var-tracking.c (emit_note_insn_var_location): Likewise.
28932 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28933 (ADDR_VEC_ALIGN): Likewise.
28934
28935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28936 Alan Hayward <alan.hayward@arm.com>
28937 David Sherwood <david.sherwood@arm.com>
28938
28939 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28940 unsigned short.
28941 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28942 or if measurement_type is polynomial.
28943 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28944 * combine.c (make_extraction): Likewise.
28945 * dse.c (find_shift_sequence): Likewise.
28946 * dwarf2out.c (mem_loc_descriptor): Likewise.
28947 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28948 (extract_bit_field, extract_low_bits): Likewise.
28949 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28950 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28951 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28952 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28953 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28954 * reload.c (find_reloads): Likewise.
28955 * reload1.c (alter_reg): Likewise.
28956 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28957 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28958 * tree-if-conv.c (predicate_mem_writes): Likewise.
28959 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28960 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28961 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28962 * valtrack.c (dead_debug_insert_temp): Likewise.
28963 * varasm.c (mergeable_constant_section): Likewise.
28964 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28965
28966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28967 Alan Hayward <alan.hayward@arm.com>
28968 David Sherwood <david.sherwood@arm.com>
28969
28970 * expr.c (expand_assignment): Cope with polynomial mode sizes
28971 when assigning to a CONCAT.
28972
28973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28974 Alan Hayward <alan.hayward@arm.com>
28975 David Sherwood <david.sherwood@arm.com>
28976
28977 * machmode.h (mode_precision): Change from unsigned short to
28978 poly_uint16_pod.
28979 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28980 short.
28981 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28982 or if measurement_type is not polynomial.
28983 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28984 in which the mode is already known to be a scalar_int_mode.
28985 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28986 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28987 initializer.
28988 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28989 for GET_MODE_PRECISION.
28990 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28991 for GET_MODE_PRECISION.
28992 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28993 as polynomial.
28994 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28995 (expand_field_assignment, make_extraction): Likewise.
28996 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28997 (get_last_value): Likewise.
28998 * convert.c (convert_to_integer_1): Likewise.
28999 * cse.c (cse_insn): Likewise.
29000 * expr.c (expand_expr_real_1): Likewise.
29001 * lra-constraints.c (simplify_operand_subreg): Likewise.
29002 * optabs-query.c (can_atomic_load_p): Likewise.
29003 * optabs.c (expand_atomic_load): Likewise.
29004 (expand_atomic_store): Likewise.
29005 * ree.c (combine_reaching_defs): Likewise.
29006 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
29007 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
29008 * tree.h (type_has_mode_precision_p): Likewise.
29009 * ubsan.c (instrument_si_overflow): Likewise.
29010
29011 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29012 Alan Hayward <alan.hayward@arm.com>
29013 David Sherwood <david.sherwood@arm.com>
29014
29015 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
29016 polynomial numbers of units.
29017 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
29018 (valid_vector_subparts_p): New function.
29019 (build_vector_type): Remove temporary shim and take the number
29020 of units as a poly_uint64 rather than an int.
29021 (build_opaque_vector_type): Take the number of units as a
29022 poly_uint64 rather than an int.
29023 * tree.c (build_vector_from_ctor): Handle polynomial
29024 TYPE_VECTOR_SUBPARTS.
29025 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
29026 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
29027 (build_vector_from_val): If the number of units is variable,
29028 use build_vec_duplicate_cst for constant operands and
29029 VEC_DUPLICATE_EXPR otherwise.
29030 (make_vector_type): Remove temporary is_constant ().
29031 (build_vector_type, build_opaque_vector_type): Take the number of
29032 units as a poly_uint64 rather than an int.
29033 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
29034 VECTOR_CST_NELTS.
29035 * cfgexpand.c (expand_debug_expr): Likewise.
29036 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
29037 (store_constructor, expand_expr_real_1): Likewise.
29038 (const_scalar_mask_from_tree): Likewise.
29039 * fold-const-call.c (fold_const_reduction): Likewise.
29040 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
29041 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
29042 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
29043 (fold_relational_const): Likewise.
29044 (native_interpret_vector): Likewise. Change the size from an
29045 int to an unsigned int.
29046 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
29047 TYPE_VECTOR_SUBPARTS.
29048 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
29049 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
29050 duplicating a non-constant operand into a variable-length vector.
29051 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
29052 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
29053 * ipa-icf.c (sem_variable::equals): Likewise.
29054 * match.pd: Likewise.
29055 * omp-simd-clone.c (simd_clone_subparts): Likewise.
29056 * print-tree.c (print_node): Likewise.
29057 * stor-layout.c (layout_type): Likewise.
29058 * targhooks.c (default_builtin_vectorization_cost): Likewise.
29059 * tree-cfg.c (verify_gimple_comparison): Likewise.
29060 (verify_gimple_assign_binary): Likewise.
29061 (verify_gimple_assign_ternary): Likewise.
29062 (verify_gimple_assign_single): Likewise.
29063 * tree-pretty-print.c (dump_generic_node): Likewise.
29064 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29065 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
29066 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
29067 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
29068 (vect_shift_permute_load_chain): Likewise.
29069 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
29070 (expand_vector_condition, optimize_vector_constructor): Likewise.
29071 (lower_vec_perm, get_compute_type): Likewise.
29072 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29073 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
29074 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
29075 (vect_recog_mask_conversion_pattern): Likewise.
29076 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
29077 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
29078 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29079 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
29080 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
29081 (vectorizable_shift, vectorizable_operation, vectorizable_store)
29082 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
29083 (supportable_widening_operation): Likewise.
29084 (supportable_narrowing_operation): Likewise.
29085 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
29086 Likewise.
29087 * varasm.c (output_constant): Likewise.
29088
29089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29090 Alan Hayward <alan.hayward@arm.com>
29091 David Sherwood <david.sherwood@arm.com>
29092
29093 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
29094 so that both the length == 3 and length != 3 cases set up their
29095 own permute vectors. Add comments explaining why we know the
29096 number of elements is constant.
29097 (vect_permute_load_chain): Likewise.
29098
29099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29100 Alan Hayward <alan.hayward@arm.com>
29101 David Sherwood <david.sherwood@arm.com>
29102
29103 * machmode.h (mode_nunits): Change from unsigned char to
29104 poly_uint16_pod.
29105 (ONLY_FIXED_SIZE_MODES): New macro.
29106 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
29107 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
29108 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
29109 New typedefs.
29110 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
29111 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
29112 or if measurement_type is not polynomial.
29113 * genmodes.c (ZERO_COEFFS): New macro.
29114 (emit_mode_nunits_inline): Make mode_nunits_inline return a
29115 poly_uint16.
29116 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
29117 Use ZERO_COEFFS when emitting initializers.
29118 * data-streamer.h (bp_pack_poly_value): New function.
29119 (bp_unpack_poly_value): Likewise.
29120 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29121 for GET_MODE_NUNITS.
29122 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29123 for GET_MODE_NUNITS.
29124 * tree.c (make_vector_type): Remove temporary shim and make
29125 the real function take the number of units as a poly_uint64
29126 rather than an int.
29127 (build_vector_type_for_mode): Handle polynomial nunits.
29128 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
29129 * emit-rtl.c (const_vec_series_p_1): Likewise.
29130 (gen_rtx_CONST_VECTOR): Likewise.
29131 * fold-const.c (test_vec_duplicate_folding): Likewise.
29132 * genrecog.c (validate_pattern): Likewise.
29133 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
29134 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29135 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
29136 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
29137 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
29138 * rtlanal.c (subreg_get_info): Likewise.
29139 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29140 (vect_grouped_load_supported): Likewise.
29141 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
29142 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
29143 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
29144 (simplify_const_unary_operation, simplify_binary_operation_1)
29145 (simplify_const_binary_operation, simplify_ternary_operation)
29146 (test_vector_ops_duplicate, test_vector_ops): Likewise.
29147 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
29148 instead of CONST_VECTOR_NUNITS.
29149 * varasm.c (output_constant_pool_2): Likewise.
29150 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
29151 explicit-encoded elements in the XVEC for variable-length vectors.
29152
29153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29154
29155 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
29156
29157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29158 Alan Hayward <alan.hayward@arm.com>
29159 David Sherwood <david.sherwood@arm.com>
29160
29161 * coretypes.h (fixed_size_mode): Declare.
29162 (fixed_size_mode_pod): New typedef.
29163 * builtins.h (target_builtins::x_apply_args_mode)
29164 (target_builtins::x_apply_result_mode): Change type to
29165 fixed_size_mode_pod.
29166 * builtins.c (apply_args_size, apply_result_size, result_vector)
29167 (expand_builtin_apply_args_1, expand_builtin_apply)
29168 (expand_builtin_return): Update accordingly.
29169
29170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29171
29172 * cse.c (hash_rtx_cb): Hash only the encoded elements.
29173 * cselib.c (cselib_hash_rtx): Likewise.
29174 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29175 CONST_VECTOR encoding.
29176
29177 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29178 Jeff Law <law@redhat.com>
29179
29180 PR target/83641
29181 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29182 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29183 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29184 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29185
29186 PR target/83641
29187 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29188 explicitly probe *sp in a noreturn function if there were any callee
29189 register saves or frame pointer is needed.
29190
29191 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29192
29193 PR debug/83621
29194 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29195 BLKmode for ternary, binary or unary expressions.
29196
29197 PR debug/83645
29198 * var-tracking.c (delete_vta_debug_insn): New inline function.
29199 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29200 insns from get_insns () to NULL instead of each bb separately.
29201 Use delete_vta_debug_insn. No longer static.
29202 (vt_debug_insns_local, variable_tracking_main_1): Adjust
29203 delete_vta_debug_insns callers.
29204 * rtl.h (delete_vta_debug_insns): Declare.
29205 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29206 instead of variable_tracking_main.
29207
29208 2018-01-03 Martin Sebor <msebor@redhat.com>
29209
29210 PR tree-optimization/83603
29211 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29212 arguments past the endof the argument list in functions declared
29213 without a prototype.
29214 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29215 Avoid checking when arguments are null.
29216
29217 2018-01-03 Martin Sebor <msebor@redhat.com>
29218
29219 PR c/83559
29220 * doc/extend.texi (attribute const): Fix a typo.
29221 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29222 issuing -Wsuggest-attribute for void functions.
29223
29224 2018-01-03 Martin Sebor <msebor@redhat.com>
29225
29226 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29227 offset_int::from instead of wide_int::to_shwi.
29228 (maybe_diag_overlap): Remove assertion.
29229 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29230 * gimple-ssa-sprintf.c (format_directive): Same.
29231 (parse_directive): Same.
29232 (sprintf_dom_walker::compute_format_length): Same.
29233 (try_substitute_return_value): Same.
29234
29235 2018-01-03 Jeff Law <law@redhat.com>
29236
29237 PR middle-end/83654
29238 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29239 non-constant residual for zero at runtime and avoid probing in
29240 that case. Reorganize code for trailing problem to mirror handling
29241 of the residual.
29242
29243 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29244
29245 PR tree-optimization/83501
29246 * tree-ssa-strlen.c (get_string_cst): New.
29247 (handle_char_store): Call get_string_cst.
29248
29249 2018-01-03 Martin Liska <mliska@suse.cz>
29250
29251 PR tree-optimization/83593
29252 * tree-ssa-strlen.c: Include tree-cfg.h.
29253 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29254 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29255 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29256 to false.
29257 (strlen_dom_walker::before_dom_children): Call
29258 gimple_purge_dead_eh_edges. Dump tranformation with details
29259 dump flags.
29260 (strlen_dom_walker::before_dom_children): Update call by adding
29261 new argument cleanup_eh.
29262 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29263
29264 2018-01-03 Martin Liska <mliska@suse.cz>
29265
29266 PR ipa/83549
29267 * cif-code.def (VARIADIC_THUNK): New enum value.
29268 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29269 thunks.
29270
29271 2018-01-03 Jan Beulich <jbeulich@suse.com>
29272
29273 * sse.md (mov<mode>_internal): Tighten condition for when to use
29274 vmovdqu<ssescalarsize> for TI and OI modes.
29275
29276 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29277
29278 Update copyright years.
29279
29280 2018-01-03 Martin Liska <mliska@suse.cz>
29281
29282 PR ipa/83594
29283 * ipa-visibility.c (function_and_variable_visibility): Skip
29284 functions with noipa attribure.
29285
29286 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29287
29288 * gcc.c (process_command): Update copyright notice dates.
29289 * gcov-dump.c (print_version): Ditto.
29290 * gcov.c (print_version): Ditto.
29291 * gcov-tool.c (print_version): Ditto.
29292 * gengtype.c (create_file): Ditto.
29293 * doc/cpp.texi: Bump @copying's copyright year.
29294 * doc/cppinternals.texi: Ditto.
29295 * doc/gcc.texi: Ditto.
29296 * doc/gccint.texi: Ditto.
29297 * doc/gcov.texi: Ditto.
29298 * doc/install.texi: Ditto.
29299 * doc/invoke.texi: Ditto.
29300
29301 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29302
29303 * vector-builder.h (vector_builder::m_full_nelts): Change from
29304 unsigned int to poly_uint64.
29305 (vector_builder::full_nelts): Update prototype accordingly.
29306 (vector_builder::new_vector): Likewise.
29307 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29308 (vector_builder::operator ==): Likewise.
29309 (vector_builder::finalize): Likewise.
29310 * int-vector-builder.h (int_vector_builder::int_vector_builder):
29311 Take the number of elements as a poly_uint64 rather than an
29312 unsigned int.
29313 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29314 from unsigned int to poly_uint64.
29315 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29316 (vec_perm_indices::new_vector): Likewise.
29317 (vec_perm_indices::length): Likewise.
29318 (vec_perm_indices::nelts_per_input): Likewise.
29319 (vec_perm_indices::input_nelts): Likewise.
29320 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29321 number of elements per input as a poly_uint64 rather than an
29322 unsigned int. Use the original encoding for variable-length
29323 vectors, rather than clamping each individual element.
29324 For the second and subsequent elements in each pattern,
29325 clamp the step and base before clamping their sum.
29326 (vec_perm_indices::series_p): Handle polynomial element counts.
29327 (vec_perm_indices::all_in_range_p): Likewise.
29328 (vec_perm_indices_to_tree): Likewise.
29329 (vec_perm_indices_to_rtx): Likewise.
29330 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29331 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29332 (tree_vector_builder::new_binary_operation): Handle polynomial
29333 element counts. Return false if we need to know the number
29334 of elements at compile time.
29335 * fold-const.c (fold_vec_perm): Punt if the number of elements
29336 isn't known at compile time.
29337
29338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29339
29340 * vec-perm-indices.h (vec_perm_builder): Change element type
29341 from HOST_WIDE_INT to poly_int64.
29342 (vec_perm_indices::element_type): Update accordingly.
29343 (vec_perm_indices::clamp): Handle polynomial element_types.
29344 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29345 (vec_perm_indices::all_in_range_p): Likewise.
29346 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29347 than shwi trees.
29348 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29349 polynomial vec_perm_indices element types.
29350 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29351 * fold-const.c (fold_vec_perm): Likewise.
29352 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29353 * tree-vect-generic.c (lower_vec_perm): Likewise.
29354 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29355 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29356 element type to HOST_WIDE_INT.
29357
29358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29359 Alan Hayward <alan.hayward@arm.com>
29360 David Sherwood <david.sherwood@arm.com>
29361
29362 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29363 rather than an int. Use plus_constant.
29364 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29365 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29366
29367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29368 Alan Hayward <alan.hayward@arm.com>
29369 David Sherwood <david.sherwood@arm.com>
29370
29371 * calls.c (emit_call_1, expand_call): Change struct_value_size from
29372 a HOST_WIDE_INT to a poly_int64.
29373
29374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29375 Alan Hayward <alan.hayward@arm.com>
29376 David Sherwood <david.sherwood@arm.com>
29377
29378 * calls.c (load_register_parameters): Cope with polynomial
29379 mode sizes. Require a constant size for BLKmode parameters
29380 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29381 forces a parameter to be padded at the lsb end in order to
29382 fill a complete number of words, require the parameter size
29383 to be ordered wrt UNITS_PER_WORD.
29384
29385 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29386 Alan Hayward <alan.hayward@arm.com>
29387 David Sherwood <david.sherwood@arm.com>
29388
29389 * reload1.c (spill_stack_slot_width): Change element type
29390 from unsigned int to poly_uint64_pod.
29391 (alter_reg): Treat mode sizes as polynomial.
29392
29393 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29394 Alan Hayward <alan.hayward@arm.com>
29395 David Sherwood <david.sherwood@arm.com>
29396
29397 * reload.c (complex_word_subreg_p): New function.
29398 (reload_inner_reg_of_subreg, push_reload): Use it.
29399
29400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29401 Alan Hayward <alan.hayward@arm.com>
29402 David Sherwood <david.sherwood@arm.com>
29403
29404 * lra-constraints.c (process_alt_operands): Reject matched
29405 operands whose sizes aren't ordered.
29406 (match_reload): Refer to this check here.
29407
29408 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29409 Alan Hayward <alan.hayward@arm.com>
29410 David Sherwood <david.sherwood@arm.com>
29411
29412 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29413 that the mode size is in the set {1, 2, 4, 8, 16}.
29414
29415 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29416 Alan Hayward <alan.hayward@arm.com>
29417 David Sherwood <david.sherwood@arm.com>
29418
29419 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29420 Use plus_constant instead of gen_rtx_PLUS.
29421
29422 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29423 Alan Hayward <alan.hayward@arm.com>
29424 David Sherwood <david.sherwood@arm.com>
29425
29426 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29427 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29428 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29429 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29430 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29431 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29432 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29433 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29434 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29435 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29436 a poly_int64.
29437 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29438 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29439 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29440 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29441 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29442 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29443 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29444 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29445 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29446 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29447 function.
29448 * expr.c (emit_move_resolve_push): Treat the input and result
29449 of PUSH_ROUNDING as a poly_int64.
29450 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29451 (emit_push_insn): Likewise.
29452 * lra-eliminations.c (mark_not_eliminable): Likewise.
29453 * recog.c (push_operand): Likewise.
29454 * reload1.c (elimination_effects): Likewise.
29455 * rtlanal.c (nonzero_bits1): Likewise.
29456 * calls.c (store_one_arg): Likewise. Require the padding to be
29457 known at compile time.
29458
29459 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29460 Alan Hayward <alan.hayward@arm.com>
29461 David Sherwood <david.sherwood@arm.com>
29462
29463 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29464 Use plus_constant instead of gen_rtx_PLUS.
29465
29466 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29467 Alan Hayward <alan.hayward@arm.com>
29468 David Sherwood <david.sherwood@arm.com>
29469
29470 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29471 rather than an int.
29472
29473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29474 Alan Hayward <alan.hayward@arm.com>
29475 David Sherwood <david.sherwood@arm.com>
29476
29477 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29478 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29479 via stack temporaries. Treat the mode size as polynomial too.
29480
29481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29482 Alan Hayward <alan.hayward@arm.com>
29483 David Sherwood <david.sherwood@arm.com>
29484
29485 * expr.c (expand_expr_real_2): When handling conversions involving
29486 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29487 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29488 as a poly_uint64 too.
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 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29495
29496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29497 Alan Hayward <alan.hayward@arm.com>
29498 David Sherwood <david.sherwood@arm.com>
29499
29500 * combine.c (can_change_dest_mode): Handle polynomial
29501 REGMODE_NATURAL_SIZE.
29502 * expmed.c (store_bit_field_1): Likewise.
29503 * expr.c (store_constructor): Likewise.
29504 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29505 and polynomial REGMODE_NATURAL_SIZE.
29506 (gen_lowpart_common): Likewise.
29507 * reginfo.c (record_subregs_of_mode): Likewise.
29508 * rtlanal.c (read_modify_subreg_p): Likewise.
29509
29510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29511 Alan Hayward <alan.hayward@arm.com>
29512 David Sherwood <david.sherwood@arm.com>
29513
29514 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29515 numbers of elements.
29516
29517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29518 Alan Hayward <alan.hayward@arm.com>
29519 David Sherwood <david.sherwood@arm.com>
29520
29521 * match.pd: Cope with polynomial numbers of vector elements.
29522
29523 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29524 Alan Hayward <alan.hayward@arm.com>
29525 David Sherwood <david.sherwood@arm.com>
29526
29527 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29528 in a POINTER_PLUS_EXPR.
29529
29530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29531 Alan Hayward <alan.hayward@arm.com>
29532 David Sherwood <david.sherwood@arm.com>
29533
29534 * omp-simd-clone.c (simd_clone_subparts): New function.
29535 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29536 (ipa_simd_modify_function_body): Likewise.
29537
29538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29539 Alan Hayward <alan.hayward@arm.com>
29540 David Sherwood <david.sherwood@arm.com>
29541
29542 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29543 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29544 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29545 (expand_vector_condition, vector_element): Likewise.
29546 (subparts_gt): New function.
29547 (get_compute_type): Use subparts_gt.
29548 (count_type_subparts): Delete.
29549 (expand_vector_operations_1): Use subparts_gt instead of
29550 count_type_subparts.
29551
29552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29553 Alan Hayward <alan.hayward@arm.com>
29554 David Sherwood <david.sherwood@arm.com>
29555
29556 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29557 (vect_compile_time_alias): ...this new function. Do the calculation
29558 on poly_ints rather than trees.
29559 (vect_prune_runtime_alias_test_list): Update call accordingly.
29560
29561 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29562 Alan Hayward <alan.hayward@arm.com>
29563 David Sherwood <david.sherwood@arm.com>
29564
29565 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29566 numbers of units.
29567 (vect_schedule_slp_instance): Likewise.
29568
29569 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29570 Alan Hayward <alan.hayward@arm.com>
29571 David Sherwood <david.sherwood@arm.com>
29572
29573 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29574 constant and extern definitions for variable-length vectors.
29575 (vect_get_constant_vectors): Note that the number of units
29576 is known to be constant.
29577
29578 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29579 Alan Hayward <alan.hayward@arm.com>
29580 David Sherwood <david.sherwood@arm.com>
29581
29582 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29583 of units as polynomial. Choose between WIDE and NARROW based
29584 on multiple_p.
29585
29586 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29587 Alan Hayward <alan.hayward@arm.com>
29588 David Sherwood <david.sherwood@arm.com>
29589
29590 * tree-vect-stmts.c (simd_clone_subparts): New function.
29591 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29592
29593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29594 Alan Hayward <alan.hayward@arm.com>
29595 David Sherwood <david.sherwood@arm.com>
29596
29597 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29598 vectors as polynomial. Use build_index_vector for
29599 IFN_GOMP_SIMD_LANE.
29600
29601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29602 Alan Hayward <alan.hayward@arm.com>
29603 David Sherwood <david.sherwood@arm.com>
29604
29605 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29606 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29607 for variable-length vectors.
29608 (vectorizable_mask_load_store): Treat the number of units as
29609 polynomial, asserting that it is constant if the condition has
29610 already been enforced.
29611 (vectorizable_store, vectorizable_load): 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-loop.c (vectorizable_live_operation): Treat the number
29618 of units as polynomial. Punt if we can't tell at compile time
29619 which vector contains the final result.
29620
29621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29622 Alan Hayward <alan.hayward@arm.com>
29623 David Sherwood <david.sherwood@arm.com>
29624
29625 * tree-vect-loop.c (vectorizable_induction): Treat the number
29626 of units as polynomial. Punt on SLP inductions. Use an integer
29627 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29628 cast of such a series for variable-length floating-point
29629 reductions.
29630
29631 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29632 Alan Hayward <alan.hayward@arm.com>
29633 David Sherwood <david.sherwood@arm.com>
29634
29635 * tree.h (build_index_vector): Declare.
29636 * tree.c (build_index_vector): New function.
29637 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29638 of units as polynomial, forcibly converting it to a constant if
29639 vectorizable_reduction has already enforced the condition.
29640 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29641 to create a {1,2,3,...} vector.
29642 (vectorizable_reduction): Treat the number of units as polynomial.
29643 Choose vectype_in based on the largest scalar element size rather
29644 than the smallest number of units. Enforce the restrictions
29645 relied on above.
29646
29647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29648 Alan Hayward <alan.hayward@arm.com>
29649 David Sherwood <david.sherwood@arm.com>
29650
29651 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29652 number of units as polynomial.
29653
29654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29655 Alan Hayward <alan.hayward@arm.com>
29656 David Sherwood <david.sherwood@arm.com>
29657
29658 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29659 * target.def (autovectorize_vector_sizes): Return the vector sizes
29660 by pointer, using vector_sizes rather than a bitmask.
29661 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29662 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29663 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29664 Likewise.
29665 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29666 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29667 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29668 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29669 * omp-general.c (omp_max_vf): Likewise.
29670 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29671 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29672 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29673 * tree-vect-slp.c (vect_slp_bb): Likewise.
29674 * doc/tm.texi: Regenerate.
29675 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29676 to a poly_uint64.
29677 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29678 the vector size as a poly_uint64 rather than an unsigned int.
29679 (current_vector_size): Change from an unsigned int to a poly_uint64.
29680 (get_vectype_for_scalar_type): Update accordingly.
29681 * tree.h (build_truth_vector_type): Take the size and number of
29682 units as a poly_uint64 rather than an unsigned int.
29683 (build_vector_type): Add a temporary overload that takes
29684 the number of units as a poly_uint64 rather than an unsigned int.
29685 * tree.c (make_vector_type): Likewise.
29686 (build_truth_vector_type): Take the number of units as a poly_uint64
29687 rather than an unsigned int.
29688
29689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29690 Alan Hayward <alan.hayward@arm.com>
29691 David Sherwood <david.sherwood@arm.com>
29692
29693 * target.def (get_mask_mode): Take the number of units and length
29694 as poly_uint64s rather than unsigned ints.
29695 * targhooks.h (default_get_mask_mode): Update accordingly.
29696 * targhooks.c (default_get_mask_mode): Likewise.
29697 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29698 * doc/tm.texi: Regenerate.
29699
29700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29701 Alan Hayward <alan.hayward@arm.com>
29702 David Sherwood <david.sherwood@arm.com>
29703
29704 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29705 * omp-general.c (omp_max_vf): Likewise.
29706 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29707 (expand_omp_simd): Handle polynomial safelen.
29708 * omp-low.c (omplow_simd_context): Add a default constructor.
29709 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29710 (lower_rec_simd_input_clauses): Update accordingly.
29711 (lower_rec_input_clauses): Likewise.
29712
29713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29714 Alan Hayward <alan.hayward@arm.com>
29715 David Sherwood <david.sherwood@arm.com>
29716
29717 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29718 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29719 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29720 (vect_analyze_slp_cost): Likewise.
29721 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29722 (vect_model_load_cost): Likewise.
29723
29724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29725 Alan Hayward <alan.hayward@arm.com>
29726 David Sherwood <david.sherwood@arm.com>
29727
29728 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29729 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29730 from an unsigned int * to a poly_uint64_pod *.
29731 (calculate_unrolling_factor): New function.
29732 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29733
29734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29735 Alan Hayward <alan.hayward@arm.com>
29736 David Sherwood <david.sherwood@arm.com>
29737
29738 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29739 from an unsigned int to a poly_uint64.
29740 (_loop_vec_info::slp_unrolling_factor): Likewise.
29741 (_loop_vec_info::vectorization_factor): Change from an int
29742 to a poly_uint64.
29743 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29744 (vect_get_num_vectors): New function.
29745 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29746 (vect_get_num_copies): Use vect_get_num_vectors.
29747 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29748 to an unsigned int *.
29749 (vect_analyze_data_refs): Change min_vf from an int * to a
29750 poly_uint64 *.
29751 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29752 than an unsigned HOST_WIDE_INT.
29753 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29754 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29755 to an unsigned int *.
29756 (vect_analyze_data_ref_dependences): Likewise.
29757 (vect_compute_data_ref_alignment): Handle polynomial vf.
29758 (vect_enhance_data_refs_alignment): Likewise.
29759 (vect_prune_runtime_alias_test_list): Likewise.
29760 (vect_shift_permute_load_chain): Likewise.
29761 (vect_supportable_dr_alignment): Likewise.
29762 (dependence_distance_ge_vf): Take the vectorization factor as a
29763 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29764 (vect_analyze_data_refs): Change min_vf from an int * to a
29765 poly_uint64 *.
29766 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29767 vfm1 as a poly_uint64 rather than an int. Make the same change
29768 for the returned bound_scalar.
29769 (vect_gen_vector_loop_niters): Handle polynomial vf.
29770 (vect_do_peeling): Likewise. Update call to
29771 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29772 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29773 be constant.
29774 * tree-vect-loop.c (vect_determine_vectorization_factor)
29775 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29776 (vect_get_known_peeling_cost): Likewise.
29777 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29778 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29779 (vect_transform_loop): Likewise. Use the lowest possible VF when
29780 updating the upper bounds of the loop.
29781 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29782 rather than an int.
29783 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29784 polynomial unroll factors.
29785 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29786 (vect_make_slp_decision): Likewise.
29787 (vect_supported_load_permutation_p): Likewise, and polynomial
29788 vf too.
29789 (vect_analyze_slp_cost): Handle polynomial vf.
29790 (vect_slp_analyze_node_operations): Likewise.
29791 (vect_slp_analyze_bb_1): Likewise.
29792 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29793 than an unsigned HOST_WIDE_INT.
29794 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29795 (vectorizable_load): Handle polynomial vf.
29796 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29797 a poly_uint64.
29798 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29799
29800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29801 Alan Hayward <alan.hayward@arm.com>
29802 David Sherwood <david.sherwood@arm.com>
29803
29804 * match.pd: Handle bit operations involving three constants
29805 and try to fold one pair.
29806
29807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29808
29809 * tree-vect-loop-manip.c: Include gimple-fold.h.
29810 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29811 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29812 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29813 Add a path that uses a step of VF instead of 1, but disable it
29814 for now.
29815 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29816 and niters_no_overflow parameters. Update calls to
29817 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29818 Create a new SSA name if the latter choses to use a ste other
29819 than zero, and return it via niters_vector_mult_vf_var.
29820 * tree-vect-loop.c (vect_transform_loop): Update calls to
29821 vect_do_peeling, vect_gen_vector_loop_niters and
29822 slpeel_make_loop_iterate_ntimes.
29823 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29824 (vect_gen_vector_loop_niters): Update declarations after above changes.
29825
29826 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29827
29828 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29829 128-bit round to integer instructions.
29830 (ceil<mode>2): Likewise.
29831 (btrunc<mode>2): Likewise.
29832 (round<mode>2): Likewise.
29833
29834 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29835
29836 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29837 unaligned VSX load/store on P8/P9.
29838 (expand_block_clear): Allow the use of unaligned VSX
29839 load/store on P8/P9.
29840
29841 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29842
29843 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29844 New function.
29845 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29846 swap associated with both a load and a store.
29847
29848 2018-01-02 Andrew Waterman <andrew@sifive.com>
29849
29850 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29851 * config/riscv/riscv.md (clear_cache): Use it.
29852
29853 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29854
29855 * web.c: Remove out-of-date comment.
29856
29857 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29858
29859 * expr.c (fixup_args_size_notes): Check that any existing
29860 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29861 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29862 (emit_single_push_insn): ...here.
29863
29864 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29865
29866 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29867 (const_vector_encoded_nelts): New function.
29868 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29869 (const_vector_int_elt, const_vector_elt): Declare.
29870 * emit-rtl.c (const_vector_int_elt_1): New function.
29871 (const_vector_elt): Likewise.
29872 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29873 of CONST_VECTOR_ELT.
29874
29875 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29876
29877 * expr.c: Include rtx-vector-builder.h.
29878 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29879 directly on the tree encoding.
29880 (const_vector_from_tree): Likewise.
29881 * optabs.c: Include rtx-vector-builder.h.
29882 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29883 sequence of "u" values.
29884 * vec-perm-indices.c: Include rtx-vector-builder.h.
29885 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29886 directly on the vec_perm_indices encoding.
29887
29888 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29889
29890 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29891 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29892 * rtx-vector-builder.h: New file.
29893 * rtx-vector-builder.c: Likewise.
29894 * rtl.h (rtx_def::u2): Add a const_vector field.
29895 (CONST_VECTOR_NPATTERNS): New macro.
29896 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29897 (CONST_VECTOR_DUPLICATE_P): Likewise.
29898 (CONST_VECTOR_STEPPED_P): Likewise.
29899 (CONST_VECTOR_ENCODED_ELT): Likewise.
29900 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29901 (unwrap_const_vec_duplicate): Likewise.
29902 (const_vec_series_p): Check for a non-duplicated vector encoding.
29903 Say that the function only returns true for integer vectors.
29904 * emit-rtl.c: Include rtx-vector-builder.h.
29905 (gen_const_vec_duplicate_1): Delete.
29906 (gen_const_vector): Call gen_const_vec_duplicate instead of
29907 gen_const_vec_duplicate_1.
29908 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29909 (gen_const_vec_duplicate): Use rtx_vector_builder.
29910 (gen_const_vec_series): Likewise.
29911 (gen_rtx_CONST_VECTOR): Likewise.
29912 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29913 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29914 Build a new vector rather than modifying a CONST_VECTOR in-place.
29915 (handle_special_swappables): Update call accordingly.
29916 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29917 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29918 Build a new vector rather than modifying a CONST_VECTOR in-place.
29919 (handle_special_swappables): Update call accordingly.
29920
29921 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29922
29923 * simplify-rtx.c (simplify_const_binary_operation): Use
29924 CONST_VECTOR_ELT instead of XVECEXP.
29925
29926 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29927
29928 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29929 the selector elements to be different from the data elements
29930 if the selector is a VECTOR_CST.
29931 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29932 ssizetype for the selector.
29933
29934 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29935
29936 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29937 before testing each element individually.
29938 * tree-vect-generic.c (lower_vec_perm): Likewise.
29939
29940 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29941
29942 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29943 * selftest-run-tests.c (selftest::run_tests): Call it.
29944 * vector-builder.h (vector_builder::operator ==): New function.
29945 (vector_builder::operator !=): Likewise.
29946 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29947 (vec_perm_indices::all_from_input_p): New function.
29948 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29949 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29950 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29951 instead of reading the VECTOR_CST directly. Detect whether both
29952 vector inputs are the same before constructing the vec_perm_indices,
29953 and update the number of inputs argument accordingly. Use the
29954 utility functions added above. Only construct sel2 if we need to.
29955
29956 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29957
29958 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29959 the broadcast of the low byte.
29960 (expand_mult_highpart): Use an explicit encoding for the permutes.
29961 * optabs-query.c (can_mult_highpart_p): Likewise.
29962 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29963 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29964 (vectorizable_bswap): Likewise.
29965 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29966 explicit encoding for the power-of-2 permutes.
29967 (vect_permute_store_chain): Likewise.
29968 (vect_grouped_load_supported): Likewise.
29969 (vect_permute_load_chain): Likewise.
29970
29971 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29972
29973 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29974 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29975 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29976 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29977 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29978 (vect_gen_perm_mask_any): Likewise.
29979
29980 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29981
29982 * int-vector-builder.h: New file.
29983 * vec-perm-indices.h: Include int-vector-builder.h.
29984 (vec_perm_indices): Redefine as an int_vector_builder.
29985 (auto_vec_perm_indices): Delete.
29986 (vec_perm_builder): Redefine as a stand-alone class.
29987 (vec_perm_indices::vec_perm_indices): New function.
29988 (vec_perm_indices::clamp): Likewise.
29989 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29990 (vec_perm_indices::new_vector): New function.
29991 (vec_perm_indices::new_expanded_vector): Update for new
29992 vec_perm_indices class.
29993 (vec_perm_indices::rotate_inputs): New function.
29994 (vec_perm_indices::all_in_range_p): Operate directly on the
29995 encoded form, without computing elided elements.
29996 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29997 encoding. Update for new vec_perm_indices class.
29998 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29999 the given vec_perm_builder.
30000 (expand_vec_perm_var): Update vec_perm_builder constructor.
30001 (expand_mult_highpart): Use vec_perm_builder instead of
30002 auto_vec_perm_indices.
30003 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
30004 vec_perm_indices instead of auto_vec_perm_indices. Use a single
30005 or double series encoding as appropriate.
30006 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
30007 vec_perm_indices instead of auto_vec_perm_indices.
30008 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30009 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30010 (vect_permute_store_chain): Likewise.
30011 (vect_grouped_load_supported): Likewise.
30012 (vect_permute_load_chain): Likewise.
30013 (vect_shift_permute_load_chain): Likewise.
30014 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30015 (vect_transform_slp_perm_load): Likewise.
30016 (vect_schedule_slp_instance): Likewise.
30017 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30018 (vectorizable_mask_load_store): Likewise.
30019 (vectorizable_bswap): Likewise.
30020 (vectorizable_store): Likewise.
30021 (vectorizable_load): Likewise.
30022 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
30023 vec_perm_indices instead of auto_vec_perm_indices. Use
30024 tree_to_vec_perm_builder to read the vector from a tree.
30025 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
30026 vec_perm_builder instead of a vec_perm_indices.
30027 (have_whole_vector_shift): Use vec_perm_builder and
30028 vec_perm_indices instead of auto_vec_perm_indices. Leave the
30029 truncation to calc_vec_perm_mask_for_shift.
30030 (vect_create_epilog_for_reduction): Likewise.
30031 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
30032 from auto_vec_perm_indices to vec_perm_indices.
30033 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30034 instead of changing individual elements.
30035 (aarch64_vectorize_vec_perm_const): Use new_vector to install
30036 the vector in d.perm.
30037 * config/arm/arm.c (expand_vec_perm_d::perm): Change
30038 from auto_vec_perm_indices to vec_perm_indices.
30039 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30040 instead of changing individual elements.
30041 (arm_vectorize_vec_perm_const): Use new_vector to install
30042 the vector in d.perm.
30043 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
30044 Update vec_perm_builder constructor.
30045 (rs6000_expand_interleave): Likewise.
30046 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
30047 (rs6000_expand_interleave): Likewise.
30048
30049 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30050
30051 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
30052 to qimode could truncate the indices.
30053 * optabs.c (expand_vec_perm_var): Likewise.
30054
30055 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30056
30057 * Makefile.in (OBJS): Add vec-perm-indices.o.
30058 * vec-perm-indices.h: New file.
30059 * vec-perm-indices.c: Likewise.
30060 * target.h (vec_perm_indices): Replace with a forward class
30061 declaration.
30062 (auto_vec_perm_indices): Move to vec-perm-indices.h.
30063 * optabs.h: Include vec-perm-indices.h.
30064 (expand_vec_perm): Delete.
30065 (selector_fits_mode_p, expand_vec_perm_var): Declare.
30066 (expand_vec_perm_const): Declare.
30067 * target.def (vec_perm_const_ok): Replace with...
30068 (vec_perm_const): ...this new hook.
30069 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
30070 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
30071 * doc/tm.texi: Regenerate.
30072 * optabs.def (vec_perm_const): Delete.
30073 * doc/md.texi (vec_perm_const): Likewise.
30074 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
30075 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
30076 expand_vec_perm for constant permutation vectors. Assert that
30077 the mode of variable permutation vectors is the integer equivalent
30078 of the mode that is being permuted.
30079 * optabs-query.h (selector_fits_mode_p): Declare.
30080 * optabs-query.c: Include vec-perm-indices.h.
30081 (selector_fits_mode_p): New function.
30082 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
30083 is defined, instead of checking whether the vec_perm_const_optab
30084 exists. Use targetm.vectorize.vec_perm_const instead of
30085 targetm.vectorize.vec_perm_const_ok. Check whether the indices
30086 fit in the vector mode before using a variable permute.
30087 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
30088 vec_perm_indices instead of an rtx.
30089 (expand_vec_perm): Replace with...
30090 (expand_vec_perm_const): ...this new function. Take the selector
30091 as a vec_perm_indices rather than an rtx. Also take the mode of
30092 the selector. Update call to shift_amt_for_vec_perm_mask.
30093 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
30094 Use vec_perm_indices::new_expanded_vector to expand the original
30095 selector into bytes. Check whether the indices fit in the vector
30096 mode before using a variable permute.
30097 (expand_vec_perm_var): Make global.
30098 (expand_mult_highpart): Use expand_vec_perm_const.
30099 * fold-const.c: Includes vec-perm-indices.h.
30100 * tree-ssa-forwprop.c: Likewise.
30101 * tree-vect-data-refs.c: Likewise.
30102 * tree-vect-generic.c: Likewise.
30103 * tree-vect-loop.c: Likewise.
30104 * tree-vect-slp.c: Likewise.
30105 * tree-vect-stmts.c: Likewise.
30106 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
30107 Delete.
30108 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
30109 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
30110 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
30111 (aarch64_vectorize_vec_perm_const): ...this new function.
30112 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30113 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30114 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
30115 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
30116 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30117 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30118 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
30119 into...
30120 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
30121 check for NEON modes.
30122 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
30123 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
30124 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
30125 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
30126 into...
30127 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
30128 the old VEC_PERM_CONST conditions.
30129 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
30130 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
30131 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
30132 (ia64_vectorize_vec_perm_const_ok): Merge into...
30133 (ia64_vectorize_vec_perm_const): ...this new function.
30134 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
30135 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
30136 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
30137 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
30138 * config/mips/mips.c (mips_expand_vec_perm_const)
30139 (mips_vectorize_vec_perm_const_ok): Merge into...
30140 (mips_vectorize_vec_perm_const): ...this new function.
30141 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
30142 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
30143 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
30144 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
30145 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
30146 (rs6000_expand_vec_perm_const): Delete.
30147 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
30148 Delete.
30149 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30150 (altivec_expand_vec_perm_const_le): Take each operand individually.
30151 Operate on constant selectors rather than rtxes.
30152 (altivec_expand_vec_perm_const): Likewise. Update call to
30153 altivec_expand_vec_perm_const_le.
30154 (rs6000_expand_vec_perm_const): Delete.
30155 (rs6000_vectorize_vec_perm_const_ok): Delete.
30156 (rs6000_vectorize_vec_perm_const): New function.
30157 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30158 an element count and rtx array.
30159 (rs6000_expand_extract_even): Update call accordingly.
30160 (rs6000_expand_interleave): Likewise.
30161 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
30162 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
30163 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
30164 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
30165 (rs6000_expand_vec_perm_const): Delete.
30166 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30167 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30168 (altivec_expand_vec_perm_const_le): Take each operand individually.
30169 Operate on constant selectors rather than rtxes.
30170 (altivec_expand_vec_perm_const): Likewise. Update call to
30171 altivec_expand_vec_perm_const_le.
30172 (rs6000_expand_vec_perm_const): Delete.
30173 (rs6000_vectorize_vec_perm_const_ok): Delete.
30174 (rs6000_vectorize_vec_perm_const): New function. Remove stray
30175 reference to the SPE evmerge intructions.
30176 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30177 an element count and rtx array.
30178 (rs6000_expand_extract_even): Update call accordingly.
30179 (rs6000_expand_interleave): Likewise.
30180 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30181 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30182 new function.
30183 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30184
30185 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30186
30187 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30188 vector mode and that that mode matches the mode of the data
30189 being permuted.
30190 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30191 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
30192 directly using expand_vec_perm_1 when forcing selectors into
30193 registers.
30194 (expand_vec_perm_var): New function, split out from expand_vec_perm.
30195
30196 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30197
30198 * optabs-query.h (can_vec_perm_p): Delete.
30199 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30200 * optabs-query.c (can_vec_perm_p): Split into...
30201 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30202 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30203 particular selector is valid.
30204 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30205 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30206 (vect_grouped_load_supported): Likewise.
30207 (vect_shift_permute_load_chain): Likewise.
30208 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30209 (vect_transform_slp_perm_load): Likewise.
30210 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30211 (vectorizable_bswap): Likewise.
30212 (vect_gen_perm_mask_checked): Likewise.
30213 * fold-const.c (fold_ternary_loc): Likewise. Don't take
30214 implementations of variable permutation vectors into account
30215 when deciding which selector to use.
30216 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30217 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30218 with a false third argument.
30219 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30220 to test whether the constant selector is valid and can_vec_perm_var_p
30221 to test whether a variable selector is valid.
30222
30223 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30224
30225 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30226 * optabs-query.c (can_vec_perm_p): Likewise.
30227 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30228 instead of vec_perm_indices.
30229 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30230 (vect_gen_perm_mask_checked): Likewise,
30231 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30232 (vect_gen_perm_mask_checked): Likewise,
30233
30234 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30235
30236 * optabs-query.h (qimode_for_vec_perm): Declare.
30237 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30238 (qimode_for_vec_perm): ...this new function.
30239 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30240
30241 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30242
30243 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30244 does not have a conditional at the top.
30245
30246 2018-01-02 Richard Biener <rguenther@suse.de>
30247
30248 * ipa-inline.c (big_speedup_p): Fix expression.
30249
30250 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30251
30252 PR target/81616
30253 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30254 for generic 4->6.
30255
30256 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30257
30258 PR target/81616
30259 Generic tuning.
30260 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30261 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30262 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30263 cond_taken_branch_cost 3->4.
30264
30265 2018-01-01 Jakub Jelinek <jakub@redhat.com>
30266
30267 PR tree-optimization/83581
30268 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30269 TODO_cleanup_cfg if any changes have been made.
30270
30271 PR middle-end/83608
30272 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30273 convert_modes if target mode has the right side, but different mode
30274 class.
30275
30276 PR middle-end/83609
30277 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30278 last argument when extracting from CONCAT. If either from_real or
30279 from_imag is NULL, use expansion through memory. If result is not
30280 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30281 the parts directly to inner mode, if even that fails, use expansion
30282 through memory.
30283
30284 PR middle-end/83623
30285 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30286 check for bswap in mode rather than HImode and use that in expand_unop
30287 too.
30288 \f
30289 Copyright (C) 2018 Free Software Foundation, Inc.
30290
30291 Copying and distribution of this file, with or without modification,
30292 are permitted in any medium without royalty provided the copyright
30293 notice and this notice are preserved.